/* A video display, scoped to the exact screen route. */
html:has(body.hb-video-a-active), body.hb-video-a-active, .hb-video-a-active * { scrollbar-width: none; scrollbar-gutter: auto; }
html:has(body.hb-video-a-active)::-webkit-scrollbar, body.hb-video-a-active::-webkit-scrollbar, .hb-video-a-active *::-webkit-scrollbar { display: none; width: 0; height: 0; }
.hb-video-a-active .hb-video-a-view { display: flex; flex-direction: column; height: calc(100svh - 76px); min-height: 0; padding: 30px 32px 32px; color: #172846; }
.hb-video-a-intro { padding-bottom: 25px; }
.hb-video-a-intro h1 { margin: 0 0 9px; color: #172846; font-size: 29px; font-weight: 650; line-height: 1.4; letter-spacing: -.5px; }
.hb-video-a-intro p { margin: 0; color: #8594ad; font-size: 12px; line-height: 1.9; }
.hb-video-a-intro { flex: 0 0 auto; }
.hb-video-a-view > .m20 { flex: 1; min-height: 0; margin: 0 !important; }
.hb-video-a-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; height: 100% !important; min-height: 0; margin: 0 !important; overflow: visible !important; }
.hb-video-a-layout > .ant-col { min-width: 0; min-height: 0; max-width: 100%; padding: 0 !important; }
.hb-video-a-devices, .hb-video-a-preview { height: 100% !important; border: 1px solid #e6ebf5; border-radius: 16px; background: #fff; box-shadow: none; }
.hb-video-a-devices > .ant-card-body { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 24px 20px; }
.hb-video-a-device-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.hb-video-a-camera { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; color: var(--hb-primary); background: #f0f3ff; }
.hb-video-a-camera svg { width: 21px; height: 21px; }
.hb-video-a-device-heading h2, .hb-video-a-preview-heading h2 { margin: 0; color: #172846; font-size: 16px; font-weight: 600; line-height: 25px; }
.hb-video-a-device-heading p, .hb-video-a-preview-heading p { margin: 4px 0 0; color: #98a6bc; font-size: 11px; line-height: 18px; }
.hb-video-a-devices .ant-input-affix-wrapper { min-height: 40px; padding: 8px 12px; border-color: #e0e7f3; border-radius: 8px; box-shadow: none; }
.hb-video-a-devices .ant-input-affix-wrapper:hover { border-color: var(--hb-primary-border); }
.hb-video-a-devices .ant-input-affix-wrapper-focused { border-color: var(--hb-primary-muted); box-shadow: 0 0 0 3px var(--hb-primary-a0d); }
.hb-video-a-devices .ant-input-prefix { margin-right: 9px; color: #98a6bc; }
.hb-video-a-devices input.ant-input { color: #42516d; font-size: 12px; }
.hb-video-a-devices input.ant-input::placeholder { color: #a1aec2; }
.hb-video-a-device-heading, .hb-video-a-devices .ant-input-affix-wrapper { flex: 0 0 auto; }
.hb-video-a-device-list { flex: 1; max-height: none !important; min-height: 0; margin-top: 18px !important; }
.hb-video-a-devices .ant-tree { color: #65758f; background: transparent; font-size: 12px; }
.hb-video-a-devices .ant-tree .ant-tree-treenode { width: 100%; padding: 4px 0; }
.hb-video-a-devices .ant-tree .ant-tree-node-content-wrapper { min-width: 0; padding: 5px 7px; border-radius: 7px; }
.hb-video-a-devices .ant-tree .ant-tree-title { overflow-wrap: anywhere; }
.hb-video-a-devices .ant-tree.ant-tree-directory .ant-tree-treenode-selected::before { background: #edf1ff; }
.hb-video-a-devices .ant-tree.ant-tree-directory .ant-tree-node-content-wrapper.ant-tree-node-selected { color: var(--hb-primary); }
.hb-video-a-devices .ant-tree .ant-tree-node-content-wrapper:hover { background: #f5f7ff; }
.hb-video-a-empty { margin: 0; padding: 55px 4px; }
.hb-video-a-empty > .ant-empty-image, .hb-video-a-empty > .ant-empty-description { display: none; }
.hb-video-a-device-empty { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hb-video-a-empty-camera { display: flex; align-items: center; justify-content: center; width: 74px; height: 74px; margin-bottom: 20px; border: 1px solid #e8edff; border-radius: 24px; color: var(--hb-primary-border-hover); background: #f4f6ff; }
.hb-video-a-empty-camera svg { width: 34px; height: 34px; }
.hb-video-a-device-empty h3 { margin: 0 0 9px; color: #65758f; font-size: 13px; font-weight: 500; }
.hb-video-a-device-empty p { max-width: 210px; margin: 0; color: #98a6bc; font-size: 11px; line-height: 1.9; }
.hb-video-a-preview > .ant-card-body { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 24px !important; }
.hb-video-a-preview > .ant-card-body > div:not(.hb-video-a-added) { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.hb-video-a-controls { flex: 0 0 auto; justify-content: space-between !important; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 22px; }
.hb-video-a-preview-heading { flex: 1; min-width: 160px; }
.hb-video-a-controls .ant-radio-group { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px; border: 1px solid #edf1f8; border-radius: 9px; background: #f7f9ff; }
.hb-video-a-controls .ant-radio-button-wrapper { display: flex; align-items: center; justify-content: center; height: auto; min-height: 34px; padding: 5px 11px; border: 0 !important; border-radius: 6px !important; color: #8594ad; background: transparent; font-size: 11px; line-height: 22px; box-shadow: none !important; }
.hb-video-a-controls .ant-radio-button-wrapper::before { display: none; }
.hb-video-a-controls .ant-radio-button-wrapper:hover { color: var(--hb-primary); background: #edf1ff; }
.hb-video-a-controls .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) { color: #fff; background: var(--hb-primary); }
.hb-video-a-controls .ant-radio-button-wrapper:focus-within { outline: 3px solid var(--hb-primary-focus); outline-offset: 2px; }
.hb-video-a-canvas { position: relative; flex: 1; height: auto !important; min-height: 0; margin-top: 0 !important; padding: 12px !important; overflow: hidden !important; border: 1px solid #263651; border-radius: 12px; background: #0e192c; }
.hb-video-a-grid { --hb-video-a-split: 1; position: absolute; inset: 12px; }
.hb-video-a-grid:has(> .ant-row > .ant-col-12) { --hb-video-a-split: 2; }
.hb-video-a-grid:has(> .ant-row > .ant-col-8) { --hb-video-a-split: 3; }
.hb-video-a-grid:has(> .ant-row > .ant-col-6) { --hb-video-a-split: 4; }
.hb-video-a-grid > .ant-row { display: grid; height: 100%; grid-template-columns: repeat(var(--hb-video-a-split), minmax(0, 1fr)); grid-template-rows: repeat(var(--hb-video-a-split), minmax(0, 1fr)); gap: 12px !important; margin: 0 !important; }
.hb-video-a-grid > .ant-row > .ant-col { width: auto; min-width: 0; min-height: 0; max-width: 100%; padding: 0 !important; }
.hb-video-a-window { position: relative; container-type: size; height: 100%; overflow: hidden; border: 1px solid #2b3a55; border-radius: 9px; background: #16233b; box-shadow: none !important; cursor: pointer; }
.hb-video-a-window > .shadow-body { height: 100%; padding: 0 !important; background: transparent; }
.hb-video-a-window > .shadow-body > div { height: 100%; padding-bottom: 0 !important; }
.hb-video-a-window video { object-fit: contain; }
.hb-video-a-window:hover { border-color: #627aa5; }
.hb-video-a-window.active { border-color: var(--hb-primary-muted); outline: 1px solid var(--hb-primary-muted); }
.hb-video-a-window:focus-visible { outline: 3px solid var(--hb-primary-border); outline-offset: -3px; }
.hb-video-a-window .anticon-disconnect { visibility: hidden; }
.hb-video-a-window-meta { position: absolute; top: 11px; left: 11px; right: 11px; z-index: 1; display: flex; align-items: center; gap: 7px; pointer-events: none; }
.hb-video-a-window-number { display: inline-flex; align-items: center; justify-content: center; min-width: 27px; height: 24px; padding: 0 6px; border: 1px solid #425170; border-radius: 5px; color: #adbad2; background: #142038d9; font-size: 10px; font-variant-numeric: tabular-nums; }
.hb-video-a-window-selected { display: none; padding: 2px 7px; border-radius: 4px; color: #e8edff; background: var(--hb-primary); font-size: 10px; line-height: 18px; }
.hb-video-a-window.active .hb-video-a-window-selected { display: inline-block; }
.hb-video-a-window-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; color: #7184a4; pointer-events: none; }
.hb-video-a-window-empty svg { width: 38px; height: 38px; color: #526a93; }
.hb-video-a-window-empty > span { font-size: 12px; }
.hb-video-a-grid:has(> .ant-row > .ant-col-8) .hb-video-a-window-empty, .hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-empty { gap: 7px; }
.hb-video-a-grid:has(> .ant-row > .ant-col-8) .hb-video-a-window-empty svg, .hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-empty svg { width: 26px; height: 26px; }
.hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-empty > span { font-size: 10px; }
.hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-meta { top: 7px; left: 7px; right: 7px; }
.hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-number { min-width: 22px; height: 20px; font-size: 9px; }
.hb-video-a-help { display: flex; flex: 0 0 auto; align-items: flex-start; gap: 9px; margin-top: 18px; color: #98a6bc; }
.hb-video-a-help-number { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 15px; height: 15px; margin-top: 2px; border: 1px solid #b3bfd1; border-radius: 50%; font-size: 10px; font-family: Georgia, serif; }
.hb-video-a-help p { margin: 0; font-size: 11px; line-height: 1.9; }
.hb-video-a-fullscreen-exit { display: none; }
.hb-video-a-grid:fullscreen { position: fixed; inset: 0; width: 100%; height: 100%; padding: 72px 20px 20px; overflow: hidden; background: #0e192c; }
.hb-video-a-grid:fullscreen > .hb-video-a-fullscreen-exit { position: fixed; top: 24px; right: 24px; z-index: 20; display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 16px; border: 1px solid #647797; border-radius: 8px; color: #fff; background: #142038e8; cursor: pointer; }
.hb-video-a-fullscreen-exit:focus-visible { outline: 3px solid var(--hb-primary-border); outline-offset: 3px; }

@media (max-width: 1300px) {
  .hb-video-a-active .hb-video-a-view { padding: 25px 24px; }
  .hb-video-a-intro h1 { font-size: 26px; }
  .hb-video-a-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 18px; }
  .hb-video-a-controls .ant-radio-group { width: 100%; }
  .hb-video-a-controls .ant-radio-button-wrapper { flex: 1; }
}
@media (max-width: 1000px) {
  .hb-video-a-active .hb-video-a-view { height: auto; min-height: calc(100svh - 76px); }
  .hb-video-a-layout { height: auto !important; grid-template-columns: minmax(0, 1fr); }
  .hb-video-a-device-list { flex: 0 1 auto; max-height: 230px !important; min-height: 0; }
  .hb-video-a-empty { padding: 22px 4px; }
  .hb-video-a-empty-camera { width: 50px; height: 50px; margin-bottom: 12px; border-radius: 16px; }
  .hb-video-a-empty-camera svg { width: 26px; height: 26px; }
  .hb-video-a-device-empty p { max-width: 100%; }
  .hb-video-a-canvas { flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; }
}
@media (max-width: 760px) {
  .hb-video-a-active .hb-video-a-view { padding: 22px 16px; }
  .hb-video-a-intro { padding-bottom: 20px; }
  .hb-video-a-intro h1 { font-size: 25px; }
  .hb-video-a-intro p { font-size: 11px; }
  .hb-video-a-layout { gap: 16px; }
  .hb-video-a-devices, .hb-video-a-preview { border-radius: 13px; }
  .hb-video-a-devices > .ant-card-body, .hb-video-a-preview > .ant-card-body { padding: 20px !important; }
  .hb-video-a-device-heading, .hb-video-a-controls { margin-bottom: 18px; }
  .hb-video-a-device-heading h2, .hb-video-a-preview-heading h2 { font-size: 15px; }
  .hb-video-a-empty { padding: 16px 0 4px; }
  .hb-video-a-device-list { margin-top: 12px !important; }
  .hb-video-a-controls .ant-radio-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .hb-video-a-controls .ant-radio-button-wrapper { min-width: 0; padding: 5px 6px; white-space: normal; text-align: center; }
  .hb-video-a-canvas { padding: 8px !important; }
  .hb-video-a-grid { inset: 8px; }
  .hb-video-a-grid > .ant-row { gap: 6px !important; }
  .hb-video-a-canvas:has(.ant-col-12, .ant-col-8, .ant-col-6) { aspect-ratio: 1; }
  .hb-video-a-grid:has(> .ant-row > .ant-col-8) .hb-video-a-window-empty > span, .hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-empty > span { display: none; }
  .hb-video-a-grid:has(> .ant-row > .ant-col-8) .hb-video-a-window-meta, .hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-meta { top: 4px; left: 4px; right: 4px; gap: 3px; }
  .hb-video-a-grid:has(> .ant-row > .ant-col-8) .hb-video-a-window-number, .hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-number { min-width: 18px; height: 17px; padding: 0 3px; font-size: 8px; }
  .hb-video-a-grid:has(> .ant-row > .ant-col-8) .hb-video-a-window-selected, .hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-selected { width: 6px; height: 6px; padding: 0; border-radius: 50%; font-size: 0; }
  .hb-video-a-grid:has(> .ant-row > .ant-col-8) .hb-video-a-window-empty svg, .hb-video-a-grid:has(> .ant-row > .ant-col-6) .hb-video-a-window-empty svg { width: 20px; height: 20px; }
  .hb-video-a-window-meta { top: 7px; left: 7px; right: 7px; }
  .hb-video-a-window-empty { gap: 7px; }
  .hb-video-a-window-empty svg { width: 28px; height: 28px; }
  .hb-video-a-window-empty > span { font-size: 11px; }
  .hb-video-a-help { margin-top: 14px; }
  .hb-video-a-help p { font-size: 10px; }
}
@media (max-width: 900px) {
  .hb-video-a-active .hb-video-a-view { min-height: calc(100svh - 68px); }
}
@container (max-height: 85px) {
  .hb-video-a-window-empty > span { display: none; }
  .hb-video-a-window-empty svg { width: 20px !important; height: 20px !important; }
  .hb-video-a-window-meta { top: 4px !important; left: 4px !important; right: 4px !important; gap: 3px; }
  .hb-video-a-window-number { min-width: 18px !important; height: 17px !important; padding: 0 3px; font-size: 8px !important; }
  .hb-video-a-window-selected { width: 6px; height: 6px; padding: 0; border-radius: 50%; font-size: 0; }
}
