/* ===================================
   Language Switcher Styles
   =================================== */

.language-switcher {
    position: relative;
    margin-left: 1rem;
    z-index: 1000;
}

/* Make sure button is visible */
.language-switcher .lang-test-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.lang-dropdown {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--white, white);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-test-btn {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #17c3b2, #06b6d4);
    border: none;
    border-radius: 10px;
    color: white !important;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(23, 195, 178, 0.4);
    white-space: nowrap;
    visibility: visible !important;
    opacity: 1 !important;
}

.lang-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 195, 178, 0.5);
    background: linear-gradient(135deg, #15b3a2, #05a6c4);
}

.lang-test-btn i {
    font-size: 1.1rem;
}

/* Make sure it's visible in header */
.header .language-switcher {
    display: block !important;
    visibility: visible !important;
}

.lang-flag {
    font-size: 1.2rem;
}

.lang-name {
    font-weight: 600;
}

.lang-current i {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.lang-dropdown.active .lang-current i {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    overflow: hidden;
}

.lang-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text, #1f2937);
    font-size: 0.9rem;
}

.lang-option:hover {
    background: #f3f4f6;
}

.lang-option.active {
    background: linear-gradient(135deg, var(--primary, #17c3b2), var(--secondary, #06b6d4));
    color: white;
}

.lang-option.active .lang-name {
    font-weight: 700;
}

.lang-option i {
    margin-right: auto;
    color: var(--primary, #17c3b2);
}

.lang-option.active i {
    color: white;
}

/* RTL Support */
[dir="rtl"] .lang-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .lang-option {
    text-align: left;
}

[dir="rtl"] .lang-option i {
    margin-left: auto;
    margin-right: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 0.5rem;
    }
    
    .lang-current {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .lang-name {
        display: none;
    }
    
    .lang-menu {
        min-width: 150px;
    }
}
