/* ============================================
   THEME TOGGLE - Dark/Light Mode Switch
   ============================================ */

/* Theme Toggle Container */
.tl-theme-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    background: rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    padding: 0.125rem;
    border: 1px solid #d1d5db;
    transition: var(--tl-transition-base);
}

@media (min-width: 640px) {
    .tl-theme-toggle-container {
        gap: 0.25rem;
        padding: 0.25rem;
    }
}

/* Individual Toggle Buttons */
.tl-theme-toggle-btn {
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .tl-theme-toggle-btn {
        padding: 0.375rem;
    }
}

.tl-theme-toggle-btn:hover {
    color: var(--tl-gold);
    background: rgba(209, 213, 219, 0.5);
}

/* Active Button State */
.tl-theme-toggle-btn.active {
    background: var(--tl-gold);
    color: #000;
}

/* SVG Icons */
.tl-theme-toggle-btn svg {
    width: 0.875rem;
    height: 0.875rem;
}

@media (min-width: 640px) {
    .tl-theme-toggle-btn svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Hide inactive button icon (optional animation) */
.tl-theme-toggle-btn:not(.active) {
    opacity: 0.7;
}

.tl-theme-toggle-btn.active {
    opacity: 1;
}

/* ============================================
   DARK MODE STYLES
   ============================================ */
body.dark-theme .tl-theme-toggle-container,
body[data-theme="dark"] .tl-theme-toggle-container {
    background: rgba(31, 41, 55, 0.8);
    border-color: #374151;
}

body.dark-theme .tl-theme-toggle-btn,
body[data-theme="dark"] .tl-theme-toggle-btn {
    color: #9ca3af;
}

body.dark-theme .tl-theme-toggle-btn:hover,
body[data-theme="dark"] .tl-theme-toggle-btn:hover {
    color: var(--tl-gold);
    background: rgba(55, 65, 81, 0.5);
}

body.dark-theme .tl-theme-toggle-btn.active,
body[data-theme="dark"] .tl-theme-toggle-btn.active {
    background: var(--tl-gold);
    color: #000;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.tl-theme-toggle-btn:focus-visible {
    outline: 2px solid var(--tl-gold);
    outline-offset: 2px;
}

/* Smooth transitions */
.tl-theme-toggle-btn,
.tl-theme-toggle-container {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
