/**
 * Language Switcher Styles
 * 
 * Provides styling for the language selector in the header
 * Responsive and accessible design
 */

:root {
    --lang-switcher-bg: rgba(255, 255, 255, 0.1);
    --lang-switcher-bg-hover: rgba(255, 255, 255, 0.2);
    --lang-switcher-text: #ffffff;
    --lang-switcher-text-active: #eeb735;
    --lang-switcher-border: rgba(255, 255, 255, 0.3);
    --lang-switcher-border-active: #eeb735;
    --lang-switcher-transition: all 0.3s ease;
}

/* Language Switcher Container */
#lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--lang-switcher-bg);
    border-radius: 25px;
    padding: 3px;
    border: 1px solid var(--lang-switcher-border);
    margin-left: 20px;
    position: relative;
}

/* Language Buttons */
#lang-switcher button {
    background: transparent;
    border: none;
    color: var(--lang-switcher-text);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--lang-switcher-transition);
    outline: none;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

#lang-switcher button:hover {
    background: var(--lang-switcher-bg-hover);
}

#lang-switcher button:focus {
    outline: 2px solid rgba(238, 183, 53, 0.5);
    outline-offset: 2px;
}

#lang-switcher button.active,
#lang-switcher button[aria-pressed="true"] {
    background: rgba(238, 183, 53, 1);
    color: #000000;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(238, 183, 53, 0.3);
}

/* Separator between buttons */
#lang-switcher button:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background: var(--lang-switcher-border);
    opacity: 0.5;
}

#lang-switcher button.active::after,
#lang-switcher button[aria-pressed="true"]::after {
    display: none;
}

/* When navbar is scrolling (sticky state) */

.navbar.is-scrolling #lang-switcher button.active,
.navbar.is-scrolling #lang-switcher button[aria-pressed="true"] {
    color: #000000;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #lang-switcher {
        margin-left: 10px;
        padding: 2px;
    }
    
    #lang-switcher button {
        font-size: 11px;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {
    #lang-switcher {
        margin-left: 5px;
        padding: 2px;
    }
    
    #lang-switcher button {
        font-size: 10px;
        padding: 4px 10px;
    }
}

/* Accessibility: High Contrast Mode */
@media (prefers-contrast: high) {
    #lang-switcher {
        border: 2px solid var(--lang-switcher-border);
    }
    
    #lang-switcher button.active,
    #lang-switcher button[aria-pressed="true"] {
        border: 2px solid #000000;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    #lang-switcher button {
        transition: none;
    }
}

/* Loading state (optional) */
#lang-switcher.loading {
    opacity: 0.6;
    pointer-events: none;
}

#lang-switcher.loading button {
    cursor: wait;
}

/* Alternative inline style (if needed) */
.lang-switcher-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lang-switcher-inline .lang-label {
    font-size: 12px;
    color: var(--lang-switcher-text);
    margin-right: 5px;
}

.lang-switcher-inline button {
    background: transparent;
    border: 1px solid var(--lang-switcher-border);
    color: var(--lang-switcher-text);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--lang-switcher-transition);
}

.lang-switcher-inline button:hover {
    background: var(--lang-switcher-bg-hover);
}

.lang-switcher-inline button.active {
    background: rgba(238, 183, 53, 1);
    color: #000000;
    border-color: rgba(238, 183, 53, 1);
}

/* Integration with existing navbar styles */
#main-navbar #lang-switcher {
    float: right;
    margin-right: 15px;
    margin-top: 5px;
}

/* Ensure proper alignment in flex containers */
.navbar .container #lang-switcher {
    display: inline-flex;
    vertical-align: middle;
}

