/* ═══════════════════════════════════════════════
   SMOOTH JAZZ CHICAGO V3 LITE - BUSCADOR (estilos)
   ─────────────────────────────────────────────────
   Hereda automáticamente el tema activo usando las
   variables ya definidas en style.css:
     --primary, --secondary, --accent, --bg-medium,
     --bg-card, --light, --inactive, --border,
     --radius-*, --transition-*, --gradient-primary,
     --shadow-*
   Así, cuando el pasajero cambia de tema, el buscador
   cambia de color solito. No repetimos los 8 temas.
   ═══════════════════════════════════════════════ */

/* ── Botones nuevos de la barra superior ───────── */

.search-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
}
.search-icon-btn:hover  { background: var(--primary); color: #fff; }
.search-icon-btn:active { transform: scale(0.92); }

.lang-btn {
    height: 38px;
    min-width: 44px;
    padding: 0 12px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
}
.lang-btn:hover  { background: var(--primary); color: #fff; }
.lang-btn:active { transform: scale(0.94); }

/* Grupo izquierdo de la barra: compartir + buscar + idioma */
.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Overlay del modal ─────────────────────────── */

.bs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 20px;
    animation: bsFade 0.2s ease;
}
.bs-overlay.hidden { display: none; }

@keyframes bsFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Caja del modal ────────────────────────────── */

.bs-box {
    background: #202020;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0,0,0,0.5);
    animation: bsSlideUp 0.25s ease;
    overflow: hidden;
}

@keyframes bsSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Encabezado del modal ──────────────────────── */

.bs-header {
    padding: 22px 22px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.bs-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.bs-heading {
    font-size: 19px;
    font-weight: 700;
    color: var(--light);
    letter-spacing: 0.3px;
    margin: 0;
}

.bs-close-btn {
    background: rgba(255,255,255,0.06);
    border: none;
    color: var(--inactive);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
}
.bs-close-btn:hover { background: rgba(255,255,255,0.12); color: var(--light); }

/* ── Caja de búsqueda ──────────────────────────── */

.bs-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.bs-search-icon {
    position: absolute;
    left: 14px;
    color: var(--inactive);
    pointer-events: none;
    display: flex;
}

.bs-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    color: var(--light);
    font-family: var(--font);
    font-size: 15px;
    padding: 13px 14px 13px 42px;
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    -webkit-appearance: none;
}
.bs-input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.07);
}
.bs-input::placeholder { color: #555; }

.bs-count {
    margin: 10px 2px 0;
    font-size: 12px;
    color: var(--inactive);
}

/* ── Lista de canciones (scroll) ───────────────── */

.bs-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 14px 4px;
    flex: 1;
    min-height: 120px;
}

/* Scrollbar sutil con color del tema */
.bs-list::-webkit-scrollbar { width: 8px; }
.bs-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
}
.bs-list::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Tarjeta de canción ────────────────────────── */

.bs-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.03);
    margin-bottom: 8px;
    transition: background var(--transition-fast);
}
.bs-card:hover { background: rgba(255,255,255,0.06); }

.bs-cover {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
}
.bs-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
}

.bs-info {
    flex: 1;
    min-width: 0;
}
.bs-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--light);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bs-artist {
    font-size: 12px;
    color: var(--inactive);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bs-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Botón play/stop del preview */
.bs-play {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast), transform 0.1s ease;
    flex-shrink: 0;
}
.bs-play:hover  { background: var(--primary); color: #fff; }
.bs-play:active { transform: scale(0.9); }
.bs-play.bs-playing {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

/* Botón "Disponible" */
.bs-buy {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--gradient-primary);
    color: #fff;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.1s ease, box-shadow var(--transition-normal);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.bs-buy:hover  { box-shadow: var(--shadow-md), var(--shadow-glow); }
.bs-buy:active { transform: scale(0.95); }

/* ── Mensajes (cargando / vacío / error) ───────── */

.bs-msg {
    text-align: center;
    color: var(--inactive);
    font-size: 14px;
    padding: 30px 16px;
    margin: 0;
}
.bs-msg-err { color: #F87171; }

/* ── Pie del modal: "X" para cerrar ────────────── */

.bs-footer {
    padding: 12px 22px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.bs-close-bottom {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--light);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.bs-close-bottom:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--primary);
}

/* ── Responsive: móviles chicos ────────────────── */

@media (max-width: 380px) {
    .bs-buy   { padding: 8px 10px; font-size: 11px; }
    .bs-play  { width: 34px; height: 34px; }
    .bs-cover { width: 42px; height: 42px; }
    .lang-btn { min-width: 40px; padding: 0 9px; }
    .top-bar-left { gap: 6px; }
}
