/* ============================================================
   Antenna Demo — wire.css
   The wire-antenna module (wire.js): the Dipole, and the Monopole in
   phase 2. Scoped under .ant-wire, the family class makeWireAntenna puts
   on both roots; .ant-ground (the monopole) can override any of it.
   The module's state classes (mode-shape, style-simple, tab-rx) sit on
   its own root, never on <body>.
   ============================================================ */

.ant-wire .preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.ant-wire .preset-grid .preset-btn { min-height: 30px; padding: 4px 4px; font-size: 13px; font-family: var(--ece-font-mono); }
.ant-wire .preset-grid .preset-btn.preset-key { font-weight: 700; border-color: var(--ece-brand); color: var(--ece-brand-dk); }
.ant-wire .preset-grid .preset-btn.active { background: var(--ece-brand); border-color: var(--ece-brand); color: var(--ece-paper); }

.ant-wire .qstep-row { display: flex; align-items: center; gap: 6px; }
.ant-wire .qstep-btn { min-width: 0; padding: 4px 10px; font-size: 13px; font-family: var(--ece-font-mono); flex-shrink: 0; white-space: nowrap; }   /* "◀ T/4" on one line; the note wraps instead */
.ant-wire .qstep-note { font-size: 11px; color: var(--ece-ink-3); margin-left: 4px; line-height: 1.25; min-width: 0; }

.ant-wire .mode-seg { width: 100%; }
.ant-wire .mode-seg .ece-segment { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 6px; white-space: normal; }
.ant-wire .mode-seg .ece-segment b { font-size: 12.5px; font-weight: 600; }
.ant-wire .mode-seg .ece-segment small { font-size: 10.5px; color: var(--ece-ink-3); }

/* Readouts: the L/λ tile and the power bar */
.ant-wire .metric-big { display: flex; align-items: baseline; justify-content: center; gap: 12px; padding: 4px 8px; }
.ant-wire .metric-big .metric-label { font-size: 15px; color: var(--ece-ink-2); margin: 0; }
.ant-wire .metric-big .metric-val { font-size: 30px; line-height: 1.15; color: var(--ece-ink); }
.ant-wire .metric-power { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 8px; text-align: left; padding: 6px 9px 8px; }
.ant-wire .metric-power .metric-label { font-size: 12px; color: var(--ece-ink-2); margin: 0; }
.ant-wire .metric-power .metric-sub { grid-column: 1 / -1; font-size: 11px; color: var(--ece-ink-3); line-height: 1.25; }
.ant-wire .metric-power .metric-sub:empty { display: none; }
.ant-wire .metric-power .metric-val { font-size: 22px; }
.ant-wire .metric-power .bar { grid-column: 1 / -1; height: 9px; border-radius: 99px; background: var(--ece-bg-2); border: 1px solid var(--ece-rule); overflow: hidden; }
.ant-wire .metric-power .bar-fill { display: block; height: 100%; width: 100%; background: var(--ece-ok); transition: width 80ms linear; }
.ant-wire .metric-power.low .bar-fill { background: var(--ece-alert); }
.ant-wire .metric-power.mid .bar-fill { background: var(--ece-warn); }
.ant-wire .metric-row.two .metric-val { font-size: 16px; }
.ant-wire .metric-row.two .metric-val.long { font-size: 13.5px; }   /* over 11 characters (wire.js pairVal): fits the tile */
.ant-wire.mode-shape .caveat { display: none; }

/* Antenna panel: the timing inset under the antenna */
.ant-wire .antenna-panel .canvas-wrap.timing-wrap { flex: 0 0 86px; margin-top: 8px; }

/* 2D Wave */
.ant-wire .style-seg .ece-segment { font-size: 13px; padding: 4px 11px; }
.ant-wire .tab-content[data-tab="2d"] .stage-bar { column-gap: 14px; }
.ant-wire.style-simple .detailed-only { display: none; }
.ant-wire .trace-lbl { color: var(--ece-series-2); font-weight: 600; }

/* Receive */
.ant-wire .alpha-ctl { display: inline-flex; align-items: center; gap: 10px; }
.ant-wire .alpha-ctl label { font-size: 13px; color: var(--ece-ink-2); white-space: nowrap; }
.ant-wire .alpha-ctl input[type="range"] { width: 170px; }
.ant-wire .alpha-ctl .num-input { width: 58px; }
.ant-wire .rx-explainer { font-size: 13px; line-height: 1.45; color: var(--ece-ink-2); padding: 0 6px; max-width: 980px; }
.ant-wire .rx-caveat { font-size: 12px; line-height: 1.4; color: var(--ece-ink-3); padding: 0 6px 2px; max-width: 980px; margin-top: -4px; }
.ant-wire.tab-rx .caveat { display: none; }   /* on Receive the caveat sits under the scene (rx-caveat) */

/* Gain view on narrower screens: the side view's two captions ("same transmitter (realized gain)",
   "gray dashed: G = 1 (isotropic)") share its top line and need ~330 px; below 1500 px wide the
   cuts column (40 % of the gain view) is narrower than that, so it takes a fixed width instead */
@media (max-width: 1500px) {
  .ant-wire .gain-cuts { flex: 0 0 336px; }
}

/* Short viewports (see style.css): tighter presets, tiles and toggles; no text removed */
@media (max-height: 960px) {
  .ant-wire .preset-grid .preset-btn { min-height: 27px; padding: 3px 4px; }
  .ant-wire .metric-big { padding: 3px 8px; }
  .ant-wire .metric-power { padding: 5px 8px 6px; }
}
@media (max-height: 860px) {
  .ant-wire .preset-grid { gap: 4px; }
  .ant-wire .preset-grid .preset-btn { min-height: 25px; padding: 2px 4px; }
  .ant-wire .qstep-btn, .ant-wire .play-btn { min-height: 28px; padding-top: 3px; padding-bottom: 3px; }
  .ant-wire .mode-seg .ece-segment { padding: 3px 6px; }
  .ant-wire .metric-big { padding: 2px 8px; }
  .ant-wire .metric-big .metric-val { font-size: 24px; }
  .ant-wire .metric-power { padding: 4px 8px 5px; }
  .ant-wire .metric-power .metric-val { font-size: 19px; }
  .ant-wire .metric-power .metric-sub { font-size: 10.5px; }
  .ant-wire.ant-ground .znote { font-size: 10.5px; line-height: 1.3; }
}

/* Monopole (.ant-ground): the impedance note under the feed impedance */
.ant-ground .znote { font-size: 11px; line-height: 1.35; color: var(--ece-ink-3); text-align: center; margin: -2px -6px 0; }   /* 3 lines */
.ant-ground.tab-rx .znote { display: none; }
