/* ============================================
   gameisfa — themes/theme-switcher.css
   استایل دکمه و منوی انتخاب پوسته (تم CSS).
   این فایل مستقل از تم فعال است و همیشه لود می‌شود،
   بنابراین با اضافه کردن تم جدید نیازی به تکرارش نیست.
   از متغیرهای CSS همون تمِ فعال استفاده می‌کنه تا خودش
   هم رنگ‌آمیزی‌اش با تم هماهنگ بمونه.
   ============================================ */

.theme-switcher {
    position: relative;
}

.theme-switcher-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    transition: var(--theme-transition, var(--transition)), transform 0.25s ease;
}

.theme-switcher-btn:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.theme-switcher-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 210px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 14px);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 500;
}

.theme-switcher-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.88rem;
    text-align: right;
    cursor: pointer;
    transition: var(--transition);
}

.theme-option:hover {
    background: var(--bg-card-hover);
}

.theme-option.active {
    background: var(--bg-card-hover);
    color: var(--primary-light);
    font-weight: 700;
}

.theme-swatch {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    box-shadow: 0 0 0 2px transparent;
}

.theme-option.active .theme-swatch {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3px currentColor;
}

.theme-option-check {
    margin-right: auto;
    font-size: 0.8rem;
    opacity: 0;
}

.theme-option.active .theme-option-check {
    opacity: 1;
}

@media (max-width: 768px) {
    .theme-switcher-menu {
        left: auto;
        right: 0;
        min-width: 190px;
    }
}
