/* ============================================
   Mobile-Friendly Language Switcher
   ============================================ */

/* Fixed language button for mobile - bottom right corner */
.mobile-language-switcher {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 9998;
}

/* Show on mobile only */
@media (max-width: 991px) {
    .mobile-language-switcher {
        display: block;
    }

    /* Hide the desktop language switcher on mobile */
    .header-topbar .miniPopup-language-area {
        display: none !important;
    }
}

/* Language toggle button */
.mobile-language-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #002678, #21cdad);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 38, 120, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-language-btn:hover,
.mobile-language-btn:focus {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 38, 120, 0.5);
}

.mobile-language-btn i {
    color: white;
    font-size: 20px;
}

/* Language options panel */
.mobile-language-options {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.mobile-language-switcher.active .mobile-language-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-language-options a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.mobile-language-options a:hover {
    background: #f5f5f5;
}

.mobile-language-options a.active {
    background: linear-gradient(135deg, #002678, #21cdad);
    color: white;
}

.mobile-language-options img {
    width: 24px;
    height: 18px;
    margin-right: 12px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* RTL adjustment */
[dir="rtl"] .mobile-language-options img {
    margin-right: 0;
    margin-left: 12px;
}

[dir="rtl"] .mobile-language-switcher {
    right: auto;
    left: 20px;
}

/* Language name */
.mobile-language-options span {
    font-size: 14px;
    font-weight: 500;
}

/* First visit modal */
.language-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.language-modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.language-modal {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-modal h2 {
    color: #002678;
    font-size: 24px;
    margin-bottom: 10px;
}

.language-modal p {
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

.language-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.language-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.language-choice:hover {
    border-color: #21cdad;
    background: #f8fffe;
    transform: translateY(-2px);
}

.language-choice img {
    width: 30px;
    height: 22px;
    margin-right: 15px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.language-choice.primary {
    background: linear-gradient(135deg, #002678, #21cdad);
    color: white;
    border-color: transparent;
}

.language-choice.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 38, 120, 0.3);
}

/* Skip button */
.language-modal-skip {
    margin-top: 20px;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.language-modal-skip:hover {
    color: #666;
}