/* PublicOnion Language Switcher - Frontend Style */

/* Integration dans le menu */
.menu-item-language-switcher {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

#po-language-switcher-widget {
    position: relative;
    display: inline-block;
    z-index: 999;
    font-family: inherit;
    margin: 0;
}

.po-lang-toggle {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    min-width: 60px;
    justify-content: center;
    color: inherit;
    text-decoration: none;
    font-size: inherit;
}

/* Style similaire aux liens de menu */
.po-lang-toggle:hover {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}



.po-lang-icon {
    font-size: 16px;
    line-height: 1;
    color: var(--theme-palette-color-2);
}

.po-lang-current {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    text-transform: uppercase;
}

.po-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 160px;
    overflow: hidden;
}

.po-lang-dropdown > div {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #eee;
}

.po-lang-dropdown > div:last-child {
    border-bottom: none;
}

.po-lang-dropdown > div:hover {
    background: #f8f8f8;
}

.po-lang-dropdown > div.active {
    background: color-mix(in srgb, var(--theme-palette-color-2) 8%, transparent);
    color: var(--theme-palette-color-2);
}

.po-lang-code {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 24px;
    color: #666;
}

.po-lang-dropdown > div.active .po-lang-code {
    color: var(--theme-palette-color-2);;
}

.po-lang-label {
    font-size: 14px;
    color: #333;
    flex: 1;
}

.po-lang-dropdown > div.active .po-lang-label {
    color: var(--theme-palette-color-2);
    font-weight: 500;
}

/* Animation pour l'ouverture/fermeture */
.po-lang-dropdown {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.po-lang-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}



/* Responsive - s'ajuster sur mobile */
@media (max-width: 768px) {
    .po-lang-toggle {
        padding: 6px 8px;
        min-width: 50px;
    }
    
    .po-lang-dropdown {
        min-width: 120px;
        right: 0;
    }
    
    .po-lang-dropdown > div {
        padding: 8px 10px;
    }
}