/* /httpdocs/css/tte-rules-explainer.css */

/* Layout: let the board’s parent host a right-side panel without moving the board */
.tte-board-with-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 14px;
  align-items: start;
}
@media (max-width: 900px){
  .tte-board-with-panel { grid-template-columns: 1fr; }
}

/* Panel */
.tte-rules-explainer {
  border: 1px solid rgba(148,163,184,.3);
  background: rgba(2,6,23,.9);
  color: #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  backdrop-filter: blur(3px);
  max-height: 80vh;
  overflow: hidden;
}
.tte-rules-explainer.collapsed { max-height: 40px; overflow: hidden; }
.tte-re-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.tte-re-head .title { font-weight: 700; font-size: 14px; }
.tte-re-head .controls { display: flex; gap: 6px; }
.btn.btn-small {
  font: 12px/1 system-ui, sans-serif; padding: 4px 8px; border-radius: 6px;
  color:#e5e7eb; background: #0b1220; border:1px solid rgba(148,163,184,.25); cursor:pointer;
}
.btn.btn-small:hover { background:#111a2b; }

.tte-re-body .now {
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 8px; padding: 8px; margin-bottom: 10px;
  background: rgba(148,163,184,.06);
}
.now-type { font-weight: 800; margin-bottom: 4px; }
.now-why  { color: #cbd5e1; font-size: 13px; margin-bottom: 6px; }
.now-meta { color: #94a3b8; font-size: 12px; }

.tte-re-body .hist {
  max-height: calc(80vh - 140px);
  overflow: auto;
  display: grid; gap: 8px;
  padding-right: 4px;
}
.entry {
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 8px; padding: 6px 8px; background: rgba(148,163,184,.05);
}
.entry.flash { outline: 2px solid rgba(59,130,246,.6); outline-offset: 2px; }
.entry .row1 {
  display: grid; grid-template-columns: 72px 1fr auto auto; gap: 8px; align-items: baseline;
  font-size: 12px; color:#cbd5e1; margin-bottom: 4px;
}
.entry .row1 .type { font-weight: 700; color:#f8fafc; }
.entry .row2 { font-size: 12px; color:#cbd5e1; }
.pair { display:flex; gap:6px; align-items:center; padding:4px 0; border-top:1px dashed rgba(148,163,184,.2); }
.pair:first-child { border-top:none; }
.gray { color:#94a3b8; }
code { background:#0b1220; border:1px solid rgba(148,163,184,.25); padding:2px 4px; border-radius:5px; }
/* Hide any legacy HUDs or debug blocks if they sneak in */
.tte-hud, .tte-hud-container, .tte-badge-container,
#tte-debug, #tte-debug-log, .tte-debug-overlay { display: none !important; }

