/**
 * Language Switcher Styles
 * WPML Language Switcher Dropdown
 */

.language-switcher-wrapper {
    position: relative;
    margin-left: 20px;
    z-index: 2;
    flex-shrink: 0;
}

/* Hide WPML shortcode horizontal output - we use custom dropdown instead */
.language-switcher-wrapper .wpml-ls {
    display: none !important;
}

.language-switcher-wrapper .wpml-ls-statics-shortcode_actions {
    display: none !important;
}

.language-switcher-wrapper .wpml-ls-native,
.language-switcher-wrapper .wpml-ls-display {
    display: none !important;
}

.lang-switcher {
    position: relative;
}

.lang-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1;
    color: #333;
    min-width: 60px;
    justify-content: center;
}

.lang-switcher-toggle:hover {
    border-color: #EA5404;
    background: #fff;
}

.lang-switcher-toggle:focus {
    outline: 2px solid #EA5404;
    outline-offset: 2px;
}

.lang-flag {
    width: 20px !important;
    height: 15px !important;
    object-fit: cover;
    border-radius: 2px;
    display: block !important;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
}

.lang-code {
    font-weight: 500;
    font-size: 12px;
    color: #333;
}

.lang-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.3s ease;
    margin-left: 2px;
}

.lang-switcher-toggle[aria-expanded="true"] .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 1000;
    overflow: hidden;
}

.lang-dropdown li {
    margin: 0;
    padding: 0;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1.4;
}

.lang-item:hover {
    background: #f5f5f5;
    color: #EA5404;
}

.lang-item.active {
    background: #f0f0f0;
    font-weight: 500;
}

.lang-item .lang-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.lang-name {
    flex: 1;
}

.lang-check {
    color: #EA5404;
    font-weight: bold;
    margin-left: auto;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .language-switcher-wrapper {
        margin-right: 15px;
    }
    
    .lang-switcher-toggle {
        padding: 3px 6px;
        min-width: 50px;
    }
    
    .lang-flag {
        width: 18px;
        height: 13px;
    }
    
    .lang-code {
        font-size: 11px;
    }
    
    .lang-dropdown {
        min-width: 140px;
    }
    
    .lang-item {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 767.98px) {
    .language-switcher-wrapper {
        margin-right: 10px;
    }
    
    .lang-switcher-toggle {
        padding: 2px 5px;
        min-width: 45px;
    }
    
    .lang-flag {
        width: 16px;
        height: 12px;
    }
    
    .lang-code {
        font-size: 10px;
    }
    
    .lang-dropdown {
        right: auto;
        left: 0;
        min-width: 130px;
    }
}

