/* ===================================
   FIXED POSITION Language Switcher
   =================================== */

.fixed-language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.fixed-lang-current {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
    position: relative;
}

.fixed-lang-current:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.fixed-lang-current:active {
    transform: scale(0.95);
}

/* Pulse animation to draw attention */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.6);
    }
}

.fixed-lang-current {
    animation: pulse 2s ease-in-out infinite;
}

.fixed-lang-current:hover {
    animation: none;
}

/* Dropdown */
.fixed-lang-dropdown {
    position: absolute;
    top: 70px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.fixed-lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fixed-lang-option {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: #333;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.fixed-lang-option:last-child {
    border-bottom: none;
}

.fixed-lang-option:hover {
    background: #f8f9fa;
    padding-left: 25px;
}

.fixed-lang-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.fixed-lang-option.active::after {
    content: '✓';
    margin-left: auto;
    font-weight: bold;
}

.lang-text {
    flex: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .fixed-language-switcher {
        top: 10px;
        right: 10px;
    }
    
    .fixed-lang-current {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .fixed-lang-dropdown {
        top: 60px;
        min-width: 180px;
    }
    
    .fixed-lang-option {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* RTL Support */
[dir="rtl"] .fixed-language-switcher {
    right: auto;
    left: 20px;
}

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

[dir="rtl"] .fixed-lang-option {
    text-align: right;
}

@media (max-width: 768px) {
    [dir="rtl"] .fixed-language-switcher {
        left: 10px;
    }
}

/* Tooltip on hover */
.fixed-lang-current::before {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fixed-lang-current:hover::before {
    opacity: 1;
}

/* Arrow indicator */
.fixed-lang-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

[dir="rtl"] .fixed-lang-dropdown::before {
    right: auto;
    left: 20px;
}
