/* ========================================
   🌍 Beautiful Language Switcher Styles
   ======================================== */

.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

/* Hide the default select element */
.lang-select {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
}

/* Custom styled language switcher */
.lang-display {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    min-width: auto;
    justify-content: center;
    backdrop-filter: blur(5px);
    position: relative;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.lang-display:hover {
    color: #007bff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.lang-display:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.15);
}

/* Language text styling */
.lang-text {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

/* Dropdown arrow */
.lang-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.lang-switcher:hover .lang-arrow {
    opacity: 1;
    transform: rotate(180deg);
}

/* Dropdown menu */
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 140px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher.dropdown-open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.lang-switcher.dropdown-open .lang-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.lang-option:hover {
    background: #f8f9fa;
    color: #007bff;
}

.lang-option.active {
    background: #007bff;
    color: white;
}

/* Smooth transitions for content changes */
.i18n-transition {
    transition: opacity 0.2s ease-in-out;
}

.i18n-transition.changing {
    opacity: 0.8;
}

/* Modern loading animation for language switch */
.lang-switching .lang-display {
    position: relative;
    overflow: hidden;
}

.lang-switching .lang-display::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1s ease-in-out;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ========================================
   📱 Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .lang-display {
        padding: 6px 10px;
        font-size: 13px;
        gap: 4px;
    }
    
    .lang-text {
        font-size: 13px;
    }
    
    .lang-dropdown {
        min-width: 120px;
    }
    
    .lang-option {
        padding: 10px 14px;
        font-size: 13px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .lang-display {
        padding: 4px 8px;
        font-size: 12px;
        gap: 3px;
        border-radius: 4px;
    }
    
    .lang-text {
        font-size: 12px;
    }
    
    .lang-arrow {
        font-size: 8px;
    }
    
    .lang-dropdown {
        min-width: 100px;
        border-radius: 4px;
    }
    
    .lang-option {
        padding: 8px 10px;
        font-size: 12px;
        gap: 6px;
    }
}

/* ========================================
   🌙 Dark Theme Support
   ======================================== */

@media (prefers-color-scheme: dark) {
    .lang-display {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e9ecef;
    }
    
    .lang-display:hover {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(0, 123, 255, 0.5);
        color: #fff;
    }
    
    .lang-dropdown {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .lang-option {
        color: #e9ecef;
    }
    
    .lang-option:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .lang-option.active {
        background: #007bff;
        color: white;
    }
}

/* ========================================
   ✨ Enhanced Animation Effects
   ======================================== */

/* Subtle glow effect on focus */
.lang-display:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
    outline: none;
}

/* Smooth scaling animation */
.lang-switcher {
    transform-origin: center;
    transition: transform 0.2s ease;
}

.lang-switcher:active {
    transform: scale(0.98);
}

/* Improved copy button styling with i18n support */
.copy-button.copied {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
    transform: scale(0.95) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

/* Navigation layout fixes */
.auth-navbar-nav,
.level-navbar-nav,
.feedback-navbar-nav {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.auth-navbar-nav li,
.level-navbar-nav li,
.feedback-navbar-nav li {
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

.auth-navbar-nav a,
.level-navbar-nav a,
.feedback-navbar-nav a {
    white-space: nowrap !important;
}

/* Language switcher integration styles */
.auth-navbar-nav .lang-switcher,
.level-navbar-nav .lang-switcher,
.feedback-navbar-nav .lang-switcher {
    margin-left: 15px;
    flex-shrink: 0;
}

/* Ensure auth button maintains consistent styling regardless of state */
#authButton {
    color: #6c757d !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
    cursor: pointer !important;
}

#authButton:hover {
    color: #007bff !important;
}

/* Simple text fallback when icons don't work */
.lang-text-fallback {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ensure proper z-index layering */
.lang-switcher {
    z-index: 1001;
}

.lang-dropdown {
    z-index: 1002;
}

/* Beta indicator styling */
.beta-indicator {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 8px;
    vertical-align: top;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    animation: subtle-pulse 2s infinite;
    position: relative;
    top: -2px;
}

@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* Responsive adjustments for beta indicator */
@media (max-width: 768px) {
    .beta-indicator {
        font-size: 9px;
        padding: 1px 4px;
        margin-left: 6px;
    }
}

@media (max-width: 480px) {
    .beta-indicator {
        font-size: 8px;
        padding: 1px 3px;
        margin-left: 4px;
    }
} 