/* Seletor de idioma — gatilho + modal com roda 3D (estilo wheel picker) */
.header-idioma {
    position: relative;
}

.parlons-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: min(14rem, 58vw);
    padding: 0.32rem 0.65rem 0.32rem 0.5rem;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 4px 14px rgba(0, 0, 0, 0.18);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.parlons-lang-trigger:hover {
    border-color: rgba(129, 247, 160, 0.55);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 0 0 1px rgba(57, 255, 20, 0.12),
        0 4px 18px rgba(0, 0, 0, 0.22);
}

.parlons-lang-trigger:active {
    transform: scale(0.98);
}

.parlons-lang-trigger__flag {
    width: 28px;
    height: 21px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.parlons-lang-trigger__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.parlons-lang-trigger__chev {
    display: block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.75);
    margin-left: 0.1rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.parlons-lang-modal[hidden] {
    display: none !important;
}

.parlons-lang-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

@media (min-width: 520px) {
    .parlons-lang-modal {
        align-items: center;
        padding: 1rem;
    }
}

.parlons-lang-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 18, 24, 0.58);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.parlons-lang-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(180deg, #2e353d 0%, #1e2328 100%);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    animation: parlonsLangPanel 0.32s ease-out both;
}

@media (min-width: 520px) {
    .parlons-lang-modal__panel {
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@keyframes parlonsLangPanel {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.parlons-lang-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.parlons-lang-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #e8f5e9;
    letter-spacing: 0.03em;
}

.parlons-lang-modal__x {
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #c5cae0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.parlons-lang-modal__x:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.parlons-lang-scene {
    position: relative;
    padding: 0.25rem 0 0.5rem;
    perspective: 900px;
    perspective-origin: 50% 50%;
}

.parlons-lang-highlight {
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    top: 50%;
    height: 52px;
    margin-top: -26px;
    border-radius: 12px;
    border: 1px solid rgba(129, 247, 160, 0.35);
    background: linear-gradient(180deg, rgba(46, 125, 50, 0.2) 0%, rgba(27, 94, 32, 0.15) 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
    pointer-events: none;
    z-index: 0;
}

.parlons-lang-wheel-grad {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    height: 4.2rem;
    pointer-events: none;
}

.parlons-lang-wheel-grad--top {
    top: 0;
    background: linear-gradient(180deg, #1e2328 0%, transparent 100%);
}

.parlons-lang-wheel-grad--bottom {
    bottom: 0;
    background: linear-gradient(0deg, #1e2328 0%, transparent 100%);
}

.parlons-lang-wheel-viewport {
    position: relative;
    z-index: 1;
    height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.parlons-lang-wheel {
    list-style: none;
    margin: 0;
    padding: 84px 1rem 84px;
    transform-style: preserve-3d;
}

.parlons-lang-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.35rem 0.5rem;
    margin: 0;
    box-sizing: border-box;
    scroll-snap-align: center;
    cursor: pointer;
    border-radius: 12px;
    transform-origin: 50% 50%;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    will-change: transform, opacity;
    transition: background 0.15s ease;
}

.parlons-lang-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.parlons-lang-item.is-selected {
    background: rgba(102, 187, 106, 0.1);
}

.parlons-lang-item__flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.parlons-lang-item__name {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-align: left;
    flex: 1;
    min-width: 0;
}

@media (max-width: 767px) {
    .parlons-lang-trigger {
        max-width: min(12rem, 52vw);
        font-size: 0.75rem;
        padding: 0.28rem 0.5rem 0.28rem 0.4rem;
    }
}
