/* Enhanced Language Switcher Styles */

/* Language notification popup */
.language-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    max-width: 350px;
    z-index: 1000;
    animation: slideInUp 0.3s ease-out;
}

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

.notification-content p {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.notification-actions {
    display: flex;
    gap: 10px;
}

.notification-actions .btn-yes {
    background: #f4a261;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.notification-actions .btn-yes:hover {
    background: #e38d4c;
}

.notification-actions .btn-no {
    background: #f3f4f6;
    color: #666;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.notification-actions .btn-no:hover {
    background: #e5e7eb;
}

/* Current language indicator */
.lang-option.current-lang {
    pointer-events: none;
    font-weight: 600;
}

/* Mobile language switcher */
.mobile-language-switcher {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    padding-top: 10px;
}

.mobile-lang-dropdown {
    position: relative;
}

.mobile-lang-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 8px 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    justify-content: space-between;
}

.mobile-lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.mobile-lang-toggle .flag {
    width: 20px;
    height: 20px;
}

.mobile-lang-toggle .lang-code {
    font-weight: 500;
}

.mobile-lang-toggle i {
    transition: transform 0.3s;
}

.mobile-lang-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.mobile-lang-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #2a4365;
    border-radius: 4px;
    margin-bottom: 5px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
}

.mobile-lang-menu.hidden {
    display: none;
}

.mobile-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.mobile-lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-lang-option.current {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.mobile-lang-option .flag {
    width: 20px;
    height: 20px;
}

/* Flag styles */
.flag {
    display: inline-block;
    width: 28px;
    height: 20px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    vertical-align: middle;
}

.flag-us {
    background-image: url('/images/flags/svg/us.svg');
}

.flag-fr {
    background-image: url('/images/flags/svg/fr.svg');
}

.flag-es {
    background-image: url('/images/flags/svg/es.svg');
}

.flag-de {
    background-image: url('/images/flags/svg/de.svg');
}

.flag-nl {
    background-image: url('/images/flags/svg/nl.svg');
}

.flag-it {
    background-image: url('/images/flags/svg/it.svg');
}

/* Accessibility improvements */
.lang-toggle:focus,
.mobile-lang-toggle:focus {
    outline: 2px solid #f4a261;
    outline-offset: 2px;
}

.lang-option:focus,
.mobile-lang-option:focus {
    outline: 2px solid #f4a261;
    outline-offset: -2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .language-notification {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .notification-actions {
        flex-direction: column;
    }
    
    .notification-actions .btn-yes,
    .notification-actions .btn-no {
        width: 100%;
        text-align: center;
    }
}