/* Studio recording, room, waveform, storage and notice panels. */
.record-panel { position: relative; overflow: hidden; padding: 25px 28px 22px; }
.capture-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }
.capture-heading-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.onair-badge { display: inline-flex; min-height: 26px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 0; background: #12171b; padding: 0 9px; color: var(--muted); font: inherit; font-size: 10px; font-weight: 800; line-height: 1; letter-spacing: .08em; }
.onair-badge.on { border-color: rgb(85 214 178 / 55%); background: rgb(85 214 178 / 10%); color: var(--teal); }
.onair-badge.pending { border-color: rgb(255 199 89 / 65%); background: rgb(255 199 89 / 8%); color: var(--yellow); }
.onair-light { width: 7px; height: 7px; border-radius: 50%; background: #58615d; }
.onair-badge.on .onair-light { background: var(--teal); box-shadow: 0 0 8px var(--teal), 0 0 15px rgb(85 214 178 / 55%); }
.onair-badge.pending .onair-light { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); animation: onair-blink .8s steps(2, start) infinite; }
@keyframes onair-blink { 50% { opacity: .15; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) {
  .onair-badge.pending .onair-light { animation: none; }
}
.ready-badge { display: inline-flex; min-height: 26px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 0; background: #12171b; padding: 0 9px; color: var(--muted); font: inherit; font-size: 10px; font-weight: 800; line-height: 1; letter-spacing: .08em; }
.ready-badge.on { border-color: rgb(85 214 178 / 65%); background: rgb(85 214 178 / 10%); color: var(--teal); box-shadow: 0 0 9px rgb(85 214 178 / 20%); }
.ready-badge.off { border-color: var(--line); background: #12171b; color: var(--muted); }
.panel-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--yellow); }
.status-dot.live { background: var(--coral); box-shadow: 0 0 0 5px rgb(255 89 107 / 13%); animation: pulse 1.4s infinite; }
.status-dot.saved { background: var(--teal); }
@keyframes pulse { 50% { box-shadow: 0 0 0 2px rgb(255 89 107 / 8%); } }
.timer { margin: 30px 0 25px; font-size: clamp(62px, 10vw, 108px); font-variant-numeric: tabular-nums; font-weight: 450; letter-spacing: -.085em; line-height: .9; }
.waveform-monitor-grid { --waveform-box-height: 100px; display: grid; gap: 0; }
.waveform-ruler-row, .waveform-visual-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; }
.waveform-ruler-row { align-items: center; font: 8px ui-monospace, SFMono-Regular, Menlo, monospace; }
.waveform-visual-row { align-items: stretch; }
.waveform-ruler-control { display: flex; justify-content: center; align-items: center; }
.waveform-ruler-spacer { min-width: 0; }
.waveform-heading-control { display: flex; justify-content: center; align-items: center; }
.waveform-heading-control .meter-mute-button { width: 64px; min-width: 64px; padding: 2px 3px; }
.waveform-visual { min-width: 0; }
.meter-block { display: grid; width: 74px; height: var(--waveform-box-height); grid-template-rows: minmax(0, 1fr); justify-items: center; align-items: stretch; }
.meter-label { color: var(--muted); font-size: 12px; font-weight: 750; text-align: center; }
.meter-mute-button { width: 100%; min-height: 24px; margin: 0; padding: 2px 3px; font: inherit; letter-spacing: .06em; }
.meter-mute-button[aria-pressed="true"] { border-color: var(--coral); background: #3a2027; color: #ff8792; }
.meter { display: flex; width: 24px; height: 100%; min-height: 0; align-items: flex-end; overflow: hidden; border-radius: 2px; background: #303640; }
.meter-fill { width: 100%; height: 0; border-radius: inherit; background: #829598; transition: height .08s linear, background-color .12s; }
.meter-fill.good { background: var(--teal); }
.meter-fill.near-clip { background: #edc76a; }
.meter-fill.clipping { background: var(--coral); }
.controls { display: flex; flex-wrap: wrap; gap: 9px; }
.button-record { min-width: 156px; background: var(--coral); color: white; }
.button-stop { border: 1px solid #414853; background: #303640; color: var(--ink); }
.button-stop:hover:not(:disabled) { background: #414853; }
.storage-panel { padding: 23px; }
.saved-total { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; }
.saved-total span { color: var(--muted); }
.saved-total strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.storage-recordings { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.storage-recordings .take-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 9px 0; }
.storage-recordings .take-row:first-child { border-top: 0; }
.storage-recordings .take-title { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.storage-recordings .take-actions { flex-wrap: wrap; justify-content: start; }
.storage-recordings .take-action { min-height: 30px; padding: 5px 8px; }
.room-panel { margin-top: 18px; padding: 21px 24px; }
.room-heading, .room-actions, .remote-audio-row, .invite-input-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.room-heading-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.room-heading h2 { margin: 0 0 5px; font-size: 15px; }
.room-heading p, .guest-request-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.room-role-label, .request-step { color: var(--teal); font-size: 9px; font-weight: 850; letter-spacing: .04em; }
.room-actions { justify-content: start; flex-wrap: wrap; margin-top: 17px; }
.room-actions .button-primary { width: auto; margin: 0; }
.room-actions .button-quiet { margin: 0; }
.room-panel.guest-mode .room-role-label { color: var(--teal); }
.invite-field { margin: 16px 0 0; }
.invite-input-row input { flex: 1; }
.invite-input-row .button-quiet { flex: 0 0 auto; margin: 0; }
.guest-request-card[hidden] { display: none; }
.participant-request-button { display: inline-flex; width: 38px; height: 38px; flex: 0 0 38px; align-items: center; justify-content: center; margin: 0; padding: 0; }
.waveform-track-title .participant-request-button { margin-right: 8px; }
.button-danger { min-height: 44px; border: 1px solid rgb(255 89 107 / 40%); background: transparent; color: #ff8792; }
.button-danger:hover:not(:disabled) { border-color: var(--coral); background: #3a2027; }
.remote-audio-row { justify-content: start; margin-top: 14px; padding-top: 13px; }
.call-state { color: var(--muted); font-size: 10px; }
.connection-stats { flex: 1 1 auto; margin: 0; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; text-align: right; }
.remote-audio-row .button-quiet { margin: 0; }
#remoteAudio { width: min(100%, 240px); height: 30px; }
.take-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 15px; border-top: 1px solid var(--line); padding: 13px 0; }
.take-info { min-width: 0; }
.participant-setup { display: grid; align-content: start; gap: 8px; }
.participant-setup .field { margin: 0; }
.participant-setup .field input { height: 42px; padding: 8px 10px; }
.participant-setup .device-row { margin: 0; }
.participant-setup .inline-message { margin: 0; }
.participant-setup > .button-primary {
  margin-top: 8px;
  padding: 8px 14px;
}
.take-heading { display: flex; align-items: center; gap: 6px; min-width: 0; }
.take-title { display: block; margin: 0; font-size: 11px; font-weight: 850; }
.take-collection-indicator {
  flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--teal);
  animation: take-collection-pulse 1.8s ease-in-out infinite alternate;
}
@keyframes take-collection-pulse { to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .take-collection-indicator { animation: none; } }
.take-meta { margin: 3px 0 0; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; line-height: 1.4; }
.take-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.take-action { min-height: 32px; border: 1px solid var(--line); border-radius: 4px; background: #14181e; padding: 6px 9px; color: var(--ink); font-size: 9px; font-weight: 800; white-space: nowrap; }
.take-action:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.take-action:disabled { opacity: .4; }
a.take-action { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.waveform-panel { margin-top: 18px; overflow: hidden; padding: 17px 20px 15px; }
.waveform-track + .waveform-track { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 17px; }
.remote-waveform-tracks:empty { display: none; }
.remote-waveform-tracks:not(:empty) { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 17px; }
.remote-waveform-tracks .waveform-track + .waveform-track { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 17px; }
.waveform-heading { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.waveform-input-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.waveform-device-field { min-width: 0; width: 240px; max-width: 100%; }
.waveform-device-field select { width: 100%; }
.waveform-device-field select:disabled { opacity: .5; cursor: not-allowed; }
.waveform-device-field select.remote-waveform-device:disabled { opacity: .5; cursor: not-allowed; appearance: none; }
.waveform-track-title { position: relative; display: flex; min-width: 0; align-items: center; }
.participant-remove-button { display: inline-flex; flex: 0 0 38px; width: 38px; height: 38px; align-items: center; justify-content: center; margin: 0 8px 0 0; padding: 0; }
.waveform-track-title h3 { margin: 0 0 3px; font-size: 11px; font-weight: 850; }
.waveform-track-title p { margin: 0; color: var(--muted); font-size: 9px; }
.remote-mute-state { display: inline-flex; width: 64px; min-width: 64px; height: 24px; min-height: 24px; justify-content: center; align-items: center; border: 1px solid var(--line); border-radius: 3px; padding: 2px 3px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.remote-mute-state.wait { display: none; }
.remote-mute-state.muted { border-color: rgb(255 89 107 / 45%); background: #3a2027; color: #ff8792; }
.remote-mute-state.unmuted { border-color: rgb(85 214 178 / 35%); background: var(--teal-soft); color: var(--teal); }
.waveform-timeline { display: flex; justify-content: space-between; margin: 18px 0 5px 43px; color: #69727f; font: 8px ui-monospace, SFMono-Regular, Menlo, monospace; }
.waveform-canvas-wrap { height: var(--waveform-box-height); overflow: hidden; border: 1px solid #2b333c; border-radius: 3px; background-color: #11161b; background-image: linear-gradient(rgb(109 126 139 / 9%) 1px, transparent 1px), linear-gradient(90deg, rgb(109 126 139 / 9%) 1px, transparent 1px); background-size: 100% 25%, 10% 100%; }
#waveformCanvas, .remote-waveform-canvas { display: block; width: 100%; height: 100%; }
.studio-notice-panel { position: relative; height: 48px; box-sizing: border-box; margin: 18px 0; padding: 0 16px; border: 1px solid var(--line); background: #101916; display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 12px; }
.studio-notice-content { min-width: 0; display: flex; align-items: center; gap: 12px; }
.notice-target { flex: 0 0 100px; font-size: 11px; color: var(--yellow); }
#notice { min-width: 0; margin: 0; font-size: 12px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-notice-panel[data-severity="error"] { border-color: #693c40; }
.studio-notice-panel[data-severity="error"] .notice-target { color: #ff898e; }
.studio-notice-panel[data-severity="warning"] .notice-target { color: var(--yellow); }
#networkEventPanel { scroll-margin-top: 16px; }
@media (max-width: 600px) {
  .studio-notice-panel { grid-template-columns: 58px minmax(0, 1fr); padding: 0 10px; gap: 8px; }
  .studio-notice-content { gap: 8px; }
  .notice-target { flex-basis: 78px; font-size: 10px; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
