/* Theme Toggle CSS for PrimetimePokemon Theme
 * Contains styles for the dark/light mode toggle
 */

.theme-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #121212 0%, #3a3a45 100%);
    transition: 0.4s;
    border-radius: 34px;
}

.theme-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.theme-toggle input:checked + .theme-toggle-slider {
    background: linear-gradient(135deg, var(--type-electric) 0%, var(--type-fire) 100%);
}

.theme-toggle input:focus + .theme-toggle-slider {
    box-shadow: 0 0 1px var(--type-electric);
}

.theme-toggle input:checked + .theme-toggle-slider:before {
    transform: translateX(26px);
}

.theme-toggle-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    box-sizing: border-box;
    pointer-events: none;
}

.theme-toggle-icons i {
    font-size: 12px;
    color: white;
}

/* Accessibility focus styles */
.theme-toggle input:focus-visible + .theme-toggle-slider {
    outline: 3px solid var(--type-electric);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .theme-toggle-slider,
    .theme-toggle-slider:before {
        transition: none;
    }
}

/* Hover effects */
.theme-toggle:hover .theme-toggle-slider {
    opacity: 0.9;
}

/* Active state */
.theme-toggle:active .theme-toggle-slider:before {
    width: 22px;
}

/* Animation for theme transition */
.theme-transition * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .theme-transition * {
        transition: none !important;
    }
}
