/* Modern Loading Modal - Design Profissional */

.modern-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-loading-overlay.show {
    opacity: 1;
    transform: scale(1);
}

.modern-loading-overlay.hide {
    opacity: 0;
    transform: scale(0.9);
}

.modern-loading-content {
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    max-width: 420px;
    width: 90%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.modern-loading-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.modern-loading-header {
    margin-bottom: 30px;
}

.modern-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.modern-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: modernSpin 2s linear infinite;
}

.modern-spinner-ring:nth-child(1) {
    border-top-color: #667eea;
    animation-delay: 0s;
}

.modern-spinner-ring:nth-child(2) {
    border-right-color: #764ba2;
    animation-delay: 0.3s;
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
}

.modern-spinner-ring:nth-child(3) {
    border-bottom-color: #f093fb;
    animation-delay: 0.6s;
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
}

@keyframes modernSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modern-loading-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Modern Progress Container */
.modern-progress-container {
    margin-top: 20px;
}

.modern-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
    overflow: hidden;
}

.modern-progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: modernShimmer 2s infinite;
    border-radius: 3px;
}

@keyframes modernShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.modern-progress-text {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.modern-progress-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modern-status {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-step {
    font-size: 11px;
    color: #718096;
    font-style: italic;
}

/* Botão de Cancelar */
.modern-cancel-button {
    margin-top: 24px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-transform: none;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.modern-cancel-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.modern-cancel-button:hover::before {
    left: 100%;
}

.modern-cancel-button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.modern-cancel-button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.modern-cancel-button:disabled {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(160, 174, 192, 0.2);
}

.modern-cancel-button:disabled::before {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-loading-content {
        padding: 30px 20px;
        margin: 20px;
        max-width: 100%;
    }
    
    .modern-spinner {
        width: 60px;
        height: 60px;
    }
    
    .modern-spinner-ring:nth-child(2) {
        width: 45px;
        height: 45px;
        top: 7.5px;
        left: 7.5px;
    }
    
    .modern-spinner-ring:nth-child(3) {
        width: 30px;
        height: 30px;
        top: 15px;
        left: 15px;
    }
    
    .modern-loading-title {
        font-size: 16px;
    }
    
    .modern-progress-bar {
        height: 4px;
    }
    
    .modern-progress-text {
        font-size: 12px;
    }
    
    .modern-status {
        font-size: 10px;
    }
    
    .modern-step {
        font-size: 9px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .modern-loading-content {
        background: linear-gradient(145deg, #1a202c 0%, #2d3748 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .modern-loading-title {
        color: #e2e8f0;
    }
    
    .modern-progress-bar {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    .modern-progress-text {
        color: #90cdf4;
    }
    
    .modern-status {
        color: #a0aec0;
    }
    
    .modern-step {
        color: #718096;
    }
}
