/* ── Alerts page — abnormal-volume / OI-confirmed wall events ─────────── */

.alerts-intro {
  font-size: 12px;
  color: #90a4ae;
  padding: 8px 0 4px;
  max-width: 1200px;
  line-height: 1.5;
}
.alerts-intro code {
  background: #272a3a;
  padding: 1px 4px;
  border-radius: 3px;
  color: #b0bec5;
}

/* ── Filter bar ───────────────────────────────────────────────────────── */
.alerts-controls-bar {
  position: sticky;
  top: 52px;
  z-index: 100;
  background: #1a1d27;
  padding: 6px 0;
  border-bottom: 1px solid #2a2d3e;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px;
}
.alerts-controls-bar .control-group {
  display: flex;
  align-items: center;
  gap: 3px;
}
.alerts-controls-bar .control-group label {
  font-size: 10px;
  color: #78909c;
  white-space: nowrap;
}
.alerts-controls-bar select,
.alerts-controls-bar input[type="text"],
.alerts-controls-bar input[type="date"] {
  font-size: 11px;
  height: 24px;
  padding: 0 4px;
  background: #272a3a;
  color: #e0e0e0;
  border: 1px solid #3a3d4e;
  border-radius: 3px;
  box-sizing: border-box;
  line-height: 22px;
  min-width: 0;
}
.alerts-controls-bar .control-group:last-child {
  margin-left: auto;
}
.alerts-controls-bar .btn-primary {
  height: 24px;
  padding: 0 12px;
  font-size: 11px;
  line-height: 22px;
  box-sizing: border-box;
}

/* ── Status line ──────────────────────────────────────────────────────── */
.alerts-status-bar {
  display: flex;
  gap: 12px;
  padding: 4px 0;
  font-size: 11px;
  min-height: 16px;
}
.alerts-status-bar .status-text { color: #78909c; }

/* ── Results table ────────────────────────────────────────────────────── */
.alerts-table-wrap { overflow-x: clip; }
.alerts-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  white-space: nowrap;
}
.alerts-table th,
.alerts-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #2a2d3e;
  text-align: right;
}
.alerts-table th {
  background: #1a1d27;
  color: #90a4ae;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: var(--alerts-bar-h, 90px);
  z-index: 50;
}
.alerts-table th:hover { color: #e0e0e0; }
.alerts-table th.sort-asc::after  { content: ' \25B2'; font-size: 9px; }
.alerts-table th.sort-desc::after { content: ' \25BC'; font-size: 9px; }
.alerts-table td.col-ticker {
  text-align: left;
  font-weight: 600;
  color: #e0e0e0;
}
.alerts-table tbody tr.alerts-row { cursor: pointer; }
.alerts-table tbody tr.alerts-row:hover { background: rgba(255, 255, 255, 0.06); }

/* Direction icon */
.dir-bearish { color: #EF5350; }
.dir-bullish { color: #4ade80; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.status-DETECTED  { background: #37474f; color: #cfd8dc; }
.status-CONFIRMED { background: #1565c0; color: #e3f2fd; }
.status-ACTIVE    { background: #2e7d32; color: #e8f5e9; }
.status-TRIGGERED { background: #e65100; color: #fff3e0; }
.status-UNWOUND   { background: #3a3d4e; color: #78909c; }
.status-EXPIRED   { background: #3a3d4e; color: #78909c; }

/* Severity badges — how abnormal the underlying event was (0-100),
   independent of status (how close it is to materializing). */
.severity-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}
.severity-HIGH   { background: #b71c1c; color: #ffebee; }
.severity-MEDIUM { background: #e65100; color: #fff3e0; }
.severity-LOW    { background: #37474f; color: #cfd8dc; }

/* Brain/ML confidence badges — does the deployed xgb_direction_v2 model
   (regime + macro + cross-asset + delta features) support this wall's
   implied direction? Independent of severity (how abnormal the event's
   own mechanics were). */
.brain-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}
.brain-SUPPORTED   { background: #2e7d32; color: #e8f5e9; }
.brain-MIXED       { background: #37474f; color: #cfd8dc; }
.brain-AGAINST     { background: #4a148c; color: #f3e5f5; }
.brain-UNAVAILABLE { background: #263238; color: #607d8b; }

/* ── Expandable detail row — click a row to reveal the full history and
   scoring breakdown (same pattern as joke.css/.detail-row for predictions;
   more reliable and readable than a native title="" tooltip). */
.detail-row { display: none; }
.detail-row.open { display: table-row; }
.detail-row td {
  background: #0f1117;
  padding: 10px 14px;
  cursor: default;
  white-space: normal;
  text-align: left;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 16px;
}
.detail-heading {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #90a4ae;
  margin-bottom: 4px;
}
.detail-history {
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
  color: #c0c0c0;
  line-height: 1.5;
}
.detail-note {
  font-size: 11px;
  color: #aaa;
  line-height: 1.5;
  margin-top: 6px;
}
.detail-note code {
  background: #272a3a;
  padding: 0 4px;
  border-radius: 3px;
  color: #b0bec5;
}
.detail-notes-table {
  font-size: 10px;
  border-collapse: collapse;
  width: 100%;
  margin-top: 4px;
}
.detail-notes-table th {
  color: #666;
  padding: 3px 8px;
  border-bottom: 1px solid #2a2d3e;
  text-align: left;
}
.detail-notes-table td {
  padding: 3px 8px;
  border-bottom: 1px solid #1a1d27;
  color: #aaa;
  text-align: left;
}
