/**
 * Sigma ImportX Engine - History Page Styles
 *
 * @package SigmaImportX
 * @since 1.0.0
 */

.sie-history-page {
    background: #fff;
    padding: 20px;
}

.sie-stats-row {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.sie-stat-mini {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.sie-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.sie-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.sie-stat-value.success {
    color: #28a745;
}

.sie-stat-value.danger {
    color: #dc3545;
}

.sie-table-wrapper {
    margin: 30px 0;
}

.sie-history-table {
    width: 100%;
}

.sie-history-table td {
    vertical-align: middle;
    padding: 12px 8px;
}

.column-id {
    width: 60px;
}

.column-operation {
    width: 110px;
}

.column-file {
    width: 140px;
}

.column-module {
    width: 90px;
}

.column-status {
    width: 90px;
}

.column-stats {
    width: 110px;
}

.column-progress {
    width: 140px;
}

.column-time {
    width: 90px;
}

.column-date {
    width: 140px;
}

.column-user {
    width: 90px;
}

.sie-operation-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.sie-operation-import {
    background: #d1ecf1;
    color: #0c5460;
}

.sie-operation-export {
    background: #fff3cd;
    color: #856404;
}

.sie-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.sie-badge-module {
    background: #e7f3ff;
    color: #004085;
}

.sie-hash {
    color: #999;
    font-family: monospace;
}

.sie-stats-compact {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sie-stats-compact span {
    font-size: 12px;
    font-weight: bold;
}

.sie-success {
    color: #28a745;
}

.sie-failed {
    color: #dc3545;
}

.sie-skipped {
    color: #ffc107;
}

.sie-progress-bar {
    width: 100%;
    height: 24px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.sie-progress-fill {
    height: 100%;
    /* Background color is set inline based on success rate */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    min-width: 30px; /* Ensure text is visible even at low percentages */
}

.sie-progress-text {
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

.sie-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sie-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.sie-modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.sie-modal-close:hover {
    color: #000;
}

.sie-history-row.sie-status-completed {
    border-left: 4px solid #28a745;
}

.sie-history-row.sie-status-failed {
    border-left: 4px solid #dc3545;
}

.sie-history-row.sie-status-processing {
    border-left: 4px solid #ffc107;
}

.sie-history-row.sie-status-pending {
    border-left: 4px solid #0c5460;
}
