/* ViXL Capture v0.7 online-candidate UI lock. Layered over the v0.6 runtime. */
:root {
  --release-accent: #38a9ff;
  --release-green: #55e982;
  --release-border: rgba(133, 177, 221, .18);
}

.topbar { min-height: 64px; }
.brand { gap: 8px; }
.brand-mark { letter-spacing: -.035em; }
.brand-sub { font-weight: 300; letter-spacing: -.02em; }
.alpha-badge { opacity: .68; }
.top-actions { gap: 10px; }
.avatar { display: none !important; }

.bridge-header-chip {
  display: flex; align-items: center; gap: 9px; padding: 7px 11px;
  border: 1px solid var(--release-border); border-radius: 10px;
  background: rgba(8, 21, 34, .8); color: inherit; cursor: pointer;
}
.bridge-header-chip span:last-child { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.08; }
.bridge-header-chip b { font-size: 12px; font-weight: 650; }
.bridge-header-chip small { margin-top: 3px; font-size: 10px; opacity: .68; }
.bridge-led { width: 9px; height: 9px; border-radius: 50%; background: #607487; box-shadow: 0 0 0 5px rgba(96,116,135,.08); }
.bridge-header-chip.online { border-color: rgba(85,233,130,.34); }
.bridge-header-chip.online .bridge-led { background: var(--release-green); box-shadow: 0 0 0 5px rgba(85,233,130,.09), 0 0 12px rgba(85,233,130,.34); }
.bridge-header-chip.legacy .bridge-led { background: #ffb84d; }

.workspace { grid-template-columns: minmax(250px, 292px) minmax(560px, 1fr) minmax(290px, 330px); gap: 12px; }
.rail { gap: 10px; }
.panel { border-color: var(--release-border); }
.panel-title > div > span { font-weight: 650; letter-spacing: .02em; }
.panel-title small { opacity: .62; }
.mode-card { min-height: 58px; }
.mode-card.active { border-color: var(--release-accent); box-shadow: inset 0 0 0 1px rgba(56,169,255,.12); }
.mode-list { gap: 7px; }
.layout-grid { gap: 6px; }
.layout-grid button { min-height: 64px; }

.presenter-camera-row { margin-top: 4px; padding-top: 12px; border-top: 1px solid rgba(133,177,221,.10); }

.sdk-source-panel { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(133,177,221,.10); }
.sdk-source-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.sdk-source-head small { opacity: .65; }
.sdk-source-list { display: grid; gap: 6px; }
.sdk-source { width: 100%; display: grid; grid-template-columns: 24px 1fr; gap: 8px; text-align: left; padding: 8px 9px; border: 1px solid rgba(133,177,221,.12); border-radius: 8px; background: rgba(9,24,39,.7); color: inherit; cursor: pointer; }
.sdk-source:hover, .sdk-source.active { border-color: rgba(56,169,255,.55); background: rgba(25,68,105,.36); }
.sdk-source span:last-child { display: flex; flex-direction: column; }
.sdk-source b { font-size: 11px; }
.sdk-source small { font-size: 9px; opacity: .63; margin-top: 2px; }
.sdk-source-icon { color: var(--release-accent); }

.preview-panel { padding-bottom: 12px; }
.preview-head { min-height: 36px; }
.preview-frame { border-color: rgba(133,177,221,.2); }
.composition-badge { letter-spacing: .08em; font-size: 9px; }
.composition-strip { padding: 8px 10px; }
.composition-strip > div { min-width: 0; }
.composition-strip small { opacity: .55; }
.recording-path-compact { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 10px; border-top: 1px solid rgba(133,177,221,.08); font-size: 9px; color: rgba(210,228,244,.72); }
.recording-path-compact span { padding: 2px 6px; border-radius: 5px; background: rgba(56,169,255,.09); color: #9fd3ff; letter-spacing: .08em; }
.recording-path-compact b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recording-path-compact i { opacity: .45; font-style: normal; }
.recording-path-compact button { margin-left: auto; border: 0; background: transparent; color: #84b9df; cursor: help; }

.transport { grid-template-columns: minmax(92px,.8fr) minmax(170px,1.25fr) minmax(92px,.8fr) minmax(92px,.8fr) minmax(110px,.9fr); gap: 9px; }
.record-btn { min-height: 68px; border-radius: 17px; }
.transport-btn { min-height: 60px; }
body[data-recorder-state="ready"] #pauseBtn,
body[data-recorder-state="ready"] #stopBtn,
body[data-recorder-state="armed"] #pauseBtn,
body[data-recorder-state="armed"] #stopBtn,
body[data-recorder-state="idle"] #pauseBtn,
body[data-recorder-state="idle"] #stopBtn { opacity: .35; }
body[data-recorder-state="recording"] #recordBtn,
body[data-recorder-state="paused"] #recordBtn { display: none; }
body[data-recorder-state="recording"] .transport,
body[data-recorder-state="paused"] .transport { grid-template-columns: 1fr 1.25fr 1.25fr 1fr; }

.right-rail .health-row { padding-block: 7px; }
.right-rail .health-row small { color: rgba(190,215,237,.68); }
.all-ready { text-transform: uppercase; letter-spacing: .035em; font-weight: 650; }
.diagnostics-panel-hidden { display: none !important; }
.release-engine-panel .panel-title, .release-storage-panel .panel-title { margin-bottom: 8px; }
.engine-card, .storage-card { display: grid; grid-template-columns: 32px 1fr; gap: 9px; align-items: center; padding: 10px; border: 1px solid rgba(133,177,221,.10); border-radius: 9px; background: rgba(5,16,27,.46); }
.engine-icon, .storage-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--release-green); background: rgba(85,233,130,.08); }
.engine-card div, .storage-card div { display: flex; flex-direction: column; min-width: 0; }
.engine-card b, .storage-card b { font-size: 11px; }
.engine-card small, .storage-card small { margin-top: 3px; font-size: 9px; color: rgba(190,215,237,.66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.storage-card span:last-child { margin-top: 5px; font-size: 9px; color: rgba(190,215,237,.54); }
.storage-card + .storage-card { margin-top: 7px; }
.storage-card em { font-style: normal; font-weight: 500; opacity: .58; }
.bridge-storage { opacity: .82; }
.bridge-engine-note { margin-top: 8px; font-size: 9px; color: rgba(190,215,237,.56); }

.footer { min-height: 42px; opacity: .78; }
.profile-panel { padding-block: 10px; }
.system-app-panel:not(.expanded) { padding-block: 9px; }

@media (max-width: 1250px) {
  .workspace { grid-template-columns: 250px minmax(500px, 1fr) 280px; }
  .panel-title small { display: none; }
}


.fullscreen-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(133,177,221,.18);
  border-radius: 8px;
  background: rgba(8,21,34,.72);
  color: rgba(225,239,252,.88);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.fullscreen-control:hover {
  border-color: rgba(56,169,255,.5);
  background: rgba(25,68,105,.34);
  color: #fff;
}
.fullscreen-glyph { font-size: 14px; line-height: 1; }
.top-fullscreen-control { white-space: nowrap; }
.preview-fullscreen-control { margin-left: auto; }
.preview-head .preview-fullscreen-control { margin-right: 4px; }

.preview-panel:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border: 0;
  border-radius: 0;
  padding: 14px;
  background: #06101a;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto auto;
}
.preview-panel:fullscreen .preview-frame {
  min-height: 0;
  height: 100%;
}
.preview-panel:fullscreen .preview-frame canvas,
.preview-panel:fullscreen .preview-frame video {
  max-height: calc(100vh - 150px);
}
.preview-panel:fullscreen .composition-strip,
.preview-panel:fullscreen .recording-path-compact {
  flex-shrink: 0;
}

html:fullscreen,
html:fullscreen body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
html:fullscreen .app-shell {
  min-height: 100vh;
  height: 100vh;
}
body.fullscreen-active .footer {
  display: none;
}
body.fullscreen-active .workspace {
  min-height: 0;
}

/* Keep the operator controls in the viewport; expanded details scroll locally. */
@media (min-width: 1251px) {
  .app-shell { min-height: 0; grid-template-rows: 64px auto minmax(0, 1fr) 30px; }
  .topbar { grid-row: 1; }
  .alert-bar { grid-row: 2; }
  .app-shell > main { grid-row: 3; }
  .footer { grid-row: 4; min-height: 30px; }
  .rail { overflow: auto; gap: 8px; }
  .rail > .panel { flex-shrink: 0; padding: 8px; }
  .left-rail .panel-title { margin-bottom: 6px; }
  .left-rail .panel-title small { display: none; }
  .mode-card { min-height: 38px; padding-block: 3px; }
  .mode-list { gap: 5px; }
  .compact-source-list .source { padding-block: 3px; }
  .layout-grid button { min-height: 44px; padding-block: 3px; }
  .layout-thumb { height: 22px; }
  .toggle-row { padding-block: 5px; }
  .presenter-camera-row { margin-top: 0; padding-top: 5px; }
  .center-stage { overflow: auto; }
  .preview-panel { flex: 1 0 440px; }
  .preview-frame { flex: 1 1 auto; min-height: 140px; aspect-ratio: auto; }
  .preview-head, .composition-strip, .recording-path-compact, .status-strip, .transport, .completion-card { flex-shrink: 0; }
  .composition-strip { padding: 0; }
  .profile-panel, .system-app-panel { flex-shrink: 0; }
  .right-rail .health-row { padding-block: 4px; }
  .release-recent-panel { flex: 0 0 auto !important; }
  .release-recent-panel .recent-list { max-height: 118px; }
  .release-recent-panel .empty-list { padding: 10px; }
  html:fullscreen .app-shell { grid-template-rows: 64px auto minmax(0, 1fr); }
}

.recording-replay { width: min(1000px, 90vw); max-height: 90vh; color: var(--text); background: #0b1825; border: 1px solid var(--line); border-radius: 10px; }
.recording-replay::backdrop { background: rgba(0,0,0,.75); }
.recording-replay form { display: flex; justify-content: space-between; align-items: center; }
.recording-replay p { font-size: 12px; overflow-wrap: anywhere; }
.recording-replay video { display: block; width: 100%; max-height: 68vh; background: #000; }


/* Responsive operator sizing: keep primary controls visible on common laptop/1080p heights. */
@media (min-width: 1251px) and (max-height: 950px) {
  .app-shell { grid-template-rows: 56px auto minmax(0, 1fr) 24px; }
  .topbar { min-height: 56px; padding-block: 5px; }
  .footer { min-height: 24px; height: 24px; font-size: 9px; }
  .workspace { gap: 8px; }
  .rail { gap: 6px; scrollbar-width: thin; }
  .rail > .panel { padding: 7px; }
  .left-rail .panel-title { margin-bottom: 4px; }
  .mode-list { gap: 4px; }
  .mode-card { min-height: 34px; padding: 2px 7px; }
  .mode-card small { font-size: 8px; line-height: 1.15; }
  .compact-source-list { gap: 4px; }
  .compact-source-list .source { min-height: 38px; padding: 2px 7px; }
  .compact-source-list .source small { font-size: 8px; line-height: 1.12; }
  .more-sources summary { padding-block: 3px; }
  #refreshSourceBtn { min-height: 30px; padding-block: 4px; }
  .layout-grid { gap: 4px; }
  .layout-grid button { min-height: 36px; padding: 2px 3px; }
  .layout-thumb { height: 16px; }
  .toggle-row { padding-block: 3px; }
  .toggle-row small { font-size: 8px; line-height: 1.12; }
  .presenter-camera-row { padding-top: 3px; }
  .audio-mix-details summary { padding-block: 3px; }
  .preview-panel { flex-basis: 390px; }
  .profile-panel { padding-block: 7px; }
  .system-app-panel:not(.expanded) { padding-block: 6px; }
  .right-rail .health-row { padding-block: 3px; }
  .engine-card, .storage-card { padding: 8px; }
}

@media (min-width: 1251px) and (max-height: 820px) {
  .app-shell { grid-template-rows: 52px auto minmax(0, 1fr); }
  .topbar { min-height: 52px; }
  .footer { display: none; }
  .left-rail .mode-card small,
  .left-rail .compact-source-list .source small,
  .left-rail .toggle-row small { display: none; }
  .mode-card { min-height: 30px; }
  .compact-source-list .source { min-height: 32px; }
  .layout-grid button { min-height: 31px; }
  .layout-thumb { height: 13px; }
  .preview-panel { flex-basis: 340px; }
  .transport-btn { min-height: 46px; }
  .record-btn { min-height: 54px; }
}

/* Slightly narrower three-column layout before falling back to the legacy breakpoint. */
@media (min-width: 1251px) and (max-width: 1500px) {
  .workspace { grid-template-columns: 238px minmax(0, 1fr) 270px; gap: 8px; }
  .top-fullscreen-control span:last-child { display: none; }
  .bridge-header-chip small { display: none; }
}
