/* Styles for the IngestionJob change-page extraction-results panel.
   Loaded via IngestionJobAdmin.Media. */

/* Panel wrapper — rendered outside the <form>, below it. */
.ingestion-extraction-panel { margin-top: 24px; }
.ingestion-extraction-panel > h1 { margin: 0 0 16px; }

/* Section header — blue title bar matching Django admin fieldset style. */
.ingestion-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #417690;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
  padding: 8px 10px;
}

/* Table shell. */
.extraction-results-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.extraction-results-table thead tr { background: #417690; color: #fff; }
.extraction-results-table th,
.extraction-results-table td { padding: 6px 8px; text-align: left; vertical-align: top; overflow-wrap: break-word; }

/* Row striping — alternating black and grey with light text (visible on the dark admin theme). */
.extraction-results-table tbody td { color: #e6e6e6; }
.extraction-results-table tbody tr:nth-child(odd)  { background: #2b2b2b; } /* grey  */
.extraction-results-table tbody tr:nth-child(even) { background: #1b1b1b; } /* black */
.extraction-results-table tbody a { color: #8cb4d6; } /* readable links on dark rows */

/* Column widths — pending table. */
.extraction-results-table .col-target-table { width: 14%; }
.extraction-results-table .col-target-field { width: 15ch; }
.extraction-results-table .col-extracted    { width: 34%; }
.extraction-results-table .col-existing     { width: 18%; }
.extraction-results-table .col-confidence   { width: 5%; white-space: nowrap; }
.extraction-results-table .col-actions      { width: 18%; }

/* Target field — capped at ~15 chars, horizontal scroll for longer values. */
.extraction-results-target-field {
  display: block;
  max-width: 15ch;
  overflow-x: auto;
  white-space: nowrap;
}

/* Existing value — capped at 5 lines, vertical scroll for the rest. */
.extraction-results-existing-value {
  font-size: 13px;
  line-height: 1.5;
  max-height: 98px; /* 5 lines × 13px × 1.5 */
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Action buttons — side by side, single line, spaced. */
.extraction-results-action-cell { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 8px; }
.ingestion-btn-validate,
.ingestion-btn-reject {
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
  padding: 5px 12px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.ingestion-btn-validate { background: #28a745; } /* green */
.ingestion-btn-reject   { background: #a94442; } /* muted brick red — negative, not alarming */

/* Extracted value textarea. */
.extraction-results-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 13px;
  resize: vertical;
  color: #000;
  background: #fff;
}
