/* RC10: compact audio TX controls and unmistakable operational states. */
.radio-swr-test-control {flex-wrap:wrap;gap:.4rem}
.radio-swr-test-control .cockpit-audio-tone {min-width:5rem;width:auto;white-space:nowrap;font-size:.75rem;transition:background .14s,border-color .14s}
.cockpit-audio-tone.is-preparing {background:#efad19!important;border-color:#b37408!important;color:#241600!important}
.cockpit-audio-tone.is-active {background:#c82724!important;border-color:#b01f1b!important;color:white!important}
.cockpit-audio-tone:disabled {opacity:.68;cursor:not-allowed}
.audio-archive-actions,.audio-archive-recording-actions {display:flex;flex-wrap:wrap;align-items:center;gap:.4rem}
.audio-archive-actions .cockpit-archive-transmit,.gateway-recording-actions .cockpit-archive-transmit {box-sizing:border-box;white-space:nowrap;min-width:110px;width:auto;min-height:40px;padding:.35rem .65rem;font-size:.78rem;line-height:1.15;font-weight:800;border:1px solid #b97825;border-radius:10px;background:#f5e4c2;color:#70420b}
.audio-archive-actions .cockpit-archive-transmit.is-preparing,.gateway-recording-actions .cockpit-archive-transmit.is-preparing{background:#e7ad30!important;color:#271a02!important;border-color:#ce8816!important}
.audio-archive-actions .cockpit-archive-transmit.is-active,.gateway-recording-actions .cockpit-archive-transmit.is-active {background:#bd211f!important;color:white!important;border-color:#a31817!important}
.audio-archive-actions .cockpit-archive-transmit:disabled,.gateway-recording-actions .cockpit-archive-transmit:disabled {opacity:.6}
.gateway-recording-actions {display:grid;grid-template-columns:minmax(0,1fr) minmax(108px,.8fr) 44px;gap:7px;align-items:center}
.gateway-recording-actions a.gateway-recording-download {min-width:0;min-height:42px;padding:.4rem .5rem}
.gateway-recording-actions .cockpit-archive-transmit {width:100%;min-width:0}
.audio-archive-recording-actions .audio-archive-download,.audio-archive-recording-actions .cockpit-archive-transmit,.audio-archive-recording-actions .audio-archive-delete {flex:0 1 auto;max-width:100%;min-width:0}
@media (max-width:530px) {.radio-swr-test-control .cockpit-audio-tone{font-size:.69rem;min-width:4.3rem}.gateway-recording-actions{grid-template-columns:minmax(0,1fr) minmax(105px,.9fr) 42px}.audio-archive-recording-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.audio-archive-recording-actions .audio-archive-delete {grid-column:1/-1}}
/* Dialog messages belong in the form flow, not pinned over the header. */
dialog .mrg-dialog-feedback, .operator-dialog-card > .mrg-dialog-feedback, dialog > form > .mrg-dialog-feedback{
  position:relative!important;inset:auto!important;z-index:auto!important;
  max-width:calc(100% - 1.5rem);width:auto;min-width:0;box-sizing:border-box;
  margin:.5rem .75rem .7rem;padding:.55rem .7rem;
  border:1px solid var(--border);border-left:3px solid var(--accent);
  border-radius:9px;box-shadow:none;font-size:.78rem;font-weight:680;line-height:1.4;
  overflow-wrap:anywhere;word-break:normal;
}

/* RC14: TX ready = dark MRG amber; existing preparing/yellow and active/red remain. */
.audio-archive-actions .cockpit-archive-transmit:not(.is-active):not(.is-preparing),
.audio-archive-recording-actions .cockpit-archive-transmit:not(.is-active):not(.is-preparing),
.gateway-recording-actions .cockpit-archive-transmit:not(.is-active):not(.is-preparing){
  background:#8d4a0c!important;border-color:#ad650f!important;color:#fff4da!important;
  box-shadow:inset 0 1px 0 #e4a75a44;
}
.audio-archive-actions .cockpit-archive-transmit.is-active,
.audio-archive-recording-actions .cockpit-archive-transmit.is-active,
.gateway-recording-actions .cockpit-archive-transmit.is-active{font-variant-numeric:tabular-nums;}

.gateway-recording-live-preview{justify-self:start;min-height:37px;padding:.32rem .8rem;border-radius:10px;
  background:#8d4a0c;color:#fff4da;border:1px solid #ad650f;font-weight:850;font-size:.76rem;}
.gateway-recording-live-preview.is-active{background:#bd211f!important;color:#fff!important;border-color:#a31817!important;}
/* 0.6.32: Gateway Papagei RX-only field trial, compact horizontal settings */
.gateway-parrot summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;cursor:pointer}
.gateway-parrot summary small{font-size:.75rem;opacity:.7}
.gateway-parrot-body{display:grid;gap:.55rem;padding:.65rem 0}
.gateway-parrot-body .muted{font-size:.83rem;line-height:1.5;margin:0 0 .4rem}
.gateway-parrot-row{display:grid;grid-template-columns:minmax(8rem,42%) minmax(0,1fr);gap:.65rem;align-items:center;border-bottom:1px solid var(--border,rgba(120,120,120,.25));padding:.25rem 0;font-size:.87rem}
.gateway-parrot-row input:not([type=checkbox]),.gateway-parrot-row select{min-width:0;width:100%;max-width:100%;box-sizing:border-box}
.gateway-parrot-actions{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.gateway-parrot-actions a{font-size:.8rem}
.gateway-parrot-status{font-size:.82rem;opacity:.85;margin:0}
@media(max-width:420px){.gateway-parrot-row{grid-template-columns:minmax(7rem,40%) minmax(0,1fr);gap:.4rem}}

/* Papagei Ereignisse: keine Extra-Karten, nur feine Trennlinien und kompakte Zeilen. */
.gateway-parrot-log{min-width:0;margin-top:.2rem;border-top:1px solid var(--border,rgba(120,120,120,.25));padding-top:.5rem}
.gateway-parrot-log-head{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:.25rem .65rem;font-size:.85rem}
.gateway-parrot-log-head small{font-size:.73rem;opacity:.7}
.gateway-parrot-log-scroll{overflow-x:auto;max-height:15rem;overflow-y:auto;margin-top:.3rem}
.gateway-parrot-log-table{width:100%;border-collapse:collapse;text-align:left;font-size:.78rem;line-height:1.45}
.gateway-parrot-log-table th,.gateway-parrot-log-table td{border-bottom:1px solid var(--border,rgba(120,120,120,.2));padding:.3rem .4rem;vertical-align:top}
.gateway-parrot-log-table th{font-weight:600;opacity:.85;position:sticky;top:0;background:var(--surface,var(--card-bg,#fff));z-index:1}
.gateway-parrot-log-table td:first-child{white-space:nowrap;font-variant-numeric:tabular-nums}
.gateway-parrot-log-table td:last-child{overflow-wrap:anywhere}

/* 0.6.32: Inline WAV players in compact event area, no extra cards. */
.gateway-parrot-recordings-head{margin-top:.75rem}
.gateway-parrot-recordings-table td:last-child{min-width:11rem}
.gateway-parrot-recordings-table td:last-child audio{width:min(16rem,100%);height:2rem;vertical-align:middle}
.gateway-parrot-download{display:inline-block;font-size:.75rem;margin-left:.5rem;white-space:nowrap}
@media(max-width:560px){.gateway-parrot-recordings-table td:last-child audio{width:9rem}}

/* 0.6.32 Papagei: flache Pegelanzeige, klare Ereignisse ohne neue Karten. */
.gateway-parrot-meter{display:grid;gap:.2rem;padding:.12rem 0 .4rem}
.gateway-parrot-meter-rail{position:relative;height:.75rem;border-radius:.4rem;overflow:visible;background:color-mix(in srgb,var(--border) 65%,#2a3541)}
.gateway-parrot-meter-fill{display:block;height:100%;width:0%;border-radius:inherit;background:#39b478;transition:width .25s linear}
.gateway-parrot-meter-marker{position:absolute;top:-3px;bottom:-3px;width:3px;left:50%;background:#efb447;border-radius:2px;box-shadow:0 0 0 1px var(--surface)}
.gateway-parrot-meter small{font-size:.71rem;color:var(--muted);font-variant-numeric:tabular-nums}
.gateway-parrot-log-table tbody tr{background:transparent}
.gateway-parrot-log-table .gateway-parrot-event-name{display:inline-flex;align-items:center;gap:.4rem}
.gateway-parrot-log-table .gateway-parrot-event-dot{width:.52rem;height:.52rem;border-radius:50%;flex:0 0 auto;background:#9ca3af}
.gateway-parrot-log-table .gateway-parrot-event-dot.is-red{background:#e25555}
.gateway-parrot-log-table .gateway-parrot-event-dot.is-green{background:#28aa77}
.gateway-parrot-log-table .gateway-parrot-event-dot.is-amber{background:#df9f32}
.gateway-parrot-log-table .gateway-parrot-event-dot.is-muted{background:#8793a4}
.gateway-parrot-recordings-table td:last-child audio{width:min(19rem,100%);max-width:100%;height:2rem}
@media(max-width:560px){.gateway-parrot-recordings-table td:last-child audio{width:100%;min-width:8.5rem}}

/* 0.6.32 – Papagei: dieselben MRG-Schiebeschalter oben und in den Einstellungen. */
/* 0.6.32: one compact switch only, without redundant EIN/AUS copy. */
.gateway-parrot{position:relative}
.gateway-parrot>details>summary{padding-right:4.5rem;min-height:42px}
.gateway-parrot>.gateway-parrot-header-switch{
  position:absolute;right:.5rem;top:.48rem;z-index:2;
  display:flex;width:3.75rem;min-width:0;min-height:32px;
  margin:0;padding:0;border:0;border-radius:0;background:transparent;
}
.gateway-parrot>.gateway-parrot-header-switch>span{
  display:block;min-width:0;min-height:31px;padding-right:3.4rem;
}
.gateway-parrot-recordings-head{
  margin-top:1rem;padding-top:.8rem;
  border-top:1px solid var(--border,rgba(120,120,120,.25));
}
@media(max-width:440px){
  .gateway-parrot>details>summary{padding-right:4.05rem}
  .gateway-parrot>.gateway-parrot-header-switch{width:3.5rem;right:.2rem}
  .gateway-parrot>.gateway-parrot-header-switch>span{padding-right:3.25rem}
}

/* 0.6.89: RX notch with illustrative frequency curve, no spectrum stream. */
.radio-notch-card{max-width:570px}
.radio-notch-card>label{margin-top:.6rem}
.radio-notch-display{margin:.55rem 0 .4rem;border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:14px;padding:.65rem .7rem;overflow:hidden}
.radio-notch-display-head,.radio-notch-scale{display:flex;justify-content:space-between;align-items:center;gap:.4rem}
.radio-notch-display-head small{color:var(--muted);font-weight:750;font-size:.65rem;letter-spacing:.08em}
.radio-notch-display-head strong{color:var(--text);font-variant-numeric:tabular-nums;font-size:1.2rem;font-weight:800;line-height:1.2;text-align:right;overflow-wrap:anywhere;min-width:0;flex-shrink:0;max-width:55%}
.radio-notch-display svg{display:block;width:100%;height:118px;max-height:22vh;margin:.3rem 0}
.radio-notch-grid{stroke:color-mix(in srgb,var(--muted) 22%,transparent);stroke-width:1;fill:none;stroke-dasharray:3 5}
.radio-notch-line{stroke:var(--success);stroke-width:3.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.radio-notch-cursor{stroke:var(--warning);stroke-width:1.6;stroke-dasharray:3 4;fill:none}
.radio-notch-scale{font-size:.74rem;color:var(--text);font-variant-numeric:tabular-nums}
.radio-notch-scale span:last-child{text-align:right}
#radioNotchFrequencyField[hidden],#radioNotchWidthField[hidden],#radioNotchCursor[hidden]{display:none!important}
/* Header gateway: orange when ready, red only while gateway owns the keyed PTT. */
#headerGatewayTop[data-runtime-state="active"]{color:#ffbc58!important;background:color-mix(in srgb,#f59e0b 18%,var(--surface))!important;box-shadow:inset 0 0 0 1px #c77a18,0 0 12px #f59e0b55!important;animation:mrgGatewayHeaderAmberPulse 1.55s ease-in-out infinite}
#headerGatewayTop[data-runtime-state="tx"]{color:#ffe6df!important;background:color-mix(in srgb,#d72d30 30%,var(--surface))!important;box-shadow:inset 0 0 0 1px #f43f3f,0 0 16px #f43f3f70!important;animation:mrgGatewayHeaderRedPulse .85s ease-in-out infinite}
@keyframes mrgGatewayHeaderAmberPulse{0%,100%{filter:brightness(1);box-shadow:inset 0 0 0 1px #c77a18,0 0 8px #f59e0b33}50%{filter:brightness(1.22);box-shadow:inset 0 0 0 1px #f59e0b,0 0 22px #f59e0b88}}
@keyframes mrgGatewayHeaderRedPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.35)}}
@media(prefers-reduced-motion:reduce){#headerGatewayTop[data-runtime-state="active"],#headerGatewayTop[data-runtime-state="tx"]{animation:none!important}}

/* Radio plots are neutral instruments, never warning panels. */
#radioClarifierDialog .radio-clarifier-display svg{height:88px}
#radioClarifierValue{font-size:1.55rem}
#radioClarifierDialog .radio-clarifier-zero{stroke:var(--muted);stroke-width:1.5;stroke-dasharray:3 3}
#radioClarifierDialog .radio-clarifier-axis{stroke:var(--border);stroke-width:2}
#radioClarifierSpan,#radioClarifierCursor{stroke:#16a34a;stroke-width:3;fill:none}
#radioClarifierDot{fill:#16a34a;stroke:var(--text);stroke-width:1}
#radioClarifierDialog .is-off #radioClarifierSpan,#radioClarifierDialog .is-off #radioClarifierCursor{stroke:var(--muted)}
#radioClarifierDialog .is-off #radioClarifierDot{fill:var(--muted)}
#radioClarifierConfirmed{color:var(--text);font-variant-numeric:tabular-nums}
#radioClarifierOffset{accent-color:#16a34a}
