/* =================================================================
   FAMILYPARKS – Language Switcher
================================================================= */

.fp-lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ── Toggle button ────────────────────────────────────────────── */
.fp-lang-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(245, 232, 192, 0.25);
    border-radius: 6px;
    color: var(--fp-text-cream);
    font-family: var(--fp-font-body);
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.fp-lang-switcher__toggle:hover,
.fp-lang-switcher__toggle:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(245, 232, 192, 0.5);
    outline: none;
}

.fp-lang-switcher__code {
    font-weight: 400;
    line-height: 1;
}

.fp-lang-switcher__arrow {
    width: 10px;
    height: 6px;
    transition: transform 0.2s ease;
}

.fp-lang-switcher__toggle[aria-expanded="true"] .fp-lang-switcher__arrow {
    transform: rotate(180deg);
}

/* ── Flag SVG ─────────────────────────────────────────────────── */
.fp-lang-switcher__flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
    display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
    flex-shrink: 0;
}

/* ── Dropdown ─────────────────────────────────────────────────── */
.fp-lang-switcher__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    min-width: 130px;
    background: rgba(20, 10, 4, 0.97);
    border: 1px solid rgba(245, 232, 192, 0.2);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 200;

    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    pointer-events: none;
}

.fp-lang-switcher__dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Options ──────────────────────────────────────────────────── */
.fp-lang-switcher__option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    color: var(--fp-text-cream);
    font-family: var(--fp-font-body);
    font-size: 13px;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.fp-lang-switcher__option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fp-lang-switcher__option.is-active {
    color: var(--fp-gold-300);
    font-weight: 400;
}

.fp-lang-switcher__option.is-active::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--fp-gold-300);
    margin-right: -4px; /* compensat de gap */
    flex-shrink: 0;
}

/* ── Mobile adjustments ───────────────────────────────────────── */
@media (max-width: 900px) {
    /* Switcher-ul apare în overlay-ul de mobil, deasupra listei de nav */
    .fp-lang-switcher {
        order: -1;
    }

    .fp-lang-switcher__dropdown {
        left: 0;
        right: auto;
    }

    /* În overlay-ul de mobil */
    .fp-nav.is-open .fp-lang-switcher {
        display: flex;
        justify-content: center;
        padding: 12px 0 4px;
        border-bottom: 1px solid rgba(245, 232, 192, 0.15);
        margin-bottom: 8px;
        width: 100%;
    }

    .fp-nav.is-open .fp-lang-switcher__toggle {
        background: rgba(255, 255, 255, 0.05);
    }
}
