@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: 7px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #dde5ee;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #3c4c60;
    transition: all 0.2s ease;
}

.language-switcher-btn:hover {
    background: #fff;
    border-color: #2d7a8c;
    color: #2d7a8c;
}

.language-switcher-btn .fa-globe {
    color: #2d7a8c;
    font-size: 12px;
}

.language-switcher-btn .fa-chevron-down {
    font-size: 9px;
    color: #54637a;
    opacity: 0.7;
    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 #e7ebf0;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(18, 41, 63, 0.22);
    min-width: 132px;
    padding: 6px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.16s ease;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s ease;
    border-bottom: none;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: #f1f5f9;
    color: #12293f;
}

.language-option.active {
    background: #f1f5f9;
    color: #12293f;
    font-weight: 700;
}

.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: #2d7a8c;
}

/* 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;
    }
}