/**
 * Language Menu New - Menu de idiomas refeitdo do zero
 */

/* === RESET DE CONFLITOS === */
.language-selector * {
    box-sizing: border-box;
}

/* === SELETOR DE IDIOMAS === */
.language-selector {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

/* === BOTÃO PRINCIPAL === */
.language-btn-new {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
    height: 40px;
    position: relative;
}

.language-btn-new:hover {
    background: var(--neon-green);
    border-color: var(--neon-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(159, 239, 174, 0.3);
}

/* === BANDEIRA NO BOTÃO === */
.language-flag-new {
    width: 24px;
    height: 18px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.language-btn-new:hover .language-flag-new {
    transform: scale(1.1);
    border-color: var(--black-solid);
}

/* === DROPDOWN === */
.language-dropdown-new {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(159, 239, 174, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    min-width: 180px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.language-selector:hover .language-dropdown-new {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === OPÇÕES DO DROPDOWN === */
.language-option-new {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    color: var(--cyan-blue);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(159, 239, 174, 0.1);
    cursor: pointer;
    min-height: 44px;
}

.language-option-new:last-child {
    border-bottom: none;
}

.language-option-new:hover {
    background: var(--neon-green);
    color: var(--black-solid);
    padding-left: 1.5rem;
    transform: translateX(5px);
}

.language-option-new:hover .language-flag-new {
    transform: scale(1.1);
    border-color: var(--black-solid);
}

/* === TEXTO DAS OPÇÕES === */
.language-text-new {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

/* === BANDEIRAS ESPECÍFICAS === */
.flag-br { background-image: url('images/flag-br.png'); }
.flag-us { background-image: url('images/flag-us.png'); }
.flag-es { background-image: url('images/flag-es.png'); }
.flag-it { background-image: url('images/flag-it.png'); }

/* === RESPONSIVIDADE === */

/* Desktop Grande (2048px+) */
@media (min-width: 2048px) {
    .language-btn-new {
        min-width: 60px;
        height: 45px;
        padding: 0.6rem;
    }
    
    .language-flag-new {
        width: 28px;
        height: 21px;
    }
    
    .language-dropdown-new {
        min-width: 200px;
    }
    
    .language-option-new {
        padding: 1rem 1.5rem;
        gap: 1rem;
    }
    
    .language-option-new .language-flag-new {
        width: 24px;
        height: 18px;
    }
    
    .language-text-new {
        font-size: 1rem;
    }
}

/* Tablet (769px - 2047px) */
@media (min-width: 769px) and (max-width: 2047px) {
    .language-btn-new {
        min-width: 45px;
        height: 36px;
        padding: 0.4rem;
    }
    
    .language-flag-new {
        width: 20px;
        height: 15px;
    }
    
    .language-dropdown-new {
        min-width: 160px;
    }
    
    .language-option-new {
        padding: 0.7rem 1rem;
        gap: 0.6rem;
    }
    
    .language-option-new .language-flag-new {
        width: 18px;
        height: 14px;
    }
    
    .language-text-new {
        font-size: 0.85rem;
    }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
    .language-selector {
        display: none; /* Ocultar em mobile - usar menu hamburger */
    }
}

/* === MOBILE LANGUAGE SELECTOR === */
.mobile-language-selector-new {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid rgba(159, 239, 174, 0.2);
    margin-top: 1rem;
}

.mobile-language-btn-new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(159, 239, 174, 0.05) 100%);
    border: 2px solid var(--cyan-blue);
    border-radius: 12px;
    color: var(--cyan-blue);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    max-width: 280px;
    backdrop-filter: blur(10px);
}

.mobile-language-btn-new:hover {
    background: var(--neon-green);
    color: var(--black-solid);
    border-color: var(--neon-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 239, 174, 0.4);
}

.mobile-language-dropdown-new {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 280px;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(159, 239, 174, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.mobile-language-dropdown-new.active {
    display: flex;
}

.mobile-language-option-new {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--cyan-blue);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-language-option-new:hover {
    background: var(--neon-green);
    color: var(--black-solid);
    transform: translateX(10px);
}

.mobile-language-option-new .language-flag-new {
    width: 24px;
    height: 18px;
}

.mobile-language-text-new {
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .mobile-language-selector-new {
        display: flex;
    }
}

/* === ANIMAÇÕES === */
@keyframes flagWave {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(1deg); }
}

.language-flag-new:hover {
    animation: flagWave 0.6s ease-in-out;
}

/* === ACESSIBILIDADE === */
.language-btn-new:focus,
.language-option-new:focus,
.mobile-language-btn-new:focus,
.mobile-language-option-new:focus {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
}

/* === ESTADOS ATIVOS === */
.language-option-new.active {
    background: rgba(159, 239, 174, 0.2);
    color: var(--neon-green);
}

.mobile-language-option-new.active {
    background: rgba(159, 239, 174, 0.2);
    color: var(--neon-green);
}
