/* =========================================================
   STS Localizer — Picker de idioma y moneda
   ========================================================= */

/* ── Contenedor ─────────────────────────────────────────── */
#sts-locale-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* ── Botón trigger ──────────────────────────────────────── */
/* Estado base: header transparente sobre hero oscuro → letras blancas */
.sts-locale-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
    white-space: nowrap;
}
.sts-locale-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Header scrolleado (fondo blanco) → adaptar a texto oscuro */
.site-header.is-scrolled .sts-locale-btn {
    background: rgba(1, 28, 40, 0.07);
    border-color: rgba(1, 28, 40, 0.22);
    color: #011c28;
}
.site-header.is-scrolled .sts-locale-btn:hover {
    background: rgba(1, 28, 40, 0.13);
    border-color: rgba(1, 28, 40, 0.4);
}
.site-header.is-scrolled .sts-locale-arrow,
.site-header.is-scrolled .sts-locale-sep {
    opacity: 0.4;
}

.sts-locale-flag   { font-size: 16px; line-height: 1; }
.sts-locale-code   { font-weight: 700; letter-spacing: .5px; }
.sts-locale-sep    { opacity: 0.5; }
.sts-locale-currency { opacity: 0.85; }
.sts-locale-arrow  { font-size: 10px; opacity: 0.7; transition: transform 0.2s; }

#sts-locale-btn[aria-expanded="true"] .sts-locale-arrow {
    transform: rotate(180deg);
}

/* ── Dropdown ───────────────────────────────────────────── */
.sts-locale-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 99998;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
    min-width: 240px;
    padding: 8px 0;
    animation: sts-dropdown-in 0.18s ease;
}
.sts-locale-dropdown.sts-locale--open {
    display: block;
}

@keyframes sts-dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Sección ────────────────────────────────────────────── */
.sts-locale-section {
    padding: 4px 0;
}
.sts-locale-section-title {
    margin: 0;
    padding: 6px 16px 4px;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .6px;
}

/* ── Opciones ───────────────────────────────────────────── */
.sts-locale-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    background: none;
    border: none;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    position: relative;
}
.sts-locale-option:hover {
    background: #f3f4f6;
}
.sts-locale-option.active {
    color: #011c28;
    font-weight: 600;
}
.sts-locale-option.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: #011c28;
    border-radius: 2px;
}
.sts-locale-check {
    margin-left: auto;
    color: #011c28;
    font-size: 13px;
}
.sts-locale-rate {
    margin-left: auto;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
}

/* ── Separador ──────────────────────────────────────────── */
.sts-locale-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

/* ── Nota de guardado (usuarios autenticados) ───────────── */
.sts-locale-save-note {
    padding: 8px 16px 10px;
    font-size: 12px;
    color: #6b7280;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}

/* ── Posición en el header ──────────────────────────────── */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* En móvil, ocultar el dropdown a la derecha y centrarlo */
@media (max-width: 768px) {
    .sts-locale-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        min-width: 220px;
    }
    @keyframes sts-dropdown-in {
        from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
        to   { opacity: 1; transform: translateX(-50%) translateY(0); }
    }
}
