/* Ten Goede · recording an interview (interview-recording.js, recorder.js) */

/* the level of the microphone: --lvl is set live by App.Rec.paint() */
.rec-meter { --lvl: 0%; position: relative; display: inline-block; width: 96px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; flex: none; vertical-align: middle; }
.rec-meter > i { position: absolute; inset: 0 auto 0 0; width: var(--lvl); background: var(--ok); border-radius: inherit; transition: width .12s linear; }

.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-4); flex: none; display: inline-block; }
.rec-dot[data-state="on"] { background: var(--bad); animation: rec-pulse 1.6s ease-in-out infinite; }
.rec-dot[data-state="paused"] { background: var(--warn); }
.rec-dot[data-state="lost"] { background: var(--bad); }
.rec-dot[data-state="waiting"] { background: var(--warn); }
@keyframes rec-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec-dot[data-state="on"] { animation: none; } .rec-meter > i { transition: none; } }

/* Interview Focus Mode: the start page */
.rec-start { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.rec-tgl { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.rec-tgl b { display: block; font-weight: 600; }
.rec-tgl small { display: block; color: var(--ink-3); font-size: var(--t-xs); margin-top: 2px; }
.rec-mic { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.rec-dev { flex: 1 1 240px; min-width: 0; margin: 0; }
.rec-dev select { width: 100%; }
.rec-test { display: flex; align-items: center; gap: 10px; padding-bottom: 2px; }
.rec-consent { padding: 10px 12px; border-radius: var(--r-s); background: var(--sunk); }
.rec-note svg.ic { vertical-align: -2px; }

/* while recording: the strip under the focus bar */
.rec-bar { position: sticky; top: 63px; z-index: 18; display: flex; align-items: center; gap: 12px; padding: 8px 20px; background: var(--sheet); border-bottom: 1px solid var(--line); font-size: var(--t-s); }
.rec-bar b { font-weight: 600; min-width: 3.2em; }
.rec-bar[data-tone="warn"] { background: var(--sunk); }
.rec-msg { color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rec-msg[data-tone="warn"] { color: var(--ink); }
.rec-msg[data-tone="bad"] { color: var(--bad); font-weight: 500; }
@media (max-width: 640px) { .rec-bar { flex-wrap: wrap; padding: 8px 16px; } .rec-bar .rec-msg { flex-basis: 100%; white-space: normal; } }

/* elsewhere in the app: a recording runs, or pieces wait for the connection */
.rec-pill { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: var(--t-s); text-decoration: none; box-shadow: var(--shadow-lg); }
.rec-pill:hover { color: var(--on-ink); opacity: .92; }
.rec-pill-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-pill[hidden] { display: none; }

/* the drawer: recordings and the speaker check */
.rec-list .stack > .rec-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--sheet); display: flex; flex-direction: column; gap: 8px; }
.rec-item[data-local] { background: var(--sunk); }
.rec-item-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-item-h > svg { color: var(--ink-3); }
.rec-item-h .chip { margin-left: auto; }
.rec-item-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-audio { width: 100%; height: 36px; }
.rec-spk { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-s); background: var(--sunk); }
.rec-spk p svg.ic { vertical-align: -2px; }
.rec-spk-rows { display: flex; flex-direction: column; gap: 8px; }
.rec-spk-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 240px); gap: 12px; align-items: start; padding: 10px 12px; background: var(--sheet); border-radius: var(--r-s); box-shadow: 0 0 0 1px var(--line); }
.rec-spk-row b { margin-right: 8px; }
.rec-spk-row q { display: block; margin-top: 4px; font-size: var(--t-xs); color: var(--ink-2); quotes: "“" "”"; }
@media (max-width: 640px) { .rec-spk-row { grid-template-columns: 1fr; } }
.rec-prev summary { cursor: pointer; color: var(--ink-2); }
.rec-prev .pc-tr { margin-top: 8px; max-height: 320px; overflow: auto; }
.rec-progress { display: block; height: 4px; margin-top: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.rec-progress > i { display: block; height: 100%; background: var(--ink); transition: width .2s linear; }
.pc-held { border-top: 1px solid var(--line); padding-top: 12px; }
.pc-held > summary { cursor: pointer; color: var(--ink-2); margin-bottom: 10px; }
.btn.disabled { opacity: .5; pointer-events: none; }
