/* Progress Tracking Enhancements */

/* Course Progress Bar Styling */
.progress-lms {
    background-color: #e9ecef;
    border-radius: 0.375rem;
    height: 1rem;
    overflow: hidden;
    position: relative;
}

.progress-bar-lms {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    transition: width 0.6s ease;
    border-radius: 0.375rem;
    position: relative;
    overflow: hidden;
}

.progress-bar-lms::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Module Progress Styling */
.module-progress-bar {
    background: linear-gradient(90deg, #17a2b8, #6f42c1);
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.module-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Progress Badge Styling */
.badge.bg-primary {
    background: linear-gradient(45deg, #007bff, #0056b3) !important;
    color: white;
    font-weight: 600;
    padding: 0.5em 0.75em;
    border-radius: 0.375rem;
}

.badge.bg-info {
    background: linear-gradient(45deg, #17a2b8, #138496) !important;
    color: white;
    font-weight: 600;
    padding: 0.375em 0.6em;
    border-radius: 0.25rem;
}

/* Document Card Progress Indicators */
.document-card {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.document-card.accessed {
    border-left: 4px solid #28a745;
}

.document-card.completed {
    border-left: 4px solid #007bff;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05), rgba(40, 167, 69, 0.05));
}

.document-card::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc3545;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-card.accessed::after {
    background: #ffc107;
    opacity: 1;
}

.document-card.completed::after {
    background: #28a745;
    opacity: 1;
}

/* Course Grid Progress Enhancements */
.course-card {
    position: relative;
    transition: all 0.3s ease;
}

.course-card .progress-container {
    position: relative;
    overflow: hidden;
}

.course-card .progress-lms {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
}

.course-card .progress-bar-lms {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
}

/* Progress Statistics */
.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.progress-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.progress-stats .stat-item i {
    width: 16px;
    text-align: center;
}

/* Dashboard Widget Progress */
.dashboard-widget {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #17a2b8, #ffc107);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-widget:hover::before {
    opacity: 1;
}

.dashboard-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Progress Ring Animation */
.progress-ring {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
}

.progress-ring-circle {
    fill: transparent;
    stroke: #e9ecef;
    stroke-width: 4;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.progress-ring-progress {
    fill: transparent;
    stroke: #28a745;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 0 100;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
    transition: stroke-dasharray 0.6s ease;
}

/* Accessibility Improvements */
.progress[role="progressbar"] {
    position: relative;
}

.progress[role="progressbar"]:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading States */
.progress-loading {
    position: relative;
    overflow: hidden;
}

.progress-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive Progress Bars */
@media (max-width: 768px) {
    .progress-stats {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .dashboard-widget {
        padding: 1rem;
    }
    
    .progress-lms {
        height: 0.75rem;
    }
    
    .module-progress-bar {
        height: 6px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .progress-lms {
        background-color: #343a40;
    }
    
    .document-card {
        background-color: #495057;
        color: #fff;
    }
    
    .dashboard-widget {
        background: linear-gradient(135deg, #495057, #343a40);
        border-color: #6c757d;
        color: #fff;
    }
    
    .progress-stats {
        color: #adb5bd;
    }
}

/* Print Styles */
@media print {
    .progress-bar-lms::before,
    .module-progress-bar::before,
    .dashboard-widget::before {
        display: none;
    }
    
    .document-card {
        break-inside: avoid;
    }
}
