/* -----------------------------------------------------------------------
   Import Report Styles
   Consistent error / warning / info panels for CSV upload feedback.
   Include this stylesheet in any tool that uses CSVUtils.renderImportReport().
   ----------------------------------------------------------------------- */

.import-report {
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Severity variants --- */

.import-report-success {
    border-left-color: #22c55e;
    background: #f0fdf4;
    color: #166534;
}

.import-report-fatal {
    border-left-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.import-report-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

.import-report-info {
    border-left-color: #94a3b8;
    background: #f8fafc;
    color: #475569;
}

/* --- Internal elements --- */

.import-report-message {
    margin-bottom: 4px;
}

.import-report-remedy {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 2px;
}

/* Grouped summary of issue types */
.import-report-group-list {
    margin: 6px 0 2px 0;
    padding-left: 20px;
    font-size: 0.85rem;
}

.import-report-group-list li {
    margin-bottom: 2px;
}

/* --- Expandable detail section --- */

.import-report-expand-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    font-size: 0.82rem;
    color: #92400e;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.import-report-expand-btn:hover {
    background: rgba(245, 158, 11, 0.22);
}

.import-report-details {
    margin-top: 8px;
    overflow-x: auto;
}

.import-report-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.import-report-detail-table th,
.import-report-detail-table td {
    padding: 4px 8px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.import-report-detail-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
}

.import-report-detail-table td.import-report-value {
    font-family: monospace;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-report-truncated {
    text-align: center;
    font-style: italic;
    color: #6b7280;
}

/* --- Dark mode support (if tools use prefers-color-scheme) --- */

@media (prefers-color-scheme: dark) {
    .import-report-success {
        background: #052e16;
        color: #86efac;
    }
    .import-report-fatal {
        background: #450a0a;
        color: #fca5a5;
    }
    .import-report-warning {
        background: #451a03;
        color: #fcd34d;
    }
    .import-report-info {
        background: #1e293b;
        color: #94a3b8;
    }
    .import-report-detail-table th {
        background: #1e293b;
        color: #cbd5e1;
    }
    .import-report-detail-table td {
        border-bottom-color: #334155;
    }
    .import-report-expand-btn {
        color: #fcd34d;
        background: rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.25);
    }
}
