/* FT8/FT4 page: two decode panes,
   the button row, the control area (Rx meter, frequency/DX block, Rx/Tx/
   Report, generated messages, Pwr slider), status bar and the Wide Graph.
   Builds on js8.css for dialogs, lists and tokens. */

.ft8-app { margin-top: 0.8rem; }
.ft8-menue { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; padding: 0.4rem 0.6rem; margin-bottom: 0.6rem;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg2); }
.ft8-menue .js8-modus { margin-left: 0.3rem; }

/* two panes */
.ft8-fenster { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
@media (max-width: 800px) { .ft8-fenster { grid-template-columns: 1fr; } }
.ft8-spaltentitel { font-family: var(--js8-mono); font-size: 0.78rem; color: var(--muted); padding: 0.2rem 0.5rem; border-bottom: 1px solid var(--border); white-space: pre; }
.ft8-fenster .js8-liste { height: 22rem; }
.ft8-trenner { border-top: 1px dashed var(--border); margin: 0.15rem 0; }
/* Bandwechsel: Linie mit dem Bandnamen in der Mitte */
.ft8-trenner-band { display: flex; align-items: center; gap: 0.6rem; border: 0; margin: 0.4rem 0; color: var(--accent); font-size: 0.8rem; }
.ft8-trenner-band::before, .ft8-trenner-band::after { content: ""; flex: 1; border-top: 1px solid var(--accent); }
/* Farben der Zeilen kommen aus den Einstellungen (Farben), als --zf (Grund) und --zs (Schrift) an der Zeile.
   Gedämpft: der Grund halb mit dem Hintergrund gemischt, links ein Streifen in voller Farbe, Schrift wie sonst. */
.js8-liste .zeile.gefaerbt, .ft8-farbe-muster.gefaerbt {
  background: color-mix(in srgb, var(--zf, transparent) 30%, transparent);
  box-shadow: inset 4px 0 0 var(--zf, transparent);
  color: var(--zs, var(--fg));
}
.js8-liste .zeile.gefaerbt .meta { color: inherit; opacity: 0.8; }
.js8-liste .zeile.gefaerbt:hover { background: color-mix(in srgb, var(--zf, transparent) 45%, transparent); }
.js8-liste .zeile.dx { outline: 1px solid var(--accent); }
.ft8-land { float: right; padding-left: 1rem; opacity: 0.85; }
.ft8-farben { display: grid; gap: 0.25rem; margin: 0.4rem 0; }
.ft8-farbe { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; }
.ft8-farbe-name { min-width: 15rem; }
.ft8-farbe-muster { display: inline-block; padding: 0.05rem 0.5rem 0.05rem 0.7rem; border-radius: 4px; font-family: var(--js8-mono); font-size: 0.85rem; }
.ft8-farbe input[type=color] { width: 2.2rem; height: 1.5rem; padding: 0; border: 1px solid var(--border); background: none; }

/* Knöpfe klein (Mockup 9, Mensch 12.10.2026): 24 px, leicht gerundet; Zusammengehöriges als Gruppe (ft8-seg) */
.ft8-app .btn-sm { height: 24px; min-height: 0; padding: 0 9px; border-radius: 5px; font-size: 12px; line-height: 22px; min-width: 0; }
.ft8-seg { display: inline-flex; }
.ft8-seg > .btn-sm { border-radius: 0; margin-left: -1px; }
.ft8-seg > .btn-sm:first-child { border-radius: 5px 0 0 5px; margin-left: 0; }
.ft8-seg > .btn-sm:last-child { border-radius: 0 5px 5px 0; }
.ft8-seg > .btn-sm[hidden] + .btn-sm, .ft8-seg > .btn-sm:only-child { border-radius: 5px; }
.ft8-gruen[aria-pressed="true"] { background: #27af57; color: #fff; border-color: transparent; font-weight: 700; }
.ft8-rot[aria-pressed="true"] { background: #ef4444; color: #fff; border-color: transparent; font-weight: 700; }
#ft8-tune[aria-pressed="true"] { background: #ef4444; color: #fff; border-color: transparent; }
.ft8-luft { flex: 1; }
.ft8-app .js8-schalter { font-size: 12px; gap: 4px; }
.js8-spalte-kopf { display: flex; justify-content: space-between; align-items: center; }

/* Abstand zwischen den Listen und dem Steuerkasten */
.ft8-fenster { margin-bottom: 0; }
/* Steuerkasten: Knopfzeile oben, darunter Pegel, Frequenz/DX, Rx/Tx/Report/Decode, Nachrichten, Pwr */
.ft8-steuer { display: grid; grid-template-columns: auto 230px 160px minmax(0, 1fr) auto; grid-template-areas: "k k k k k" "p f m t w";
  gap: 6px 10px; align-items: start; border: 1px solid var(--border); border-radius: 8px; background: var(--bg2); padding: 6px 8px; }
.ft8-knoepfe { grid-area: k; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.ft8-rxmeter { grid-area: p; }
.ft8-block-freq { grid-area: f; }
.ft8-block-mitte { grid-area: m; }
.ft8-block-tx { grid-area: t; }
.ft8-pwr { grid-area: w; }
.ft8-block { min-width: 0; }
/* Felder 24 px, spezifischer als .field input:not(...) aus style.css */
.ft8-app .ft8-steuer input:not([type=radio]):not([type=checkbox]):not([type=range]):not(.ft8-freq-anzeige), .ft8-app .ft8-steuer select {
  min-height: 0; height: 24px; padding: 0 6px; font-size: 12px; border-radius: 5px; }
.ft8-steuer .field { margin: 0; }
.ft8-block-freq { display: grid; gap: 4px; align-content: start; }
.ft8-app .ft8-steuer .ft8-freq-anzeige { font-family: var(--js8-mono); font-size: 22px; font-weight: 700; letter-spacing: 0.03em; color: #39d353;
  background: #0a0e1f; border: 1px solid var(--border); border-radius: 5px; padding: 1px 8px; width: 100%; box-sizing: border-box; text-align: right; height: auto; min-height: 0; }
.ft8-freq-anzeige:focus { outline: none; border-color: var(--accent); }
.ft8-dx { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ft8-dx .field { display: grid; gap: 1px; min-width: 0; }
.ft8-dx .field label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0; }
.ft8-dx .field input { width: 100%; min-width: 0; }
.ft8-dx-zeile { display: flex; gap: 4px; align-items: center; }
.ft8-dx-dist { flex: 1 1 auto; font-family: var(--js8-mono); font-size: 11.5px; }
.ft8-uhrzeile { display: flex; align-items: baseline; justify-content: space-between; }
.ft8-uhr { font-family: var(--js8-mono); font-size: 15px; font-weight: 700; }
.ft8-datum, .ft8-station { font-family: var(--js8-mono); font-size: 11px; color: var(--muted); }
.ft8-block-mitte { display: grid; gap: 4px; align-content: start; }
.ft8-block-mitte .field { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); align-items: center; gap: 4px; }
.ft8-app .ft8-block-mitte .field label { font-size: 11px; color: var(--muted); margin: 0; padding: 0; line-height: 1.2; align-self: center; text-transform: none; letter-spacing: 0; }
.ft8-block-mitte .field input, .ft8-block-mitte .field select { width: 100%; min-width: 0; }
.ft8-block-mitte .field input { text-align: right; }
.ft8-block-tx { display: grid; gap: 3px; }
.ft8-tx-kopf { display: grid; grid-template-columns: 20px minmax(0, 1fr) 36px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ft8-tx-kopf span:last-child { text-align: center; }
.ft8-tx-liste { display: grid; gap: 3px; }
.ft8-tx-zeile { display: grid; grid-template-columns: 20px minmax(0, 1fr) 36px; gap: 4px; align-items: center; }
.ft8-tx-zeile input[type="radio"] { accent-color: var(--accent); justify-self: center; margin: 0; }
.ft8-app .ft8-steuer .ft8-tx-text { font-family: var(--js8-mono); background: var(--bg); color: var(--fg); border: 1px solid var(--border); text-transform: uppercase; }
.ft8-tx-text[readonly] { color: var(--muted); }
.ft8-tx-zeile.aktiv .ft8-tx-text { border-color: var(--accent); color: var(--fg); }
.ft8-tx-zeile.sendet .ft8-tx-text { border-color: #ef4444; color: var(--fg); }
.ft8-app .ft8-tx-send { width: 36px; padding: 0; font-size: 11px; }
.ft8-tx-fuss { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; font-size: 11.5px; }

/* Pegel senkrecht, Pwr senkrecht */
.ft8-rxmeter { display: grid; grid-template-columns: auto auto; grid-template-rows: 1fr auto; gap: 2px 3px; align-items: stretch; height: 100%; }
.ft8-rxmeter .ft8-pegel-wert { grid-column: 1 / -1; text-align: center; font-family: var(--js8-mono); font-size: 11px; font-weight: 600; }
.ft8-app .js8-pegel.senkrecht { width: 12px; min-height: 140px; }
.ft8-pwr { display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: 3px; font-size: 10px; height: 100%; }
.ft8-pwr input[type="range"] { writing-mode: vertical-lr; direction: rtl; height: 100%; min-height: 140px; width: 14px; accent-color: var(--accent); }

/* Tablet und kleines Fenster: Nachrichten unter Pegel/Frequenz/Rx-Tx, Pwr rechts daneben */
@media (max-width: 1100px) and (min-width: 701px) {
  .ft8-steuer { grid-template-columns: auto 220px minmax(0, 220px) minmax(0, 1fr) auto; grid-template-areas: "k k k k k" "p f m . w" "t t t t w"; }
}
/* Handy: eine Spalte, Knöpfe und Felder 32 px zum Tippen, Gruppen über die ganze Breite, Pwr waagrecht */
@media (max-width: 700px) {
  .ft8-app .btn-sm, .ft8-app .ft8-steuer input:not([type=radio]):not([type=checkbox]):not([type=range]):not(.ft8-freq-anzeige), .ft8-app .ft8-steuer select { height: 32px; font-size: 13px; }
  .ft8-app .btn-sm { line-height: 30px; }
  .ft8-app .js8-schalter { font-size: 13px; }
  .ft8-menue .ft8-seg { flex-wrap: wrap; }
  .ft8-steuer { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "k k" "p f" "m m" "t t" "w w"; gap: 8px; padding: 6px; }
  .ft8-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
  .ft8-knoepfe .ft8-luft { display: none; }
  .ft8-knoepfe .ft8-seg { grid-column: 1 / -1; display: flex; width: 100%; }
  .ft8-knoepfe .ft8-seg .btn-sm { flex: 1 1 0; min-width: 0; }
  .ft8-knoepfe > .ft8-log { grid-column: 1 / -1; }
  .ft8-app .ft8-steuer .ft8-freq-anzeige { font-size: 20px; }
  .ft8-block-mitte { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
  .ft8-tx-kopf, .ft8-tx-zeile { grid-template-columns: 24px minmax(0, 1fr) 44px; }
  .ft8-tx-zeile input[type="radio"] { width: 18px; height: 18px; }
  .ft8-app .ft8-tx-send { width: 44px; }
  .ft8-pwr { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto; align-items: center; justify-items: stretch; height: auto; }
  .ft8-pwr input[type="range"] { writing-mode: horizontal-tb; direction: ltr; height: 20px; width: 100%; min-height: 0; }
  .ft8-fenster .js8-liste { height: 12rem; font-size: 0.75rem; overflow-x: auto; white-space: pre; }
}

/* status bar */
/* Status in der Menüleiste (Mensch, 12.10.2026: Empfangsleiste weniger hoch): Rx/Tx als kleine Marke, die Periode als Streifen
   an der Unterkante der Leiste */
.ft8-menue { position: relative; overflow: hidden; }
.ft8-status { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 11.5px; }
.ft8-status-feld { font-family: var(--js8-mono); color: var(--muted); }
.ft8-status .js8-rxtx { padding: 0 8px; height: 20px; line-height: 18px; font-size: 11px; border-radius: 4px; min-width: 0; }
.ft8-periode.js8-periode { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 3px; border: 0; border-radius: 0; background: transparent; }

/* wide graph */
.ft8-wide { border: 1px solid var(--border); border-radius: 9px; background: var(--bg2); overflow: hidden; }
.ft8-wide-kopf { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--border);
  font-size: 0.8rem; }
.ft8-wide-kopf > span:first-child { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.ft8-wide-kopf input[type="number"] { width: 5rem; background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 6px; padding: 0.15rem 0.4rem; font: inherit; }
.ft8-wide-kopf select { background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 6px; padding: 0.15rem 0.4rem; font: inherit; }
.ft8-wide .js8-skala { border: 0; border-radius: 0; }
.ft8-wide #ft8-wasserfall { display: block; width: 100%; height: 260px; background: #000; border-radius: 0; cursor: crosshair; image-rendering: pixelated; }
.ft8-makro-wahl { background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 6px; padding: 0.2rem 0.4rem; font: inherit; font-family: var(--js8-mono); font-size: 0.85rem; max-width: 12rem; }


/* Kopf des Wasserfalls so klein wie der Steuerkasten */
.ft8-wide-kopf { gap: 4px 10px; padding: 4px 8px; font-size: 12px; }
.ft8-app .ft8-wide-kopf input[type="number"], .ft8-app .ft8-wide-kopf select { height: 24px; min-height: 0; padding: 0 6px; font-size: 12px; border-radius: 5px; }
.ft8-app .ft8-wide-kopf input[type="number"] { width: 4.2rem; }
.ft8-wide { margin-top: 0.5rem; }
/* Wasserfall rechts oder im eigenen Fenster füllt die Höhe (gegen die feste Höhe oben, die über die ID gilt) */
.ft8-app.wf-rechts > .ft8-wide #ft8-wasserfall, body.digi-wf-popup .ft8-wide #ft8-wasserfall { flex: 1 1 auto; height: auto; min-height: 0; }

/* AFU-197: Hound-Modus (Fox/Hound) */
.ft8-hound-gruppe { display: inline-flex; gap: 8px; padding-left: 8px; border-left: 1px solid var(--border); }
.ft8-hound-marke { padding: 0 6px; border-radius: 4px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.ft8-hound-marke[hidden] { display: none; }
.ft8-status-hound { color: var(--fg); }
.ft8-status-hound[data-stufe="2"] { color: #eab308; }
.ft8-status-hound[data-stufe="3"] { color: #ef4444; }
/* AFU-200: Auto-Betrieb */
.ft8-status-auto { color: var(--fg); cursor: help; }
.ft8-auto-gruppe select { margin-left: 0.3rem; }
.ft8-fox-warnung { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-bottom: 4px; padding: 4px 8px; border: 1px solid #b45309;
  border-radius: 6px; background: color-mix(in srgb, #f59e0b 16%, var(--bg2)); font-size: 12px; }
.ft8-fox-warnung[hidden] { display: none; }
.ft8-fox-warnung > span { flex: 1 1 14rem; }
.ft8-split-hinweis { margin: 4px 0 0; font-size: 11px; }
.ft8-split-hinweis[hidden] { display: none; }
.ft8-tx-zeile[hidden], .ft8-app.ft8-hound #ft8-cq { display: none; }
.js8-liste .zeile .ft8-ruf.fox { font-weight: 700; color: #f97316; }
.js8-liste .zeile .ft8-ruf.hound { text-decoration: underline dotted; text-underline-offset: 2px; }
.js8-liste .zeile .ft8-ruf.ich { font-weight: 700; color: #ef4444; }
.ft8-app.ft8-hound .ft8-tx-fuss .js8-schalter { display: none; }   /* Free msg geht nach Tx5, das der Hound nicht sendet */
