/* ===== LANGUAGE TOGGLE FLAGS ===== */

/* Flag Container */
.flag-container {
    position: relative;
    width: 24px;
    height: 16px;
    margin-right: 8px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Saudi Arabia Flag */
.sa-flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    display: none;
}

/* UK Flag */
.uk-flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    display: flex;
}

/* Language Toggle Button Updates */
.lang-toggle {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--neutral-dark);
    padding: 8px 12px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    min-width: 80px;
    justify-content: center;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lang-toggle:active {
    transform: translateY(0);
}

/* Language States - Updated Logic */
[dir="rtl"] .lang-toggle .sa-flag {
    display: none;
}

[dir="rtl"] .lang-toggle .uk-flag {
    display: flex;
}

[dir="ltr"] .lang-toggle .sa-flag {
    display: flex;
}

[dir="ltr"] .lang-toggle .uk-flag {
    display: none;
}

/* Responsive Design for Flags */
@media (max-width: 768px) {
    .flag-container {
        width: 20px;
        height: 14px;
        margin-right: 6px;
    }
    
    .lang-toggle {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .flag-container {
        width: 18px;
        height: 12px;
        margin-right: 4px;
    }
    
    .lang-toggle {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 60px;
    }
}

/* Animation for Language Toggle */
.lang-toggle .fas.fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 10px;
    opacity: 0.7;
}

.lang-toggle:hover .fas.fa-chevron-down {
    transform: rotate(180deg);
    opacity: 1;
}

/* Flag Animation */
.flag-container {
    transition: transform 0.3s ease;
}

.lang-toggle:hover .flag-container {
    transform: scale(1.1);
}
