/* ========================================
   Evaluation and Prediction UI Styles
   ======================================== */

/* ========================================
   Common Styles
   ======================================== */

/* Error Messages */
.error-container {
    padding: 10px;
    background-color: #ffebee;
    border-radius: 5px;
    margin-bottom: 10px;
}

.error-message {
    margin: 0;
    color: #c62828;
    font-weight: bold;
}

.error-details {
    margin: 5px 0 0;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

/* Warning Messages */
.warning-container {
    padding: 10px;
    background-color: #fff8e1;
    border-radius: 5px;
    margin-bottom: 10px;
}

.warning-message {
    margin: 0;
    color: #f57f17;
    font-weight: bold;
}

/* Success Messages */
.success-container {
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 5px;
    margin-bottom: 15px;
}

.success-title {
    margin-top: 0;
    color: #2e7d32;
    font-weight: bold;
}

.success-details {
    margin: 5px 0 0;
    color: #388e3c;
}

/* Info Messages */
.info-container {
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
    margin-bottom: 10px;
}

.info-message {
    margin: 0;
    color: #666;
}

/* ========================================
   Progress Bar Styles
   ======================================== */

.progress-container {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

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

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

.progress-status {
    color: #1976d2;
    font-weight: 500;
    font-size: 16px;
}

.progress-percentage {
    font-weight: 600;
    color: #333;
}

.progress-bar-container {
    margin-bottom: 15px;
    background-color: #e9ecef;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    background-color: #4285f4;
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.progress-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: #555;
}

.progress-detail-item {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.progress-detail-total {
    background-color: #e3f2fd;
}

.progress-detail-current {
    background-color: #e8f5e9;
}

.progress-detail-time {
    background-color: #fff8e1;
}

/* ========================================
   Status Display Styles
   ======================================== */

.status-container {
    text-align: center;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.status-icon {
    display: inline-block;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    line-height: 60px;
    font-size: 24px;
    margin-bottom: 15px;
}

.status-icon.running {
    background-color: #4285f4;
    animation: pulse 1.5s infinite ease-in-out;
}

.status-icon.completed {
    background-color: #2ecc71;
}

.status-icon.failed {
    background-color: #e74c3c;
}

.status-title {
    color: #2c3e50;
    margin: 10px 0;
    font-size: 20px;
}

.status-message {
    color: #7f8c8d;
    font-size: 16px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ========================================
   Results Table Styles
   ======================================== */

.results-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.results-title {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
}

.results-subtitle {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
}

.styled-table {
    border-collapse: collapse;
    margin: 25px auto;
    font-size: 14px;
    font-family: sans-serif;
    min-width: 400px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.styled-table thead tr {
    background-color: #e0e0e0;
    color: #2c3e50;
    text-align: center;
}

.styled-table th {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
}

.styled-table td {
    padding: 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    text-align: center;
}

.styled-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.styled-table tbody tr:hover {
    background-color: #f0f0f0;
}

/* ========================================
   Metrics Table Styles
   ======================================== */

.metrics-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

.metrics-header {
    text-align: center;
    margin-bottom: 15px;
    color: #666;
}

.metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.metrics-table thead tr {
    background-color: #f0f0f0;
}

.metrics-table th {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    font-weight: bold;
    width: 50%;
}

.metrics-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.metrics-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.metrics-table .priority-metric {
    font-weight: bold;
}

.metrics-footer {
    text-align: center;
    margin-top: 10px;
    color: #888;
    font-size: 12px;
}

/* ========================================
   Summary Statistics Styles
   ======================================== */

.summary-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 4px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
}

/* ========================================
   Table Preview Styles
   ======================================== */

.table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.dataset-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: white;
    table-layout: fixed;
}

.dataset-preview-table th {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    background-color: #e0e0e0;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    text-align: center;
    width: auto;
}

.dataset-preview-table td {
    padding: 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    text-align: center;
    width: auto;
}

.dataset-preview-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.dataset-preview-table tr:hover {
    background-color: #f0f0f0;
}

.download-hint {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 10px;
    font-size: 12px;
}

/* ========================================
   CSV Format Info Styles
   ======================================== */

.csv-format-info {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    margin: 0 0 15px 0;
}

.csv-format-info h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
}

.format-description {
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
}

.csv-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.column-item {
    background-color: white;
    border-radius: 6px;
    padding: 10px;
    flex: 1 1 200px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.column-item:hover {
    transform: translateY(-2px);
}

.column-item.required {
    border-left: 3px solid #3498db;
}

.column-item.optional {
    border-left: 3px solid #27ae60;
}

.column-name {
    font-family: monospace;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 14px;
}

.column-desc {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.3;
}

/* ========================================
   File Preview Styles
   ======================================== */

.file-info {
    text-align: center;
    margin: 20px 0;
}

.file-info table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.file-info th {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    background-color: #e0e0e0;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    text-align: center;
}

.file-info td {
    padding: 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    text-align: center;
}

/* ========================================
   Output Display Styles
   ======================================== */

.output-container {
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    background-color: white;
    padding: 10px;
    border: 1px solid #dddddd;
    border-radius: 5px;
}

.output-container pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 12px;
}

/* ========================================
   Animation Styles
   ======================================== */

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.pulse-animation {
    animation: pulse 1s infinite;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .progress-details {
        flex-direction: column;
    }
    
    .summary-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .csv-columns {
        flex-direction: column;
    }
    
    .styled-table {
        min-width: 300px;
        font-size: 12px;
    }
    
    .styled-table th,
    .styled-table td {
        padding: 8px 4px;
    }
}
