/* public/css/process_modal.css - Estilos para el modal de procesos - VERSIÓN MEJORADA */

.process-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.process-modal-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    width: 95%;
    max-width: 1100px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(60px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.process-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 28px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

.process-modal-header h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    letter-spacing: -0.5px;
}

.process-id {
    font-size: 0.9rem;
    opacity: 0.95;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.process-modal-body {
    padding: 35px 40px;
    overflow-y: auto;
    flex: 1;
    background: #ffffff;
    color: #2d3748;
}

.process-modal-body * {
    color: inherit;
}

.process-progress-section {
    margin-bottom: 35px;
}

.process-progress-bar-container {
    background: rgba(var(--text-color-rgb), 0.08);
    border-radius: 50px;
    height: 50px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.process-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.process-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.process-progress-text {
    color: white;
    font-weight: 800;
    font-size: 1.3rem;
    z-index: 1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.process-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.process-stat-card {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(var(--primary-rgb), 0.03) 100%);
    border: 2px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 16px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.process-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.18);
    border-color: rgba(var(--primary-rgb), 0.25);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-color);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}

.stat-icon.success {
    background: rgba(var(--success-rgb), 0.15);
    color: var(--success-color);
    box-shadow: 0 4px 12px rgba(var(--success-rgb), 0.2);
}

.stat-icon.warning {
    background: rgba(var(--warning-rgb), 0.15);
    color: var(--warning-color);
    box-shadow: 0 4px 12px rgba(var(--warning-rgb), 0.2);
}

.stat-icon.error {
    background: rgba(var(--danger-rgb), 0.15);
    color: var(--danger-color);
    box-shadow: 0 4px 12px rgba(var(--danger-rgb), 0.2);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 700;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
    letter-spacing: -0.5px;
}

.process-info-section {
    background: rgba(var(--text-color-rgb), 0.03);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.process-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.process-info-item i {
    color: var(--primary-color);
}

.process-info-item strong {
    color: var(--text-color);
}

.process-log-section {
    background: rgba(var(--text-color-rgb), 0.03);
    border-radius: 12px;
    overflow: hidden;
}

.process-log-header {
    background: rgba(var(--text-color-rgb), 0.05);
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.process-log-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px 20px;
}

.log-entry {
    padding: 8px 0;
    border-bottom: 1px solid rgba(var(--text-color-rgb), 0.05);
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    animation: slideInLog 0.3s ease;
}

@keyframes slideInLog {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    min-width: 80px;
}

.log-message {
    color: var(--text-color);
    flex: 1;
}

.log-entry.log-success .log-message {
    color: var(--success-color);
}

.log-entry.log-warning .log-message {
    color: var(--warning-color);
}

.log-entry.log-error .log-message {
    color: var(--danger-color);
}

.process-modal-footer {
    padding: 20px 30px;
    background: rgba(var(--text-color-rgb), 0.03);
    border-top: 1px solid rgba(var(--text-color-rgb), 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.process-modal-footer .btn {
    min-width: 120px;
}

/* Responsive */
@media (max-width: 768px) {
    .process-modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .process-modal-body {
        padding: 20px;
    }

    .process-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-info-section {
        flex-direction: column;
        gap: 12px;
    }
}

/* GLOBAL Z-INDEX PATCHES FOR MODALS */
.swal2-container {
    z-index: 20000 !important;
    /* Extremely high value to beat everything */
}

.modal {
    z-index: 1050;
    /* Standard Bootstrap-like modal */
}

.modal-content.fullscreen {
    z-index: 1060;
    /* Slightly higher for fullscreen */
}