/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */

.theme-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 4px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

.theme-toggle-slider {
    position: absolute;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

[data-theme="light"] .theme-toggle-slider {
    transform: translateX(28px);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.theme-toggle-icon {
    position: absolute;
    font-size: 0.875rem;
    transition: opacity 0.2s ease;
}

.theme-toggle-icon.sun {
    left: 8px;
    opacity: 0.5;
}

.theme-toggle-icon.moon {
    right: 8px;
    opacity: 0.5;
}

[data-theme="light"] .theme-toggle-icon.sun {
    opacity: 1;
}

[data-theme="dark"] .theme-toggle-icon.moon,
:root:not([data-theme]) .theme-toggle-icon.moon {
    opacity: 1;
}

/* Mobile theme toggle */
@media (max-width: 1024px) {
    .theme-toggle {
        width: 56px;
        height: 30px;
    }

    .theme-toggle-slider {
        width: 22px;
        height: 22px;
    }

    [data-theme="light"] .theme-toggle-slider {
        transform: translateX(26px);
    }
}