/* Language Switcher Styles */
.language-switcher-menu {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

.language-switcher-current {
    position: relative;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.language-toggle:hover,
.language-toggle:focus {
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
}

.language-toggle[aria-expanded="true"] .language-arrow {
    transform: rotate(180deg);
}

.language-flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.language-arrow {
    width: 10px;
    height: 6px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

/* Dropdown styles */
.language-switcher-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 8px 0;
    margin: 4px 0 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
}

.language-switcher-current:hover .language-switcher-dropdown,
.language-switcher-current:focus-within .language-switcher-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-switcher-dropdown li {
    margin: 0;
}

.language-switcher-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.language-switcher-dropdown a:hover,
.language-switcher-dropdown a:focus {
    background-color: #f5f5f5;
}

/* Current language in dropdown */
.language-switcher-dropdown .menu-item-language-current a {
    font-weight: bold;
    color: #000;
}

/* Ensure the current language button doesn't look like a link */
.language-switcher-current > a {
    pointer-events: none;
    cursor: default;
    text-decoration: none !important;
    color: inherit !important;
    background: none !important;
}

/* Style the button to look like the rest of the menu */
.language-toggle {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: left;
}

/* Remove default button styles */
.language-toggle:focus {
    outline: none;
}

/* Responsive styles */
@media (max-width: 992px) {
    .language-switcher-dropdown {
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0;
        margin: 0 0 0 16px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    
    .language-switcher-current.active .language-switcher-dropdown {
        display: block;
    }
    
    .language-arrow {
        display: none;
    }
}
