/* ── TLOG Validation ─────────────────────────────────────── */

/* Validate button in transaction detail header */
.validate-tx-btn {
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
}

/* Rule editor textarea */
.validation-rules-editor {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  tab-size: 4;
  white-space: pre;
  resize: vertical;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  border: 1px solid var(--bs-border-color, #dee2e6);
}

/* Offcanvas panel width override */
#validationOffcanvas.offcanvas-end {
  width: 480px;
}

/* Severity badges */
.validation-badge-error {
  background-color: #dc3545;
  color: #fff;
}
.validation-badge-warn {
  background-color: #ffc107;
  color: #212529;
}
.validation-badge-info {
  background-color: #0dcaf0;
  color: #212529;
}

/* Results table */
.validation-results-table {
  font-size: 0.82rem;
}
.validation-results-table th {
  font-weight: 600;
  white-space: nowrap;
}
.validation-results-table td {
  vertical-align: middle;
}
.validation-results-table .severity-icon-error {
  color: #dc3545;
}
.validation-results-table .severity-icon-warn {
  color: #ffc107;
}

/* Clickable violation rows */
.validation-row-clickable {
  cursor: pointer;
}
.validation-row-clickable:hover {
  background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08) !important;
}

/* Accordion header badges */
.validation-accordion .accordion-button {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
}
.validation-accordion .accordion-body {
  padding: 0;
}

/* Progress area */
.validation-progress-area {
  min-height: 2rem;
}

/* Summary strip in results header */
.validation-summary-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Parse errors in rule editor */
.validation-parse-errors {
  font-size: 0.78rem;
  max-height: 80px;
  overflow-y: auto;
}

/* Persistent highlight for targeted string/field rows */
.validation-highlight-string > td {
  background-color: rgba(255, 193, 7, 0.25) !important;
  box-shadow: inset 3px 0 0 #ffc107;
}

/* Field highlight — bright yellow with left accent bar */
.validation-highlight-field > td {
  background-color: rgba(255, 193, 7, 0.4) !important;
  box-shadow: inset 4px 0 0 #dc3545;
}

/* Fade-out transition when highlight is removed */
@keyframes validationFadeOut {
  0%   { background-color: rgba(255, 193, 7, 0.4); }
  100% { background-color: transparent; }
}
.validation-highlight-fade > td {
  animation: validationFadeOut 1s ease-out forwards;
}
