/* ═══════════════════════════════════════════════
   Global Visa Way — Theme Switcher
═══════════════════════════════════════════════ */

.ts-fab {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: var(--n750);
    color: var(--page-text);
    cursor: pointer;
    z-index: var(--z-fab);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition:
        background-color var(--duration-fast) var(--ease-standard),
        transform var(--duration-fast) var(--ease-standard),
        box-shadow var(--duration-fast) var(--ease-standard);
}

.ts-fab:hover {
    background: var(--n700);
    transform: scale(1.08);
}

.ts-fab-icon {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: 20px;
    height: 20px;
    transition: transform var(--duration-normal) var(--ease-standard);
}

.ts-fab-open .ts-fab-icon {
    transform: rotate(45deg);
}

.ts-fab-icon span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ts-dot-1 {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ts-dot-2 { background: #F0A830; }
.ts-dot-3 { background: #4DD8CC; }
.ts-dot-4 { background: #C4830A; }

.ts-panel {
    position: fixed;
    bottom: 90px;
    left: 28px;
    width: 230px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: var(--n800);
    z-index: calc(var(--z-fab) - 1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition:
        opacity var(--duration-normal) var(--ease-standard),
        transform var(--duration-normal) var(--ease-standard),
        visibility var(--duration-normal) var(--ease-standard);
}

.ts-panel.ts-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.ts-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    border-radius: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.ts-panel-label {
    margin-bottom: 12px;
    color: var(--tm);
    font-family: var(--en);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ts-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 7px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
    font-family: var(--en);
    text-align: left;
    transition:
        background-color var(--duration-fast) var(--ease-standard),
        border-color var(--duration-fast) var(--ease-standard);
}

.ts-btn:last-child {
    margin-bottom: 0;
}

.ts-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.ts-btn.ts-active {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--gold);
}

.ts-swatches {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.ts-swatch-bg {
    width: 26px;
    height: 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px 4px 0 0;
}

.ts-swatch-ac {
    width: 26px;
    height: 7px;
    border-radius: 0 0 4px 4px;
}

.ts-swatch-bg--charcoal { background: #111827; }
.ts-swatch-ac--charcoal { background: #E8B84A; }
.ts-swatch-bg--warm { background: #1A1512; }
.ts-swatch-ac--warm { background: #F0A830; }
.ts-swatch-bg--ocean { background: #0D1F2D; }
.ts-swatch-ac--ocean { background: #4DD8CC; }
.ts-swatch-bg--light {
    background: #F5F0E8;
    border-color: rgba(0, 0, 0, 0.15);
}
.ts-swatch-ac--light { background: #C4830A; }

.ts-btn-info {
    flex: 1;
    min-width: 0;
}

.ts-btn-name {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--en);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.ts-btn-desc {
    overflow: hidden;
    color: var(--tm);
    font-family: var(--en);
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ts-tick {
    display: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
}

.ts-btn.ts-active .ts-tick {
    display: flex;
}

.ts-tick svg {
    width: 9px;
    height: 9px;
}

[dir="rtl"] .ts-fab,
[dir="rtl"] .ts-panel {
    right: 28px;
    left: auto;
}

@media (max-width: 639px) {
    .ts-fab {
        bottom: 20px;
        left: 16px;
    }

    .ts-panel {
        bottom: 82px;
        left: 16px;
        width: min(230px, calc(100vw - 32px));
    }

    [dir="rtl"] .ts-fab,
    [dir="rtl"] .ts-panel {
        right: 16px;
        left: auto;
    }
}
