/* Language Switcher Styles */
.language-switcher {
    position: relative;
    margin-left: 20px;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.language-switcher .lang-dropdown .lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff !important;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 1050;
    /* Higher than modal */
    padding: 8px 0;
    margin-top: 10px;
    /* Visual gap */
    animation: slideDown 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Bridge to prevent menu closing */
.lang-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
}

.lang-dropdown:hover .lang-menu {
    display: block;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.lang-item:hover {
    background: #f5f5f5;
    color: #007bff;
}

.lang-item .fi {
    font-size: 1.2em;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-btn .fi {
    font-size: 1.2em;
    border-radius: 2px;
}

.arrow-down {
    font-size: 10px;
    opacity: 0.7;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RTL Adjustments for Switcher */
[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 20px;
}

[dir="rtl"] .lang-menu {
    right: auto;
    left: 0;
}