/**
 * Theme toggle switch styling
 */

.theme-toggle-wrapper {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1010;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

body.dark-theme .theme-toggle-wrapper {
    background-color: rgba(30, 30, 30, 0.7);
}

.theme-icon {
    margin: 0 5px;
    font-size: 1rem;
    color: #333;
}

body.dark-theme .theme-icon {
    color: #f0f0f0;
}

.sun-icon {
    color: #ff9500;
}

.moon-icon {
    color: #66b3ff;
}

/* The switch - the box around the slider */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 0 5px;
}

/* Hide default HTML checkbox */
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

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

input:checked + .slider {
    background-color: #4da6ff;
}

input:focus + .slider {
    box-shadow: 0 0 1px #4da6ff;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-toggle-wrapper {
        top: 10px;
        right: 10px;
        padding: 3px 8px;
    }
    
    .theme-switch {
        width: 40px;
        height: 20px;
    }
    
    .slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }
    
    input:checked + .slider:before {
        transform: translateX(20px);
    }
    
    .theme-icon {
        font-size: 0.85rem;
    }
}

/* Hide theme toggle on print */
@media print {
    .theme-toggle-wrapper {
        display: none;
    }
}

/* Hide toggle during overview mode */
.reveal.overview .theme-toggle-wrapper {
    opacity: 0;
    pointer-events: none;
}
