/* Language Switcher Styles - Standalone File */
.lang-switcher-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 15px;
    z-index: 10;
}

.lang-switcher {
    display: flex;
    border-radius: 30px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 2px;
    transition: all 0.3s ease;
}

.lang-switcher:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.lang-btn {
    display: block;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: #ffffff;
    background-color: transparent;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 40px;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lang-btn.active-lang {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lang-btn.active-lang::before {
    display: none;
}

/* Focus states for accessibility */
.lang-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* RTL Support */
[dir="rtl"] .lang-switcher-container {
    margin-left: 0;
    margin-right: 15px;
}

/* Media Queries for Language Switcher Responsive Design */

/* Mobile Portrait (max-width: 600px) */
@media (max-width: 600px) {
    .lang-switcher-container {
        position: fixed;
        bottom: 20px;
        right: 20px;
        margin-left: 0;
        z-index: 100;
    }
    
    .lang-switcher {
        padding: 3px;
        background-color: rgba(17, 17, 17, 0.9);
        border: 1px solid rgba(183, 150, 50, 0.5);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }
    
    .lang-btn {
        padding: 8px 12px;
        font-weight: 600;
        font-size: 13px;
        min-width: 38px;
    }
    
    .lang-btn.active-lang {
        background-color: var(--primary-color);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }
    
    /* RTL Support */
    [dir="rtl"] .lang-switcher-container {
        right: auto;
        left: 20px;
        margin-right: 0;
    }
}

/* Mobile Landscape (601px - 768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .lang-switcher-container {
        position: relative;
        margin-left: 12px;
    }
    
    .lang-switcher {
        padding: 2px;
    }
    
    .lang-btn {
        padding: 7px 14px;
        font-size: 13px;
        min-width: 38px;
    }
    
    /* RTL Support */
    [dir="rtl"] .lang-switcher-container {
        margin-left: 0;
        margin-right: 12px;
    }
}

/* Tablet Portrait (769px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .lang-switcher-container {
        position: relative;
        margin-left: 14px;
    }
    
    .lang-btn {
        padding: 8px 15px;
        font-size: 14px;
        min-width: 40px;
    }
    
    /* RTL Support */
    [dir="rtl"] .lang-switcher-container {
        margin-left: 0;
        margin-right: 14px;
    }
}

/* Tablet Landscape and Small Desktop (993px - 1200px) */
@media (min-width: 993px) and (max-width: 1200px) {
    .lang-switcher-container {
        position: relative;
        margin-left: 15px;
    }
    
    .lang-btn {
        padding: 8px 16px;
        font-size: 14px;
        min-width: 40px;
    }
    
    /* RTL Support */
    [dir="rtl"] .lang-switcher-container {
        margin-left: 0;
        margin-right: 15px;
    }
}

/* Large Desktop (1201px and above) */
@media (min-width: 1201px) {
    .lang-switcher-container {
        position: relative;
        margin-left: 15px;
    }
    
    /* RTL Support */
    [dir="rtl"] .lang-switcher-container {
        margin-left: 0;
        margin-right: 15px;
    }
}

/* Landscape-specific adjustments */
@media (max-width: 992px) and (orientation: landscape) {
    .lang-switcher-container {
        position: fixed;
        top: 15px;
        right: 15px;
        margin-left: 0;
        z-index: 100;
    }
    
    .lang-switcher {
        padding: 2px;
        background-color: rgba(17, 17, 17, 0.9);
        border: 1px solid rgba(183, 150, 50, 0.5);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 35px;
    }
    
    /* RTL Support */
    [dir="rtl"] .lang-switcher-container {
        right: auto;
        left: 15px;
        margin-right: 0;
    }
}

/* High-resolution devices */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .lang-btn {
        border-radius: 30px;
    }
}

/* Print styles */
@media print {
    .lang-switcher-container {
        display: none;
    }
}

/* Animation for language switcher when page loads */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-switcher-container {
    animation: fadeInUp 0.5s ease-out;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lang-switcher {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .lang-btn {
        color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .lang-switcher,
    .lang-btn,
    .lang-btn::before {
        transition: none;
    }
    
    .lang-switcher-container {
        animation: none;
    }
}