/* ===== TOGGLE SWITCH (Privacy Control for AI Analysis) ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 34px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2.5px;
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
}

.toggle-slider:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.toggle-switch input:focus+.toggle-slider {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Smooth animation for toggle */
@keyframes toggle-on {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.toggle-switch input:checked+.toggle-slider:before {
    animation: toggle-on 0.3s ease;
}

/* Label styling */
.toggle-label {
    user-select: none;
    -webkit-user-select: none;
}

.toggle-label:hover .toggle-slider {
    border-color: rgba(255, 255, 255, 0.5);
}