/* OnAirPlan – Aufnahme-Fenster und eingesprochene Sendeblöcke */

/* ── Fenster ───────────────────────────────────────────────── */
.rec-ov { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.55); display: flex; padding: 1.2rem; }
.rec-win { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--surface); color: var(--text);
    border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.35); overflow: hidden; border: 2px solid transparent; transition: border-color .15s; }
.rec-win.recording { border-color: #e11d48; }
.rec-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .55rem .8rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.rec-logo { font-size: 1.2rem; }
.rec-title { font: inherit; font-weight: 600; font-size: 1rem; border: 1px solid transparent; background: transparent; color: var(--text);
    padding: .25rem .4rem; border-radius: 6px; min-width: 14rem; flex: 0 1 22rem; }
.rec-title:hover, .rec-title:focus { border-color: var(--border); background: var(--surface); outline: none; }
.rec-pos { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
.rec-head-sp { flex: 1; }
.rec-sel { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; color: var(--text-muted); }
.rec-sel select { font-size: .78rem; padding: .15rem .3rem; max-width: 15rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 5px; }
.rec-font { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.rec-font button { border: none; background: var(--surface); color: var(--text-muted); font-size: .72rem; padding: .2rem .38rem; min-width: 1.6rem; cursor: pointer; }
.rec-font button.active { background: var(--primary); color: #fff; }
.rec-x { border: none; background: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; padding: .1rem .4rem; }
.rec-x:hover { color: var(--text); }
.rec-draft { padding: .5rem .9rem; background: var(--warning-bg); color: var(--warning); font-size: .85rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

/* Text wie im Fokus-Modus */
.rec-script-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.rec-script { flex: 1; overflow-y: auto; padding: 2rem 2.5rem 3rem; font-family: Verdana, "DejaVu Sans", Tahoma, Geneva, sans-serif;
    font-size: calc(1rem * var(--rec-scale, 1.8)); line-height: 1.5; scroll-behavior: smooth; }
.rec-script > div { max-width: 60rem; margin: 0 auto; }
.rec-script p { margin: 0 0 .8em; }
.rec-empty { color: var(--text-muted); font-size: .6em; text-align: center; padding-top: 2em; }
.rec-next { margin-top: 2.5em !important; opacity: .38; font-size: .6em; border-top: 1px dashed var(--border); padding-top: .8em; }
.rec-next span { display: block; font-size: .8em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4em; }
.rec-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9rem; font-weight: 800;
    color: #e11d48; background: color-mix(in srgb, var(--surface) 70%, transparent); pointer-events: none; }
.rec-count.pop { animation: rec-pop .9s ease-out; }
@keyframes rec-pop { from { transform: scale(1.35); opacity: .4; } to { transform: scale(1); opacity: 1; } }

/* Wellenform */
.rec-wave { border-top: 1px solid var(--border); padding: .4rem .8rem .5rem; background: var(--surface-2); }
.rec-wave-tools { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-bottom: .3rem; }
.rec-chk { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; margin-left: .4rem; cursor: pointer; }
.rec-wave-info { margin-left: auto; font-size: .78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
#rec-canvas { width: 100%; height: 96px; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; cursor: crosshair; }

/* Leiste unten */
.rec-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .6rem .8rem; border-top: 1px solid var(--border); background: var(--surface); }
.rec-meter { position: relative; width: 12rem; height: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
    background-image: linear-gradient(90deg, transparent 79.6%, rgba(0,0,0,.18) 80%, transparent 80.4%, transparent 94.6%, rgba(0,0,0,.18) 95%, transparent 95.4%); }
.rec-meter-fill { height: 100%; width: 0; background: #16a34a; transition: width .05s linear; }
.rec-meter-fill.warm { background: #ca8a04; }
.rec-meter-fill.hot { background: #dc2626; }
.rec-clip { position: absolute; right: 3px; top: 0; font-size: .6rem; font-weight: 800; line-height: 14px; color: #fff; background: #dc2626; padding: 0 .25rem; border-radius: 3px; opacity: 0; }
.rec-clip.on { opacity: 1; }
.rec-time { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 5.5rem; }
.rec-state { font-size: .82rem; color: var(--text-muted); flex: 1; min-width: 10rem; }
.rec-state.warn { color: var(--danger); font-weight: 600; }
.rec-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.rec-b { font: inherit; font-size: .85rem; padding: .45rem .75rem; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.rec-b:hover { filter: brightness(.96); }
.rec-b:disabled { opacity: .45; cursor: default; }
.rec-b-rec { background: #e11d48; border-color: #e11d48; color: #fff; font-weight: 700; min-width: 8.5rem; }
.rec-b-rec.on { background: #7f1d1d; border-color: #7f1d1d; animation: rec-blink 1.2s infinite; }
@keyframes rec-blink { 50% { box-shadow: 0 0 0 4px rgba(225,29,72,.3); } }
.rec-b-save { background: var(--success); border-color: var(--success); color: #fff; font-weight: 600; }
.rec-b-del { color: var(--danger); }
.rec-keys { font-size: .7rem; color: var(--text-muted); padding: 0 .8rem .45rem; background: var(--surface); }
@media (max-width: 800px) {
    .rec-ov { padding: 0; }
    .rec-win { border-radius: 0; }
    .rec-script { padding: 1rem; }
    .rec-keys { display: none; }
}

/* ── Reiter „Aufnehmen“ unter Nachrichten ───────────────────── */
.nr-edit .card { padding: 1rem; }
.nr-head { display: grid; grid-template-columns: 7rem minmax(10rem, 1fr) minmax(12rem, 1.2fr) 7rem; gap: .6rem; align-items: end; }
.nr-head label { display: flex; flex-direction: column; gap: .2rem; font-size: .75rem; color: var(--text-muted); }
.nr-head input, .nr-head select { font: inherit; font-size: .9rem; padding: .35rem .45rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.nr-fn { display: flex; align-items: center; gap: .3rem; }
.nr-fn input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; }
.nr-fn .ext { font-family: ui-monospace, Consolas, monospace; color: var(--text-muted); font-size: .85rem; }
.nr-tools { display: flex; gap: .4rem; flex-wrap: wrap; margin: .9rem 0 .6rem; }
.nr-items { display: flex; flex-direction: column; gap: .45rem; }
.nr-item { display: grid; grid-template-columns: 1.4rem 1.6rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .5rem .6rem;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.nr-item.missing { border-left: 4px solid var(--warning); }
.nr-item.ok { border-left: 4px solid var(--success); }
.nr-item.drag-over { outline: 2px dashed var(--primary); }
.nr-grip { cursor: grab; color: var(--text-muted); text-align: center; user-select: none; }
.nr-num { font-weight: 700; color: var(--text-muted); text-align: right; }
.nr-main { min-width: 0; }
.nr-main input { font: inherit; font-weight: 600; border: 1px solid transparent; background: transparent; color: var(--text); padding: .1rem .3rem; border-radius: 5px; width: 100%; }
.nr-main input:hover, .nr-main input:focus { border-color: var(--border); outline: none; }
.nr-sub { font-size: .78rem; color: var(--text-muted); padding: .1rem .3rem; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.nr-sub b { color: var(--text); font-variant-numeric: tabular-nums; }
.nr-sub .warn { color: var(--warning); font-weight: 600; }
.nr-text { font-size: .82rem; color: var(--text-muted); padding: .2rem .3rem 0; white-space: pre-wrap; max-height: 4.2em; overflow: hidden; cursor: pointer; }
.nr-text.open { max-height: none; }
.nr-acts { display: flex; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.nr-acts .btn { white-space: nowrap; }
.nr-foot { position: sticky; bottom: 0; margin-top: .9rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
    padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md); }
.nr-sum { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.nr-sum small { font-size: .75rem; font-weight: 400; color: var(--text-muted); display: block; }
.nr-foot .sp { flex: 1; }
.nr-status { font-size: .8rem; color: var(--text-muted); }
.nr-status .ok { color: var(--success); font-weight: 600; }
.nr-status .warn { color: var(--warning); font-weight: 600; }
.nr-status .err { color: var(--danger); }
.nr-mix { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; }
.nr-mix audio { height: 32px; flex: 1; max-width: 32rem; }
.nr-picker { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: .35rem; margin-top: .6rem; }
.nr-pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 7px; }
.nr-pick small { color: var(--text-muted); display: block; font-size: .75rem; }
.nr-hint { font-size: .8rem; color: var(--text-muted); margin: .3rem 0 0; }
@media (max-width: 900px) { .nr-head { grid-template-columns: 1fr 1fr; } .nr-item { grid-template-columns: 1.4rem minmax(0, 1fr); } .nr-num { display: none; } .nr-acts { grid-column: 1 / -1; justify-content: flex-start; } }

/* Einzelbeiträge: Take-Baustein */
.se-take-rec { display: flex; gap: .35rem; flex-wrap: wrap; margin: .35rem 0 .2rem; }
#rec-form .tr-row { align-items: flex-end; }
#rec-form .tr-row .form-group { flex: 1; min-width: 9rem; margin-bottom: 0; }

/* Meldungen der Liste: vor/zurück */
.rec-nav { display: inline-flex; align-items: center; gap: .3rem; }
.rec-navb { font: inherit; font-size: .8rem; width: 1.8rem; height: 1.8rem; border-radius: 6px; border: 1px solid var(--border);
            background: var(--surface); color: var(--text); cursor: pointer; }
.rec-navb:disabled { opacity: .35; cursor: default; }
.rec-navb:not(:disabled):hover { border-color: var(--text-muted); }
.rec-nav .rec-pos small { color: var(--text-muted); }

/* Live-Text (Wetter) im Aufnahmefenster */
.rec-live { display: flex; align-items: center; gap: .6rem; justify-content: space-between; font-size: .85rem;
    padding: .4rem .7rem; margin-bottom: .8rem; border-radius: 8px; background: var(--surface-2, rgba(127,127,127,.1)); }
.rec-live.old { background: color-mix(in srgb, #f59e0b 18%, transparent); }
.nr-cloud { font-size: .72rem; padding: 0 .4rem; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); border: 1px dashed var(--border); white-space: nowrap; }
