/**
 * Progress Tracking Styles
 * Enhanced styles for checkbox tracking and progress visualization
 */

/* Progress Summary in Navigation */
.progress-summary {
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 12px;
    margin: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* Global Reset Button */
.global-reset-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.global-reset-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.25));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    color: #fbbf24;
}

.global-reset-btn i {
    font-size: 0.9rem;
}

.progress-label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-label small {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 5px;
}

.progress-bar {
    width: 100%;
    height: 14px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
    border-radius: 7px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.3),
        0 1px 0 rgba(255,255,255,0.1);
    margin: 12px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 7px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Dynamic color based on progress */
.progress-fill[data-progress="low"] {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.progress-fill[data-progress="medium"] {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-fill[data-progress="good"] {
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
}

.progress-fill[data-progress="excellent"] {
    background: linear-gradient(90deg, #10b981, #06b6d4);
}

/* Shimmer effect for active progress */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percent {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #00d4ff, #0099ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    font-weight: 800;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.5px;
}

/* Enhanced Checkbox Styles */
input[type='checkbox'] {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
    cursor: pointer;
    accent-color: var(--accent-color);
}

input[type='checkbox']:hover {
    transform: scale(1.1);
}

input[type='checkbox']:checked {
    animation: checkPulse 0.3s ease;
}

@keyframes checkPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Completed Items Styling */
.checklist li.completed {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
    border-left: 3px solid #10b981;
    padding-left: 12px !important;
    margin-left: -15px;
    transition: all 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.checklist li.completed label {
    text-decoration: line-through !important;
    opacity: 0.8 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease;
}

/* Checkbox label hover effect */
.checklist label {
    cursor: pointer;
    transition: color 0.2s ease;
}

.checklist label:hover {
    color: var(--accent-color) !important;
}

/* Progress Toast Notifications */
.progress-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideInToast 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideInToast {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Milestone specific toast colors */
.progress-toast.milestone-25 {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.progress-toast.milestone-50 {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.progress-toast.milestone-75 {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.progress-toast.milestone-100 {
    background: linear-gradient(135deg, #10b981, #34d399);
    animation: slideInToast 0.3s ease, celebrate 0.5s ease 0.3s;
}

@keyframes celebrate {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    25% { transform: translateX(-50%) translateY(0) rotate(-2deg); }
    75% { transform: translateX(-50%) translateY(0) rotate(2deg); }
}

/* Progress Statistics Badge */
.progress-stats {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(30, 58, 95, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 15px;
    color: white;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-stats.visible {
    opacity: 1;
}

.progress-stats .stats-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.progress-stats .stats-value {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1rem;
}

/* Section-specific progress indicators */
.section-header .section-progress {
    float: right;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Gate Status Cards Hover Effects */
.gate-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.gate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-summary {
        padding: 10px;
        margin: 5px;
    }
    
    .progress-percent {
        font-size: 1.2rem;
    }
    
    .progress-toast {
        width: 90%;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .progress-stats {
        display: none;
    }
}