/* Language Switcher Styles */
#languageSwitcher {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Desktop: Language switcher in nav-secondary (no special styling needed) */
@media (min-width: 769px) {
    #languageSwitcher {
        /* No special positioning - it's in the normal flow */
    }
}

.lang-option {
    background: transparent;
    border: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 14px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-transform: uppercase;
    opacity: 0.7;
}

.lang-option:hover {
    opacity: 1;
    background: rgba(107, 94, 246, 0.1);
}

.lang-option.active {
    opacity: 1;
    color: var(--color-primary);
    background: rgba(107, 94, 246, 0.1);
}

.lang-separator {
    color: var(--color-text-secondary);
    opacity: 0.3;
    user-select: none;
}

/* Mobile language switcher - keep in navbar */
@media (max-width: 768px) {
    #languageSwitcher {
        margin-left: auto;
        margin-right: 10px;
        position: relative;
        top: auto;
        left: auto;
    }

    .lang-option {
        font-size: 12px;
        padding: 2px 6px;
    }
}

/* Language indicator in forms */
.language-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

/* RTL support (future-proofing) */
[dir="rtl"] {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

/* Language-specific adjustments */
html[lang="fr"] .legal-warning {
    /* French text might be longer */
    line-height: 1.6;
}

html[lang="nl"] .legal-warning {
    line-height: 1.5;
}

/* Smooth transition for language changes */
[data-i18n],
[data-i18n-placeholder],
[data-i18n-title],
[data-i18n-alt] {
    transition: opacity 0.2s ease;
}

.i18n-loading [data-i18n],
.i18n-loading [data-i18n-placeholder],
.i18n-loading [data-i18n-title],
.i18n-loading [data-i18n-alt] {
    opacity: 0.5;
}

/* Language flags (optional) */
.lang-flag {
    width: 20px;
    height: 14px;
    display: inline-block;
    margin-right: 4px;
    vertical-align: middle;
    border-radius: 2px;
    background-size: cover;
}

.lang-flag.nl {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5IDYiPjxwYXRoIGZpbGw9IiNhZTFjMjgiIGQ9Ik0wIDBoOXY2SDB6Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgMGg5djRIMHoiLz48cGF0aCBmaWxsPSIjMjE0NjhiIiBkPSJNMCAwaDl2MkgweiIvPjwvc3ZnPg==');
}

.lang-flag.fr {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5IDYiPjxwYXRoIGZpbGw9IiNlZDI5MzkiIGQ9Ik02IDBoM3Y2SDZ6Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTMgMGgzdjZIM3oiLz48cGF0aCBmaWxsPSIjMDAyMzk1IiBkPSJNMCAwaDN2NkgweiIvPjwvc3ZnPg==');
}

/* Language notification */
.lang-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.lang-notification.show {
    display: flex;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}