/* Record details and table feedback belong only to the Echoes asset chain. */
.drawer__record {
  order: 0;
  min-width: 0;
  grid-template-columns: 5.5rem minmax(0, 1fr) !important;
  align-content: start;
  --echoes-record-danger: #a52a24;
  --echoes-record-success: #236a3b;
}
html.dark .drawer__record { --echoes-record-danger: #ffb4aa; --echoes-record-success: #8ed5a2; }
.drawer__record > dt, .drawer__record > dd { min-width: 0; overflow-wrap: anywhere; }
.drawer__reason-label, .drawer__unban-reason-label {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.drawer__reason-label { order: -4; }
.drawer__reason-value { order: -3; }
.drawer__unban-reason-label { order: -2; margin-top: .5rem; }
.drawer__unban-reason-value { order: -1; }
.drawer__reason-value, .drawer__unban-reason-value {
  grid-column: 1 / -1;
  padding: .75rem .875rem;
  margin-bottom: .625rem !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text);
  font-size: .875rem;
  line-height: 1.6;
}
.drawer .reason-text a, .drawer__comments a:not(.btn) {
  color: var(--echoes-cyan);
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.drawer .reason-text a:hover, .drawer__comments a:not(.btn):hover { color: var(--accent); }
.drawer .reason-text a:focus-visible { outline: 2px solid var(--echoes-cyan); outline-offset: 2px; }
.drawer__evidence { order: 1; margin-top: -.5rem; }
.drawer__ids {
  order: 2;
  padding: .625rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  gap: .125rem .5rem !important;
}
.drawer__ids dd { line-height: 1.5; }
.drawer__comments { order: 3; min-width: 0; }
.drawer__record[data-record-state="permanent"] .drawer__state-value,
.drawer__record[data-record-state="active"] .drawer__state-value {
  color: var(--echoes-record-danger);
  font-weight: 600;
}
.drawer__record[data-record-state="unbanned"] .drawer__state-value,
.drawer__record[data-record-state="unmuted"] .drawer__state-value { color: var(--echoes-record-success); font-weight: 600; }

/* Native controls remain the only row actions. Short opposing fragments mark selection. */
.table tbody tr:focus-within, .ban-card:focus-within { background-color: var(--accent-soft); }
.table tbody tr[data-drawer-source="true"], .ban-card[data-drawer-source="true"] { background-color: var(--accent-soft); }
.table tbody tr[data-drawer-source="true"] > :first-child {
  background-image: linear-gradient(var(--echoes-orange), var(--echoes-orange));
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 1.25rem 2px;
}
.table tbody tr[data-drawer-source="true"] > :last-child {
  background-image: linear-gradient(var(--echoes-cyan), var(--echoes-cyan));
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 1.25rem 2px;
}
.ban-card[data-drawer-source="true"] {
  background-image: linear-gradient(var(--echoes-orange), var(--echoes-orange)), linear-gradient(var(--echoes-cyan), var(--echoes-cyan));
  background-repeat: no-repeat;
  background-position: left top, right bottom;
  background-size: 1.25rem 2px;
}
.table tbody tr:hover { background-color: color-mix(in srgb, var(--accent-soft) 60%, var(--bg-surface)); }
.table tbody tr[data-drawer-source="true"]:hover { background-color: var(--accent-soft); }
.table .row-actions { align-items: center; gap: .25rem; }
.ban-card__actions { align-items: center; gap: .375rem; }
.table [data-drawer-href]:focus-visible, .table [data-drawer-bid]:focus-visible,
.table [data-drawer-cid]:focus-visible, .ban-card__summary:focus-visible {
  outline: 2px solid var(--echoes-cyan);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (forced-colors: active) {
  [data-drawer-source="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .drawer .reason-text a { color: LinkText; }
}
