/**
 * MSC Report Progress CSS
 * Erweiterte Styles für den Report-Fortschrittsbalken
 * File: assets/msc-report-progress.css
 */

/* Enhanced Modal Animations */
.msc-modal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.msc-modal.show {
    opacity: 1;
    visibility: visible;
}

.msc-modal-content {
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.msc-modal.show .msc-modal-content {
    transform: scale(1) translateY(0);
}

/* Enhanced Progress Bar */
.msc-progress-bar {
    position: relative;
    background: linear-gradient(90deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 1px solid #ddd;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.msc-progress-fill {
    background: linear-gradient(90deg, 
        #0073aa 0%, 
        #005a87 25%, 
        #0073aa 50%, 
        #005a87 75%, 
        #0073aa 100%);
    background-size: 40px 40px;
    animation: progressMove 2s linear infinite;
    position: relative;
    overflow: hidden;
}

@keyframes progressMove {
    0% { background-position: 0 0; }
    100% { background-position: 40px 0; }
}

.msc-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: progressShine 3s ease-in-out infinite;
}

/* Enhanced Status Icons */
.msc-success-message .dashicons,
.msc-error-message .dashicons {
    animation: statusBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes statusBounce {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

/* Step Indicator */
.msc-progress-step-indicator {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 0;
}

.msc-progress-step-indicator li {
    flex: 1;
    text-align: center;
    position: relative;
    list-style: none;
    font-size: 12px;
    color: #999;
}

.msc-progress-step-indicator li::before {
    content: '';
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #ddd;
    display: block;
    margin: 0 auto 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.msc-progress-step-indicator li.active::before {
    background: #0073aa;
    border-color: #0073aa;
    animation: stepPulse 2s infinite ease-in-out;
}

.msc-progress-step-indicator li.completed::before {
    background: #4CAF50;
    border-color: #4CAF50;
}

.msc-progress-step-indicator li.completed::after {
    content: '✓';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

@keyframes stepPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.7);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(0, 115, 170, 0);
        transform: scale(1.1);
    }
}

/* Connection lines between steps */
.msc-progress-step-indicator li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: calc(100% - 30px);
    height: 2px;
    background: #ddd;
    z-index: 1;
    transition: background 0.3s ease;
}

.msc-progress-step-indicator li.completed:not(:last-child)::after {
    background: #4CAF50;
}

/* Enhanced Button Styles */
.msc-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.msc-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.msc-button:hover::before {
    width: 300px;
    height: 300px;
}

.msc-button-primary {
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.msc-button-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
    transform: translateY(-2px);
}

/* Loading Spinner Enhancement */
.msc-progress-container .msc-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite, colorShift 3s ease-in-out infinite;
    margin: 0 auto;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes colorShift {
    0%, 100% { border-top-color: #0073aa; }
    33% { border-top-color: #4CAF50; }
    66% { border-top-color: #ff9800; }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .msc-modal-content {
        background: #2c2c2c;
        color: #ffffff;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .msc-modal-header {
        border-bottom-color: #444;
    }
    
    .msc-modal-footer {
        border-top-color: #444;
    }
    
    .msc-progress-bar {
        background: linear-gradient(90deg, #444 0%, #333 100%);
        border-color: #555;
    }
    
    .msc-progress-text {
        color: #ffffff;
    }
    
    .msc-progress-details {
        color: #ccc;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .msc-modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }
    
    .msc-progress-step-indicator {
        flex-direction: column;
        gap: 15px;
    }
    
    .msc-progress-step-indicator li {
        display: flex;
        align-items: center;
        text-align: left;
        flex-direction: row;
    }
    
    .msc-progress-step-indicator li::before {
        margin: 0 15px 0 0;
        flex-shrink: 0;
    }
    
    .msc-progress-step-indicator li::after {
        display: none; /* Hide connection lines on mobile */
    }
    
    .msc-button {
        width: 100%;
        margin: 5px 0;
    }
}

/* Error State Enhancements */
.msc-report-error {
    animation: errorSlideIn 0.4s ease-out;
}

@keyframes errorSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.msc-error-details {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dc3232 #ffeaea;
}

.msc-error-details::-webkit-scrollbar {
    width: 8px;
}

.msc-error-details::-webkit-scrollbar-track {
    background: #ffeaea;
    border-radius: 4px;
}

.msc-error-details::-webkit-scrollbar-thumb {
    background: #dc3232;
    border-radius: 4px;
}

/* Success State Enhancements */
.msc-report-result {
    animation: successSlideIn 0.5s ease-out;
}

@keyframes successSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Time Estimation Enhancement */
.msc-progress-time {
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    font-size: 11px;
    margin-top: 10px;
    text-align: center;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Accessibility Enhancements */
.msc-modal {
    /* Ensure modal is accessible */
    role: dialog;
    aria-modal: true;
}

.msc-progress-bar {
    /* Screen reader support */
    role: progressbar;
    aria-valuemin: 0;
    aria-valuemax: 100;
}

/* Focus styles for accessibility */
.msc-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.msc-close-modal:focus {
    outline: 2px solid #dc3232;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .msc-progress-fill {
        background: #000000;
    }
    
    .msc-modal-content {
        border: 2px solid #000000;
    }
    
    .msc-button-primary {
        background: #000000;
        border: 2px solid #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .msc-modal,
    .msc-modal-content,
    .msc-progress-fill,
    .msc-progress-fill::before,
    .msc-button::before {
        animation: none !important;
        transition: none !important;
    }
    
    .msc-progress-fill {
        background: #0073aa;
    }
}

/* Print styles (hide modal when printing) */
@media print {
    .msc-modal {
        display: none !important;
    }
}