/* Language Switcher Buttons Styles */
.language-switcher-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-button-form {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.language-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none;
    min-width: 60px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    color: white;
}

.language-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
    color: white;
}

.language-btn:active {
    transform: translateY(0);
}

.language-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.language-btn.active:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.language-flag {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.language-code {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Hover effects for flags */
.language-btn:hover .language-flag {
    transform: scale(1.1);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile responsive design */
@media (max-width: 768px) {
    .language-switcher-buttons {
        top: 15px;
        right: 15px;
        gap: 6px;
    }

    .language-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 50px;
        gap: 4px;
    }

    .language-flag {
        font-size: 14px;
    }

    .language-code {
        font-size: 10px;
    }
}

/* Small screens - stack vertically */
@media (max-width: 480px) {
    .language-switcher-buttons {
        flex-direction: column;
        top: 10px;
        right: 10px;
        gap: 4px;
    }

    .language-btn {
        padding: 6px 8px;
        font-size: 11px;
        min-width: 45px;
        gap: 3px;
    }

    .language-flag {
        font-size: 12px;
    }

    .language-code {
        font-size: 9px;
    }
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    .language-btn {
        background: rgba(17, 24, 39, 0.8);
        border-color: rgba(255, 255, 255, 0.15);
        color: #e5e7eb;
    }

    .language-btn:hover {
        background: rgba(17, 24, 39, 0.9);
        border-color: rgba(255, 255, 255, 0.25);
        color: #f3f4f6;
    }

    .language-btn.active {
        background: rgba(59, 130, 246, 0.3);
        border-color: rgba(59, 130, 246, 0.4);
        color: #bfdbfe;
    }

    .language-btn.active:hover {
        background: rgba(59, 130, 246, 0.4);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .language-btn {
        border: 2px solid rgba(255, 255, 255, 0.8);
        background: rgba(0, 0, 0, 0.7);
    }

    .language-btn:hover,
    .language-btn:focus {
        background: rgba(0, 123, 255, 0.8);
        border-color: #ffffff;
        outline: 2px solid #ffffff;
    }

    .language-btn.active {
        background: rgba(0, 123, 255, 0.9);
        border-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .language-btn,
    .language-flag {
        transition: none;
    }

    .language-btn:hover {
        transform: none;
    }

    .language-btn:hover .language-flag {
        transform: none;
    }
}

/* Print styles */
@media print {
    .language-switcher-buttons {
        display: none;
    }
}

/* Additional positioning utilities for different page layouts */
.language-switcher-buttons.top-right {
    position: fixed;
    top: 20px;
    right: 20px;
}

.language-switcher-buttons.top-left {
    position: fixed;
    top: 20px;
    left: 20px;
}

.language-switcher-buttons.inline {
    position: static;
    display: inline-flex;
}

/* Animation for initial load */
.language-switcher-buttons {
    animation: fadeInFromTop 0.5s ease-out;
}

@keyframes fadeInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .language-switcher-buttons {
        animation: none;
    }
}
