/* io: the Video inputs page. Family tokens and the --mam- extensions from styles.css only; no colour is written here
 * (UI-TOK-03). The red dot is --ot-onair, which is kept for "recording" and "on air" (it means exactly that here). */

/* What this computer's ffmpeg can do: one row per ability, the answer on the right, the reason under the name. */
.io-abilities { overflow: hidden; }
.io-ability { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; border-top: 1px solid var(--ot-line); min-height: 44px; outline: 0; }
.io-ability:first-child { border-top: 0; }
.io-ability:focus-visible { box-shadow: inset 0 0 0 2px var(--ot-focus-ring); }
.io-ability-text { flex: 1; min-width: 0; }
.io-ability-name { font-weight: 600; }
.io-ability-what { font-size: 12px; color: var(--ot-muted); overflow-wrap: anywhere; }
.io-ability-why { font-size: 12px; margin-top: 4px; max-width: 80ch; }
.io-answer { flex: none; min-width: 36px; justify-content: center; font-weight: 600; }
.io-ffmpeg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 8px; overflow-wrap: anywhere; }
.io-ffmpeg .mono { font-size: 12px; }
.io-no-playout { margin-top: 16px; }
.io-off { margin-top: 16px; }

/* The inputs, as chips that open the record dialog. */
.io-sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.io-source { display: flex; align-items: center; gap: 8px; padding: 8px 4px 8px 12px; min-height: 44px; cursor: pointer; outline: 0; min-width: 0; }
.io-source:hover, .io-source:focus-visible { border-color: var(--ot-accent); }
.io-source.busy { border-color: var(--ot-onair); }
.io-source-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--mam-tint); color: var(--ot-accent); }
.io-source-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.io-source-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.io-source-sub { font-size: 12px; color: var(--ot-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.io-states { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.io-states li { overflow-wrap: anywhere; }
.io-scanned, .io-looking { font-size: 12px; margin: 8px 0 0; }

/* Recordings, running and recent. */
.io-recordings { overflow: hidden; }
.io-rec { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 8px 12px 16px; border-top: 1px solid var(--ot-line); min-height: 44px; outline: 0; }
.io-rec:first-child { border-top: 0; }
.io-rec:focus-visible { box-shadow: inset 0 0 0 2px var(--ot-focus-ring); }
.io-rec.live { background: var(--mam-tint); }
.io-rec-text { flex: 1; min-width: 180px; }
.io-rec-name { font-weight: 600; overflow-wrap: anywhere; }
.io-rec-sub { font-size: 12px; color: var(--ot-muted); }
.io-rec-why { font-size: 12px; margin-top: 4px; max-width: 80ch; }
.io-rec-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--ot-onair); animation: io-pulse 1.6s ease-in-out infinite; }
@keyframes io-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .io-rec-dot { animation: none; } }

/* The record dialog: choices as chips, never a typed value. */
.io-record .label { margin-bottom: 4px; }
.io-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.io-choice { border: 1px solid var(--ot-line); background: var(--ot-surface-2); color: var(--ot-text); border-radius: var(--radius-pill); padding: 4px 12px; font-size: 12px; cursor: pointer; min-height: 28px; }
.io-choice:hover { border-color: var(--ot-accent); }
.io-choice[aria-checked="true"] { background: var(--ot-accent); border-color: var(--ot-accent); color: var(--ot-text-on-accent); font-weight: 600; }
.io-warning { margin: 0 0 12px; align-items: flex-start; }
.io-warning .ico { margin-top: 2px; color: var(--ot-warn); }

@media (pointer: coarse) { .io-choice { min-height: 36px; padding: 4px 16px; } }
@media (max-width: 560px) {
  .io-sources { grid-template-columns: 1fr; }
  .io-ability { padding-left: 12px; }
  .io-rec { padding-left: 12px; }
}
