/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.language-toggle {
    background: #313244;
    border: 1px solid #45475a;
    color: #cdd6f4;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    min-width: 120px;
}

.language-toggle:hover {
    background: #45475a;
    border-color: #89b4fa;
}

.language-switcher.active .language-toggle {
    background: #89b4fa;
    color: #1e1e2e;
    border-color: #89b4fa;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #313244;
    border: 1px solid #45475a;
    border-radius: 6px;
    margin-top: 4px;
    padding: 4px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 200px;
    overflow-y: auto;
}

.language-switcher.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    margin: 0;
}

.language-option a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #cdd6f4;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.language-option a:hover {
    background: #45475a;
    color: #89b4fa;
}

.language-option.active a {
    background: #89b4fa;
    color: #1e1e2e;
}

.language-option.active a:hover {
    background: #7aa2f7;
}

/* RTL Support */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .language-switcher {
    text-align: right;
}

.rtl .language-dropdown {
    left: auto;
    right: 0;
}

/* Language Notification */
.language-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #313244;
    color: #cdd6f4;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #89b4fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.language-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.language-notification.error {
    border-left-color: #f38ba8;
}

.rtl .language-notification {
    right: auto;
    left: 20px;
    border-left: none;
    border-right: 4px solid #89b4fa;
}

.rtl .language-notification.error {
    border-right-color: #f38ba8;
}

/* Loading state */
.language-toggle .loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-toggle {
        min-width: 100px;
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .language-dropdown {
        max-height: 150px;
    }
    
    .language-option a {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .language-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        right: 10px;
    }
    
    .rtl .language-notification {
        left: 10px;
        right: 10px;
    }
}
