/* HeartBeat Studio devices and stream health — the same screens Studio and the app have, on the portal's tokens.
   Figures and labels wear text colours; colour is carried by marks only (level fill, the chip beside a verdict,
   chart lines). Light and dark come from the portal's own --hb-* tokens. */

.hb-dev-layout { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .hb-dev-layout { grid-template-columns: 1fr; } }

.hb-dev-list { display: flex; flex-direction: column; gap: .5rem; }
.hb-dev-card { display: block; width: 100%; text-align: left; color: var(--hb-fg, #212529); font: inherit; padding: .6rem .75rem;
               background: var(--hb-card-bg, #fff); border: 1px solid var(--hb-border, #dee2e6); border-radius: 6px; cursor: pointer; }
.hb-dev-card:hover { background: var(--hb-hover, rgba(0,0,0,.04)); }
.hb-dev-card.selected { border-color: var(--hb-accent, #512bd4); background: var(--hb-active-bg, rgba(81,43,212,.08)); }
.hb-dev-card.offline { opacity: .75; }
.hb-dev-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; background: var(--hb-muted, #6c757d); }
.hb-dev-dot.on { background: #0ca30c; }
.hb-dev-muted { color: var(--hb-muted, #6c757d); }

.hb-dev-detail { min-width: 0; }
.hb-dev-monitor { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin: .5rem 0 1rem; }
.hb-dev-preview { width: 320px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 6px; }
/* The same picture on Go live's Preview tab, where it is the subject rather than a reassurance
   beside the controls — so it gets the width the tab has. Matches Studio's .hb-preview-big. */
.hb-preview-big { width: 720px; }
/* A heading inside a section: "Picture" and "Sound" under one "Before you go live". Lighter than
   .hb-sec, which draws a rule and reads as a new part of the page. */
.hb-sub { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--hb-muted, #6c757d); margin: 1.1rem 0 .3rem; }
.hb-dev-meter { display: flex; flex-direction: column; gap: .35rem; min-width: 220px; flex: 1; }
/* Live monitoring: the picture is the subject, so it gets more width than the confidence still beside the controls. */
.hb-dev-live { width: 480px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 6px; display: block; margin: .5rem 0; }
.hb-dev-listen { display: inline-flex; align-items: center; gap: .5rem; }
.hb-dev-section { border-top: 1px solid var(--hb-border, #dee2e6); padding-top: .75rem; margin-top: .75rem; }
/* A computer's controls in tabs. The strip stays in view as the page scrolls, so a long mixer never takes the way to another
   tab with it; popups overflow the panel as on Go live. The same classes in Studio's and the app's Devices. */
.hb-device-tabs { margin-top: .75rem; }
.hb-device-tabs > .e-tab-header { position: sticky; top: 0; z-index: 5; background: var(--hb-card-bg, #fff); }
.hb-device-tabs .e-content { padding-top: .5rem; }
.hb-device-tabs .e-content .e-item { overflow: visible; }
.hb-device-tabs .e-content .hb-dev-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
/* The same field groups and Syncfusion controls as Go live, laid out as a grid because the detail pane is wide. */
.hb-dev-section .hb-sec { margin-top: 0; padding-top: 0; border-top: 0; }
/* Every field starts at the same height, label above control. (It used to be aligned by the bottom edge, so a hint under one field
   lifted its neighbours' labels and the rows zig-zagged; hints now live in the label's tooltip.) */
.hb-dev-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 1rem; align-items: start; margin-bottom: .25rem; }
.hb-dev-form .form-group { min-width: 0; }
.hb-dev-check { align-self: center; }
/* Text whose explanation is in its tooltip: a small (i) after it says so. */
.hb-dev-tip { cursor: help; }
.hb-dev-tip::after { content: "\24D8"; margin-left: .35em; font-size: .85em; color: var(--hb-muted, #6c757d); font-weight: 400; }
.hb-dev-tip:hover::after { color: var(--hb-accent, #512bd4); }
/* Sound and camera sit side by side, each a label, a control and its buttons. */
.hb-dev-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 460px)); gap: .25rem 2rem; align-items: start; }
.hb-dev-col { min-width: 0; }
.hb-dev-mixstart { max-width: 760px; }
/* The inputs to take for a new mix: ticks that wrap into columns instead of one long list. */
.hb-dev-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .35rem 1rem; }
.hb-dev-pick { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-dev-bitrate { width: 12rem; }
.hb-dev-rename { width: 16rem; }
.hb-health-range { width: 11rem; }
.hb-dev-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
/* ProPresenter link on a computer: a label, then its state (and the change) beside it. */
.hb-dev-pp { display: grid; grid-template-columns: minmax(9rem, max-content) 1fr; gap: .45rem 1rem; align-items: center; }
@media (max-width: 575.98px) { .hb-dev-pp { grid-template-columns: 1fr; gap: .15rem; } .hb-dev-pp > :nth-child(even) { margin-bottom: .45rem; } }
/* The save row of a long detail pane: stays at the foot of the window until the pane's own end, so the primary action is never a scroll away.
   Delete sits at the far side, apart from Save. */
.hb-dev-savebar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; padding: .65rem 0;
                  background: var(--hb-card-bg, #fff); border-top: 1px solid var(--hb-border, #dee2e6); }
.hb-dev-savebar .hb-dev-end { margin-left: auto; }
/* An SfCard's content is overflow:hidden, which makes it the bar's scroll container and stops it sticking to the window. clip clips the same way without being one. */
.e-card-content:has(.hb-dev-savebar) { overflow: clip; }

.hb-level { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--hb-muted, #6c757d); }
/* The bar itself is Syncfusion's SfProgressBar (HbProgress); this is only the box it sits in. */
.hb-level-track { display: inline-block; width: 90px; line-height: 0; }
.hb-level.wide { display: flex; }
.hb-level.wide .hb-level-track { width: 100%; min-width: 160px; }
.hb-level-value { min-width: 3.5em; font-variant-numeric: tabular-nums; }
.hb-waveform { width: 100%; height: 40px; }
.hb-waveform rect { fill: var(--hb-dev-series-1, #2a78d6); }

.hb-cmd-state { display: inline-block; padding: 0 .4em; margin-right: .35em; border-radius: 3px; font-size: .75rem; border: 1px solid var(--hb-border, #dee2e6); }
.hb-cmd-state.failed, .hb-cmd-state.expired { border-color: #d03b3b; }
.hb-cmd-state.succeeded { border-color: #0ca30c; }

.hb-health { display: flex; flex-direction: column; gap: .75rem; }
.hb-health-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.hb-health-head .hb-health-toggle { margin-left: auto; }
.hb-verdict { display: inline-flex; align-items: center; gap: .35em; padding: .1em .6em; border-radius: 999px; font-weight: 600; font-size: .85rem;
              border: 1px solid var(--hb-border, #dee2e6); color: var(--hb-fg, #212529); }
.hb-verdict i { font-size: .9em; }
.hb-verdict.good { border-color: #0ca30c; } .hb-verdict.good i { color: #0ca30c; }
.hb-verdict.fair { border-color: #fab219; } .hb-verdict.fair i { color: #c98500; }
.hb-verdict.poor { border-color: #d03b3b; } .hb-verdict.poor i { color: #d03b3b; }
.hb-health-reasons { margin: 0; padding-left: 1.2rem; }

.hb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.hb-tile { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .65rem; background: var(--hb-card-bg, #fff); border: 1px solid var(--hb-border, #dee2e6); border-radius: 6px; }
.hb-tile-label { font-size: .78rem; color: var(--hb-muted, #6c757d); }
.hb-tile-value { font-size: 1.15rem; font-weight: 600; color: var(--hb-fg, #212529); }

.hb-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .75rem; }
.hb-chart { background: var(--hb-card-bg, #fff); border: 1px solid var(--hb-border, #dee2e6); border-radius: 6px; padding: .5rem .5rem .25rem; min-width: 0; }
.hb-chart h6 { margin: 0 0 .25rem .25rem; font-size: .85rem; font-weight: 600; }

.hb-health-table-wrap { max-height: 420px; overflow: auto; }
.hb-health-table { width: 100%; border-collapse: collapse; font-size: .85rem; color: var(--hb-fg, #212529); }
.hb-health-table th { position: sticky; top: 0; background: var(--hb-card-bg, #fff); text-align: left; font-weight: 600; color: var(--hb-muted, #6c757d); }
.hb-health-table th, .hb-health-table td { padding: .35rem .5rem; border-bottom: 1px solid var(--hb-border, #dee2e6); vertical-align: top; }
.hb-health-table td { font-variant-numeric: tabular-nums; }
.hb-health-history tbody tr { cursor: pointer; }
.hb-health-history tbody tr:hover { background: var(--hb-hover, rgba(0,0,0,.04)); }
.hb-health-history tbody tr.selected { background: var(--hb-active-bg, rgba(81,43,212,.08)); }
.hb-reloading { opacity: .6; transition: opacity .15s; }

/* The channel mixer on a computer: a strip for each channel of a many-channel input, and the mix they make. */
.hb-mix-top { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; max-width: 640px; align-items: end; }
.hb-mix-top .form-group { margin-bottom: 0; }
.hb-mix-head, .hb-mix-row { display: grid; grid-template-columns: 2.5rem 3.25rem 190px minmax(0, 1fr) minmax(0, 1fr) 150px; gap: .75rem; align-items: center; }
.hb-mix-strips { max-height: 46vh; overflow-y: auto; border: 1px solid var(--hb-border, #dee2e6); border-radius: 8px; }
.hb-mix-head { position: sticky; top: 0; z-index: 2; padding: .45rem .75rem; border-bottom: 1px solid var(--hb-border, #dee2e6); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hb-muted, #6c757d); background: var(--hb-card-bg, #fff); }
.hb-mix-head > :nth-child(1), .hb-mix-head > :nth-child(2) { text-align: center; }
.hb-mix-row { padding: .45rem .75rem; border-bottom: 1px solid var(--hb-border, #dee2e6); }
.hb-mix-row:last-child { border-bottom: 0; }
.hb-mix-row.off .hb-mix-slider, .hb-mix-row.off .e-textbox { opacity: .55; }
.hb-mix-ch { font-family: ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; font-weight: 600; text-align: center; }
.hb-mix-on { display: flex; justify-content: center; }
/* The slider and its value sit on one line. */
.hb-mix-slider { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.hb-mix-slider > :first-child { flex: 1 1 auto; min-width: 0; }
.hb-mix-slider > small { flex: 0 0 4.6rem; text-align: right; white-space: nowrap; }
/* A stereo strip's two meters, left above right. */
.hb-mix-meter-pair { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hb-mix-meter-pair .hb-level { display: flex; }
.hb-mix-meter-pair .hb-level-track { width: 100%; }
.hb-mix-meter-pair .hb-level-value { display: none; }
.hb-mix-input-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hb-mix-input-tools { display: inline-flex; gap: .25rem; }
.hb-mix-result { display: grid; grid-template-columns: 6rem 1fr 1fr; gap: 1rem; align-items: center; padding: .75rem .5rem; margin-top: .5rem; border-top: 2px solid var(--hb-border, #dee2e6); }
.hb-mix-side { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.hb-mix-side .hb-level { flex: 1; }
@media (max-width: 760px) { .hb-mix-top { grid-template-columns: 1fr; } .hb-mix-head { display: none; } .hb-mix-row { grid-template-columns: 2rem 2.5rem 1fr; } .hb-mix-row > :nth-child(n+4) { grid-column: 1 / -1; } }
.hb-mix-inputs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .5rem; margin: .5rem 0; border: 1px solid var(--hb-border, #dee2e6); border-radius: 6px; }
.hb-mix-input-pick { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; margin: 0; }
.hb-mix-input-head { font-weight: 600; padding: .5rem .5rem .2rem; border-bottom: 1px solid var(--hb-border, #dee2e6); }
/* An input of more than 16 channels is listed a page at a time from this bar (the strips above already scroll inside a set
   height, so the mix's meters and Save stay in reach). Same classes in Studio's Devices. */
.hb-mix-bar { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .5rem; }
.hb-mix-bar .hb-mix-find { max-width: 22rem; }
.hb-mix-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; }
.hb-mix-pager-name { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: .25rem; }
.hb-mix-pager-all { margin-left: auto; display: inline-flex; gap: .25rem; }
.hb-mix-empty { padding: 1rem .75rem; color: var(--hb-muted, #6c757d); }
/* Another computer's recordings: one row each, what it is and where it stands on the left, what can be done on the right. A row
   that needs somebody (not sent, or sent and not confirmed) is edged. Same classes in Studio's Devices. */
.hb-rec-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .5rem 1rem; padding: .6rem .75rem; margin-bottom: .5rem; border: 1px solid var(--hb-border, #dee2e6); border-radius: 8px; }
.hb-rec-row.attn { border-left: 4px solid var(--hb-warn, #c98a00); }
.hb-rec-main { flex: 1 1 22rem; min-width: 0; }
.hb-rec-line { margin-top: .15rem; }
.hb-rec-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.hb-rec-bar { height: 6px; margin-top: .4rem; border-radius: 3px; background: var(--hb-border, #dee2e6); overflow: hidden; }
.hb-rec-bar > span { display: block; height: 100%; background: var(--hb-accent, #6b4fbb); }
.hb-rec-confirm { flex: 1 1 100%; padding: .6rem .75rem; border: 1px solid var(--hb-warn, #c98a00); border-radius: 8px; background: var(--hb-card-bg, #fff); }
.hb-rec-confirm p { margin: 0 0 .4rem; }
