/**
 * Estilos para PDF Audit Integration - Versión Mejorada
 */

.pdf-audit-container {
    max-width: 900px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pdf-audit-form {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Header mejorado */
.pdf-audit-header {
    text-align: center;
    margin-bottom: 30px;
}

.pdf-audit-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.pdf-audit-header h3 {
    margin: 10px 0;
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
}

.pdf-audit-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.pdf-audit-upload-area {
    margin: 25px 0;
}

/* Zona de drag & drop mejorada */
.pdf-audit-drop-zone {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 3px dashed #d0d0d0;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.pdf-audit-drop-zone:hover {
    border-color: #2196F3;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);
}

.pdf-audit-drop-zone.dragover {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.pdf-audit-drop-icon {
    color: #2196F3;
    margin-bottom: 20px;
}

.pdf-audit-drop-zone h4 {
    margin: 15px 0 10px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.pdf-audit-drop-text {
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
}

.pdf-audit-button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 5px;
}

.pdf-audit-button-primary {
    background: #2196F3;
    color: white;
}

.pdf-audit-button-primary:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.pdf-audit-button-success {
    background: #4CAF50;
    color: white;
}

.pdf-audit-button-success:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.pdf-audit-button-large {
    padding: 16px 40px;
    font-size: 18px;
    width: 100%;
    margin-top: 20px;
}

.pdf-audit-button-icon {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
}

.pdf-audit-button-icon:hover {
    color: #f44336;
    transform: scale(1.1);
}

.pdf-audit-button .pdf-audit-button-icon {
    margin-right: 10px;
    font-size: 20px;
}

.pdf-audit-hint {
    color: #999;
    font-size: 13px;
    margin-top: 15px;
}

/* Preview de archivo seleccionado */
.pdf-audit-file-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.pdf-audit-file-preview:hover {
    border-color: #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.pdf-audit-file-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.pdf-audit-file-details {
    flex-grow: 1;
}

.pdf-audit-file-details h5 {
    margin: 0 0 5px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    word-break: break-word;
}

.pdf-audit-file-size {
    margin: 0;
    color: #666;
    font-size: 14px;
}

#analyze-container {
    margin-top: 20px;
}

/* Progress container mejorado */
.pdf-audit-progress-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
}

.pdf-audit-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#progress-text {
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

#progress-percent {
    color: #2196F3;
    font-weight: 700;
    font-size: 20px;
}

.pdf-audit-progress {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.pdf-audit-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #4CAF50);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* Steps de progreso */
.pdf-audit-progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.pdf-audit-step {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.pdf-audit-step.active {
    opacity: 1;
    border-color: #2196F3;
    background: #e3f2fd;
    transform: scale(1.05);
}

.pdf-audit-step.completed {
    opacity: 1;
    border-color: #4CAF50;
    background: #e8f5e9;
}

.pdf-audit-step-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.pdf-audit-step span {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.pdf-audit-step.active span {
    color: #2196F3;
    font-weight: 600;
}

.pdf-audit-step.completed span {
    color: #4CAF50;
}

/* Checklist de validaciones */
.pdf-audit-checklist {
    background: #f0f7ff;
    border-left: 4px solid #2196F3;
    padding: 20px 25px;
    margin-top: 30px;
    border-radius: 8px;
}

.pdf-audit-checklist h4 {
    margin: 0 0 15px;
    color: #1976D2;
    font-size: 16px;
    font-weight: 600;
}

.pdf-audit-checklist ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.pdf-audit-checklist li {
    color: #333;
    font-size: 14px;
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.pdf-audit-checklist li::before {
    content: '';
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background: #4CAF50;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

/* Resultados */
#results-container {
    margin-top: 30px;
}

.pdf-audit-results {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.pdf-audit-status {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
    font-size: 16px;
}

.pdf-audit-status.ready {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pdf-audit-status.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.pdf-audit-status.critical {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.pdf-audit-section {
    margin-bottom: 30px;
}

.pdf-audit-section h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.pdf-audit-issue {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-left: 4px solid;
    background: #f8f9fa;
    border-radius: 4px;
}

.pdf-audit-issue.critical {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.pdf-audit-issue.high {
    border-left-color: #ff9800;
    background: #fff9f0;
}

.pdf-audit-issue.medium {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.pdf-audit-issue.low {
    border-left-color: #2196F3;
    background: #f0f7ff;
}

.pdf-audit-issue-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.pdf-audit-issue-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.pdf-audit-issue-pages {
    font-size: 12px;
    color: #999;
}

.pdf-audit-downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.pdf-audit-download-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.pdf-audit-download-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.pdf-audit-download-card h5 {
    margin-top: 0;
    color: #333;
    font-size: 16px;
}

.pdf-audit-download-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pdf-audit-download-btn:hover {
    background: #1976D2;
    color: white;
    text-decoration: none;
}

.pdf-audit-download-btn.success {
    background: #4CAF50;
}

.pdf-audit-download-btn.success:hover {
    background: #45a049;
}

.pdf-audit-ai-insights {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.pdf-audit-ai-insights h4 {
    color: #1976D2;
    margin-top: 0;
}

.pdf-audit-ai-insights p {
    color: #333;
    line-height: 1.6;
}

.pdf-audit-notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.pdf-audit-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.pdf-audit-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}
