/* Language Selector Styles for CRM Loyalty Page */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999 !important;
    display: block !important;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown .language-btn {
    background: rgba(15, 29, 41, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.language-dropdown .language-btn:hover {
    background: rgba(15, 29, 41, 1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.language-dropdown .language-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 144, 220, 0.3);
}

.language-dropdown .language-btn i:first-child {
    margin-right: 8px;
    color: #3b82f6;
}

.language-dropdown .language-btn i:last-child {
    margin-left: 8px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.language-dropdown.show .language-btn i:last-child {
    transform: rotate(180deg);
}

.language-menu {
    background: rgba(15, 29, 41, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px 0;
    margin-top: 5px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 140px;
}

.language-menu .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}

.language-menu .dropdown-item:hover {
    background: rgba(52, 144, 220, 0.2);
    color: white;
    transform: translateX(4px);
}

.language-menu .dropdown-item:focus {
    outline: none;
    background: rgba(52, 144, 220, 0.2);
    color: white;
}

.language-menu .dropdown-item.active {
    background: rgba(52, 144, 220, 0.3);
    color: #3b82f6;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .language-selector {
        top: 10px;
        right: 10px;
    }
    
    .language-dropdown .language-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .language-menu {
        min-width: 120px;
    }
    
    .language-menu .dropdown-item {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Animation for smooth language switching */
[data-translate] {
    transition: opacity 0.3s ease-in-out;
}

.language-switching [data-translate] {
    opacity: 0.7;
}

/* Toast notification styles (if not already included) */
.jq-toast-wrap {
    z-index: 1050 !important;
}

.jq-toast-single {
    border-radius: 8px !important;
    font-family: inherit !important;
}

.jq-toast-single h2 {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
}

.jq-toast-single .jq-toast-text {
    font-size: 0.9rem !important;
}

/* Language switcher integration with navbar */
@media (min-width: 992px) {
    .navbar-dark ~ .language-selector {
        top: 15px;
        right: 15px;
    }
}

/* Accessibility improvements */
.language-dropdown .language-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.language-menu .dropdown-item:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .language-dropdown .language-btn {
        border-color: white;
        background: #000;
    }
    
    .language-menu {
        border-color: white;
        background: #000;
    }
    
    .language-menu .dropdown-item {
        color: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .language-dropdown .language-btn,
    .language-menu .dropdown-item,
    [data-translate] {
        transition: none;
    }
}