/**
 * ═══════════════════════════════════════════════════════════════════════════
 * AUTO-REFRESH TOGGLE - Design du backup
 * ═══════════════════════════════════════════════════════════════════════════
 */

.auto-refresh-container {
    background: linear-gradient(135deg, rgba(255, 111, 177, 0.1), rgba(124, 58, 237, 0.1));
    border: 2px solid rgba(255, 111, 177, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.auto-refresh-content {
    flex: 1;
    min-width: 250px;
}

.auto-refresh-header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.auto-refresh-icon {
    font-size: 1.5rem;
}

.auto-refresh-label-wrapper {
    flex: 1;
}

.auto-refresh-label {
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: block;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

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

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

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

.switch input:checked + .slider {
    background: linear-gradient(135deg, #ff6fb1, #a56bff);
}

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

/* Description */
.auto-refresh-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.75rem;
    padding-left: 2.5rem;
}

/* Controls */
.auto-refresh-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 2.5rem;
    flex-wrap: wrap;
}

.auto-refresh-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.timer-emoji {
    font-size: 1rem;
}

.countdown-value {
    color: var(--text-primary);
    font-family: monospace;
}

/* Bouton Actualiser */
.refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff6fb1, #a56bff);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(255, 111, 177, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 111, 177, 0.4);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-emoji {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .auto-refresh-container {
        padding: 1rem;
    }
    
    .auto-refresh-header-row {
        flex-wrap: wrap;
    }
    
    .auto-refresh-description {
        padding-left: 0;
    }
    
    .auto-refresh-controls {
        padding-left: 0;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .refresh-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auto-refresh-icon {
        font-size: 1.25rem;
    }
    
    .auto-refresh-label {
        font-size: 0.9rem;
    }
    
    .switch {
        width: 50px;
        height: 28px;
    }
    
    .slider:before {
        height: 20px;
        width: 20px;
    }
    
    .switch input:checked + .slider:before {
        transform: translateX(22px);
    }
}
