/**
 * El Shorbagy - Language Switcher Styles
 */

/* Language Switcher Container */
.language-switcher {
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
}

/* Language Toggle Button - Premium Elegant Design */
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #e11616 0%, #e11616 100%);
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 4px 15px rgb(62, 59, 59);
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 148, 29, 0.45);
}

.lang-btn:active {
    transform: translateY(0) scale(0.98);
}

.lang-btn i {
    font-size: 15px;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.lang-btn:hover i {
    transform: rotate(15deg);
}

.lang-btn-text {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Header Integration - Style 1 (Main Menu) */
.mainmenu-area .language-switcher {
    margin-left: 15px;
}

.mainmenu-area .lang-btn {
    padding: 8px 16px;
    font-size: 12px;
}

/* Header Integration - Style 2 (index.php compact header) */
.main-menu.style-2 .language-switcher {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Navigation Bar Language Button */
.nav-lang-switcher {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Mobile Menu Language Switcher */
.mobile-lang-switcher {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.mobile-lang-switcher .lang-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 15px;
    background: linear-gradient(135deg, #e11616 0%, #e11616 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(247, 148, 29, 0.3);
}

.mobile-lang-switcher .lang-btn i {
    color: #ffffff;
}

.mobile-lang-switcher .lang-btn:hover {
    background: linear-gradient(135deg, #e11616 0%, #e11616 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 148, 29, 0.45);
}

/* Header with Language Button */
.header-with-lang {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Desktop Header Right Area */
.header-right-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Compact Language Button for header */
.lang-btn-compact {
    padding: 6px 16px;
    font-size: 12px;
    gap: 8px;
    box-shadow: 0 3px 12px rgba(247, 148, 29, 0.25);
}

.lang-btn-compact i {
    font-size: 13px;
}

/* Language Flag Icons (if needed) */
.lang-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}

/* Inline Language Toggle */
.lang-toggle-inline {
    display: inline-flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 4px;
}

.lang-toggle-inline .lang-option {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}

.lang-toggle-inline .lang-option.active {
    background: #dc2626;
    color: #fff;
}

.lang-toggle-inline .lang-option:hover:not(.active) {
    color: #dc2626;
}

/* RTL Adjustments */
html[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 20px;
}

html[dir="rtl"] .mainmenu-area .language-switcher {
    margin-left: 0;
    margin-right: 15px;
}

html[dir="rtl"] .main-menu.style-2 .language-switcher {
    right: auto;
    left: 15px;
}

html[dir="rtl"] .lang-btn {
    flex-direction: row-reverse;
}

/* Responsive */
@media (max-width: 991px) {
    .language-switcher {
        margin-left: 10px;
    }

    .lang-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .main-menu.style-2 .language-switcher {
        position: static;
        transform: none;
    }
}

@media (max-width: 767px) {

    .header-area .language-switcher,
    .mainmenu-area .language-switcher {
        display: none;
    }

    .mobile-lang-switcher {
        display: block;
    }
}

/* Animation for language switch */
@keyframes langPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.lang-btn.switching {
    animation: langPulse 0.3s ease;
}