/* ============================================
   101Guest — Global Search
   ============================================ */

.search-wrap {
    position: relative;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 8px 14px;
    width: 240px;
    transition: all 0.2s ease;
}

.search-input-wrap:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    width: 300px;
}

.search-input-wrap > i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.search-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    min-width: 0;
}

.search-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Dropdown de resultados */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: 90vw;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    max-height: 420px;
    overflow-y: auto;
    display: none;
    z-index: 200;
    color: #111;
}

.search-results.open {
    display: block;
}

.search-group-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
    padding: 12px 16px 6px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.search-item:hover {
    background: #f5f5f7;
}

.search-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #999;
    font-size: 0.85rem;
}

.search-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item-info {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #111;
}

.search-item-sub {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-empty {
    padding: 24px 16px;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

/* Botón lupa (móvil) */
.search-toggle-mobile {
    display: none;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    .search-wrap {
        display: none;
    }

    .search-wrap.mobile-open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 12px 16px;
        background: #111;
        z-index: 150;
    }

    .search-wrap.mobile-open .search-input-wrap {
        width: 100%;
    }

    .search-toggle-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-results {
        width: 100%;
        right: 0;
    }
}