/* TAB Rotating Messages (tab-rotating-messages.html). Loaded after tools.css; uses the site tokens. */

.tgrid.trm-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
@media (max-width: 900px) {
  /* one column: the preview first, then the messages, the settings and the output */
  .tgrid.trm-grid { grid-template-columns: minmax(0, 1fr); }
  .tgrid.trm-grid > .tstack { display: contents; }
  #pv-card { order: 1; position: static; } #msgs-card { order: 2; } #look-card { order: 3; } #bar-card { order: 4; }
  #layout-card { order: 5; } #out-card { order: 6; }
}
.trm-tool [hidden] { display: none !important; }

/* messages */
#msgs { display: flex; flex-direction: column; gap: 12px; }
.trm-msg { position: relative; margin: 0; padding: 12px 12px 14px; border: 0; box-shadow: inset 0 0 0 1px var(--rule-paper); min-width: 0; }
.trm-msg legend { float: left; padding: 0; margin: 4px 0 10px; font-size: 0.82rem; font-weight: 800; font-family: var(--mono); letter-spacing: 0.04em; }
.trm-msg legend + * { clear: none; }
.trm-msg-tools { float: right; display: flex; gap: 4px; margin: 0 0 8px 8px; }
.trm-msg-tools .tbtn { padding: 4px 9px; min-width: 32px; }
.trm-fields { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.trm-fields > .tf { margin-bottom: 0; }
@media (max-width: 1180px) and (min-width: 901px), (max-width: 560px) { .trm-fields { grid-template-columns: minmax(0, 1fr); } }
.trm-addrow { margin-top: 12px; }
.trm-gapped { margin-top: 14px; }

/* preview */
.trm-screen {
  overflow-x: auto; padding: 18px 12px;
  background:
    radial-gradient(ellipse at 30% 115%, rgba(40, 72, 36, 0.9) 0 28%, transparent 29%),
    radial-gradient(ellipse at 80% 120%, rgba(32, 60, 30, 0.9) 0 30%, transparent 31%),
    linear-gradient(#1f3550 0%, #36587a 55%, #4a6d8c 70%, #355c2f 70.2%, #24401f 100%);
}
.trm-tablist {
  width: max-content; min-width: 260px; max-width: none; margin: 0 auto; padding: 4px 8px 6px;
  background: rgba(0, 0, 0, 0.5); color: #fff;
  font-family: var(--mono); font-size: 16px; font-weight: 600; line-height: 19px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.trm-lines { display: flex; flex-direction: column; align-items: center; text-align: center; }
.trm-t { display: block; min-height: 19px; white-space: pre; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55); }
.trm-t .b { font-weight: 800; }
.trm-t .i { font-style: italic; }
.trm-t .u { text-decoration: underline; }
.trm-t .s { text-decoration: line-through; text-decoration-thickness: 2px; }
.trm-t .u.s { text-decoration: underline line-through; }
.trm-other { opacity: 0.75; }
.trm-players { display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 2px 4px; width: 100%; max-width: 330px; }
.trm-player { display: flex; align-items: center; gap: 4px; height: 20px; padding-right: 3px; background: rgba(255, 255, 255, 0.13); min-width: 0; }
.trm-player span { flex: 1 1 auto; overflow: hidden; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55); }
.trm-head { flex: none; width: 16px; height: 16px; box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.25); }
.trm-ping { flex: none; display: flex; align-items: flex-end; gap: 1px; height: 12px; }
.trm-ping i { display: block; width: 2px; background: #36d43c; }
.trm-ping i:nth-child(1) { height: 3px; } .trm-ping i:nth-child(2) { height: 5px; } .trm-ping i:nth-child(3) { height: 7px; }
.trm-ping i:nth-child(4) { height: 9px; } .trm-ping i:nth-child(5) { height: 11px; }
.trm-pvbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.trm-pvbar input[type="range"] { flex: 1 1 140px; width: auto; }
#pinfo { font-family: var(--mono); font-size: 0.8rem; }

/* output */
.trm-steps { margin: 0 0 10px; padding-left: 1.3em; font-size: 0.9rem; line-height: 1.45; }
.trm-steps + .out, #out-anim + .trm-outbtns { margin-top: 0; }
.trm-outbtns { margin: 10px 0 16px; }
#out-config { margin-bottom: 14px; }
#size { font-family: var(--mono); }
