/* Language Switcher Styling - Mobile-Optimiert */

/* Container und Wrapper - kompakt */
.cta-language-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

/* Language Switcher Container */
.header-language-switcher,
.mobile-language-switcher {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    padding: 0.2rem;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    box-shadow: none;
    transition: var(--transition);
}

.header-language-switcher:hover,
.mobile-language-switcher:hover {
    border-color: var(--gray-300);
    box-shadow: none;
}

/* Language Buttons */
.header-lang-btn {
    position: relative;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    /* Wichtig für besseres Touch-Feedback */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.header-lang-btn:hover {
    transform: scale(1.15);
    border-color: transparent;
    box-shadow: none;
}

.header-lang-btn.active {
    border-color: transparent;
    background: rgba(5, 245, 189, 0.15);
    box-shadow: 0 0 0 2px rgba(5, 245, 189, 0.3);
}

.header-lang-btn:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(5, 245, 189, 0.2);
}

/* Flag Icons */
.flag-icon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    display: block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    pointer-events: none;
}

.header-lang-btn:hover .flag-icon {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Desktop Anpassungen */
@media (min-width: 969px) {
    .mobile-language-switcher {
        display: none !important;
    }
}

/* Mobile Anpassungen */
@media (max-width: 968px) {
    /* Desktop Language Switcher auf Mobile */
    .cta-language-wrapper {
        flex-direction: column;
        gap: var(--space-sm);
        width: 100%;
    }
    
    .header-language-switcher {
        width: auto;
        justify-content: center;
        padding: 0.375rem;
        gap: 0.5rem;
    }
    
    /* Mobile Language Switcher im Menü */
    .mobile-language-switcher {
        padding: 0.5rem;
        gap: 0.625rem;
        justify-content: center;
        width: 100%;
        border: 2px solid var(--gray-200);
        background: var(--gray-50);
    }
    
    /* Größere Touch-Targets auf Mobile */
    .header-lang-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px;
        min-height: 44px;
    }
    
    .flag-icon {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Aktiver State auf Mobile deutlicher */
    .header-lang-btn.active {
        background: rgba(5, 245, 189, 0.25);
        box-shadow: 0 0 0 3px rgba(5, 245, 189, 0.4);
        transform: scale(1.05);
    }
    
    /* Hover-Effekt auf Mobile */
    .header-lang-btn:active {
        transform: scale(0.95);
        background: rgba(5, 245, 189, 0.2);
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 968px) {
    .header-language-switcher {
        padding: 0.5rem;
        gap: 0.625rem;
    }
    
    .header-lang-btn {
        width: 36px !important;
        height: 36px !important;
    }
    
    .flag-icon {
        width: 24px !important;
        height: 24px !important;
    }
}

/* Sehr kleine Screens */
@media (max-width: 480px) {
    .header-lang-btn {
        width: 48px !important;
        height: 48px !important;
    }
    
    .flag-icon {
        width: 32px !important;
        height: 32px !important;
    }
    
    .mobile-language-switcher {
        gap: 0.75rem;
        padding: 0.625rem;
    }
}

/* Loading State */
.header-lang-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.header-lang-btn[disabled]:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

/* Transition für Language Change */
.header-lang-btn.changing {
    animation: langChange 0.3s ease-in-out;
}

@keyframes langChange {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Accessibility: Focus Visible */
.header-lang-btn:focus-visible {
    outline: 3px solid var(--primary-orange);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .header-lang-btn {
        border: 2px solid currentColor;
    }
    
    .header-lang-btn.active {
        border-width: 3px;
        background: var(--primary-orange);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .header-lang-btn,
    .flag-icon,
    .header-language-switcher,
    .mobile-language-switcher {
        transition: none !important;
        animation: none !important;
    }
    
    .header-lang-btn:hover,
    .header-lang-btn:active {
        transform: none !important;
    }
}

/* Print Styles */
@media print {
    .header-language-switcher,
    .mobile-language-switcher {
        display: none !important;
    }
}
