/**
 * Admin Theme Toggle Styles
 * A beautiful switch toggle for dark/light mode on admin pages
 */

/* Theme Toggle Container */
.admin-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Hide default checkbox */
.theme-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

/* Toggle Label (the track) */
.theme-switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    width: 70px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    position: relative;
    padding: 5px 8px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.theme-switch-label:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

/* Icons */
.theme-switch-label .sun-icon,
.theme-switch-label .moon-icon {
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 1;
}

.theme-switch-label .sun-icon {
    color: #ffd93d;
}

.theme-switch-label .moon-icon {
    color: #f5f5f5;
}

/* Toggle Ball */
.toggle-ball {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Checked state - Dark mode active */
.theme-switch-input:checked + .theme-switch-label {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 4px 15px rgba(22, 33, 62, 0.5);
}

.theme-switch-input:checked + .theme-switch-label .toggle-ball {
    transform: translateX(34px);
    background: #2d3748;
}

.theme-switch-input:checked + .theme-switch-label .sun-icon {
    color: #6b7280;
}

.theme-switch-input:checked + .theme-switch-label .moon-icon {
    color: #ffd93d;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9998;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    animation: slideDown 0.3s ease;
}

.offline-indicator i {
    font-size: 16px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Online mode indicator (green) */
.offline-indicator.online {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-theme-toggle {
        top: 10px;
        right: 10px;
    }
    
    .theme-switch-label {
        width: 60px;
        height: 32px;
    }
    
    .toggle-ball {
        width: 26px;
        height: 26px;
    }
    
    .theme-switch-input:checked + .theme-switch-label .toggle-ball {
        transform: translateX(28px);
    }
    
    .theme-switch-label .sun-icon,
    .theme-switch-label .moon-icon {
        font-size: 12px;
    }
    
    .offline-indicator {
        font-size: 11px;
        padding: 8px 14px;
        top: 55px;
    }
}
