@import url("https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.2.3/css/flag-icons.min.css");

/* Language Switcher Component */
.language-switcher {
    position: relative;
    display: inline-block;
    z-index: 1201;
    /* Ensure it's above other header elements */
}

.language-switcher-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: all 0.2s ease;
}

.language-switcher-btn:hover {
    background: #f8f9fa;
    border-color: #ff6b35;
}

.language-switcher-btn .fa-globe {
    color: #ff6b35;
    font-size: 16px;
}

.language-switcher-btn .fa-chevron-down {
    font-size: 12px;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.language-switcher-btn.active .fa-chevron-down {
    transform: rotate(180deg);
}

.current-lang-name {
    font-weight: 500;
}

/* Language Dropdown */
.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 9999;
    /* High z-index to ensure visibility above all content */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #495057;
    text-decoration: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: #f8f9fa;
}

.language-option.active {
    background: #fff3e0;
    color: #ff6b35;
    font-weight: 600;
}

.language-option .fas.fa-flag,
.language-option .fas.fa-flag-usa,
.language-option .fi {
    font-size: 14px;
    width: 18px;
    height: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.language-option .fas.fa-flag,
.language-option .fas.fa-flag-usa {
    color: #6c757d;
}

.language-option.active .fas.fa-flag,
.language-option.active .fas.fa-flag-usa {
    color: #ff6b35;
}

.lang-native-name {
    flex: 1;
    font-size: 14px;
}

.active-check {
    font-size: 14px;
    color: #ff6b35;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .language-switcher-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .current-lang-name {
        display: none;
        /* Hide text on mobile, show only globe icon */
    }

    .language-dropdown {
        right: 0;
        min-width: 160px;
    }

    .language-option {
        padding: 8px 12px;
    }
}