/* Toggle switch stile iOS */
.toggle {
    position: relative;
    width: 48px;
    height: 28px;
    cursor: pointer;
    display: inline-block;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    transition: background var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle input:checked + .toggle-slider {
    background: var(--accent);
}

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

/* Toggle piccolo per ECO e header */
.toggle-sm {
    width: 36px;
    height: 20px;
}

.toggle-sm .toggle-slider::before {
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
}

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