/* =============================================
   Atom Language Switcher v1.0.0
   ============================================= */

@media (max-width: 600px) {
    html[lang^="fa"] .atom-lang-dropdown {
        right: auto !important;
        left: 5px !important;
    }
}

.atom-lang-wrap {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
}

.atom-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    font-weight: 600;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 6px 12px;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}

.atom-lang-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.atom-lang-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.atom-lang-btn img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.atom-lang-arrow {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.atom-lang-wrap.open .atom-lang-arrow {
    transform: rotate(180deg);
}

/* ── Dropdown ── */
.atom-lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(20, 20, 20, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    min-width: 150px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    z-index: 9999;
}

.atom-lang-wrap.open .atom-lang-dropdown {
    display: block;
}

/* ── آیتم‌های زبان ── */
.atom-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
}

.atom-lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.atom-lang-option:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
}

.atom-lang-option.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.atom-lang-option img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}