.session-review {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 18px 18px;
}
.session-review h2 {
  margin: 0 0 8px;
  font-size: 20px;
}
.review-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}
.review-event-controls {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.review-event-controls .review-follow {
  margin: 0;
}
.review-pages {
  margin: 0;
}
.review-pages button {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}
.review-pages span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.review-toolbar input {
  flex: 1;
  min-width: 120px;
}
.review-toolbar output {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.review-timeline-events {
  position: relative;
  height: 38px;
  margin: -12px 4px 14px;
  border-bottom: 1px solid var(--line);
}
.timeline .review-timeline-events {
  position: absolute;
  top: 20px;
  right: 0;
  left: 0;
  height: 40px;
  margin: 0;
  pointer-events: none;
  border-bottom: 0;
}
.review-timeline-playhead {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: var(--text);
  pointer-events: none;
}
.review-timeline-mark {
  position: absolute;
  top: 0;
  width: 7px;
  min-width: 7px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  border-radius: 3px;
  background: #5481a0;
  pointer-events: auto;
}
.review-timeline-mark[data-channel="activity"] {
  top: 0;
  height: 7px;
  min-height: 7px;
  background: #63b79d;
}
.review-timeline-mark[data-channel="console"] {
  top: 9px;
  height: 7px;
  min-height: 7px;
  background: #c89a57;
}
.review-timeline-mark[data-channel="network"] {
  top: 18px;
  height: 7px;
  min-height: 7px;
}
.review-timeline-mark[data-channel="performance"] {
  top: 27px;
  height: 7px;
  min-height: 7px;
  background: #8576b9;
}
.review-timeline-mark[data-error="true"] {
  background: #da6d64;
}
.review-timeline-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: -10px 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.review-timeline-legend span::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 2px;
  background: #5481a0;
  content: "";
}
.review-timeline-legend span[data-channel="activity"]::before {
  background: #63b79d;
}
.review-timeline-legend span[data-channel="console"]::before {
  background: #c89a57;
}
.review-timeline-legend span[data-channel="performance"]::before {
  background: #8576b9;
}
.review-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  border-bottom: 1px solid var(--line);
}
.review-tabs button {
  flex: 0 1 auto;
  max-width: 100%;
  margin-inline: 2px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  background: transparent;
}
.review-tabs button:enabled:hover {
  background: var(--hover);
  border-color: transparent;
  border-bottom-color: var(--line);
}
.review-tabs [aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.review-tabs [aria-selected="true"]:enabled:hover {
  border-bottom-color: var(--accent);
}
.review-events {
  max-height: 360px;
  overflow: auto;
  margin-top: 2px;
  overscroll-behavior: contain;
}
.review-event {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.review-event[aria-current="true"] {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.review-event time {
  flex: 0 0 48px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.review-event-label {
  min-width: 0;
}
.review-event-tag {
  --tag-color: #4c8270;
  flex: 0 0 auto;
  color: var(--tag-color);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  text-transform: capitalize;
}
.review-event-tag[data-channel="console"] {
  --tag-color: #a07537;
}
.review-event-tag[data-channel="network"] {
  --tag-color: #5481a0;
}
.review-event-tag[data-channel="performance"] {
  --tag-color: #8576b9;
}
.review-event-tag[data-channel="environment"] {
  --tag-color: #627482;
}
.review-event[data-future="true"] {
  opacity: 0.65;
}
.review-detail {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 10px;
}
.review-detail summary {
  cursor: pointer;
  padding: 10px 12px;
}
.review-detail pre {
  max-height: 200px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.review-guide {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.review-guide summary {
  cursor: pointer;
}
.session-replay {
  width: 100%;
  height: 360px;
  border: 1px solid var(--line);
  background: white;
}
.review-annotations {
  max-height: 340px;
  overflow: auto;
  margin: 16px 0;
}
.review-annotations h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.review-annotation {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.review-annotation > button {
  flex: 0 0 108px;
  padding: 0;
  overflow: hidden;
}
.review-annotation img {
  display: block;
  width: 108px;
  height: 72px;
  object-fit: cover;
}
.review-annotation > div {
  min-width: 0;
  flex: 1;
}
.review-annotation p {
  margin: 0 0 8px;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.review-annotation > div button {
  padding: 6px 9px;
  font-size: 12px;
}
.review-annotation-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--canvas);
}
.review-annotation-dialog::backdrop {
  background: rgb(0 0 0 / 55%);
}
.review-annotation-dialog h3 {
  margin: 0 0 12px;
  font-size: 17px;
}
.review-annotation-dialog img {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  margin-top: 16px;
}
.review-annotation-dialog p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .session-review {
    padding: 12px;
  }
  .review-tabs {
    gap: 4px;
  }
  .session-replay {
    height: 260px;
  }
}
.review-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
  font-size: 13px;
  font-weight: 400;
}
.review-follow {
  margin-top: 8px;
  min-height: 32px;
  padding: 4px 10px;
  color: var(--text);
  font-size: 12px;
}
.review-follow[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.review-mode input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
}
#saved-frames > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}
#saved-frames img {
  max-width: 160px;
  border: 1px solid var(--line);
}
#saved-frames span {
  flex: 1;
  min-width: 140px;
  font-size: 13px;
}

.has-recording main {
  width: min(1180px, calc(100% - 40px));
}
.has-recording #start,
.has-recording #debug-status {
  display: none;
}
.review-workspace {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 24px 0;
}
.review-primary,
.review-secondary {
  display: contents;
}
.review-workspace[data-layout="side"] {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr);
  /* A tall inspector must not expand the video row away from its timeline. */
  grid-template-rows: auto min-content minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 0;
}
.review-workspace[data-layout="side"] .review-primary {
  display: contents;
}
.review-workspace[data-layout="side"] .review-secondary {
  display: contents;
}
.review-workspace[data-layout="side"] #trim-playback {
  grid-column: 1 / -1;
  grid-row: 1;
}
.review-workspace[data-layout="side"] #preview {
  grid-column: 1;
  grid-row: 2;
}
.review-workspace[data-layout="side"] #editing {
  grid-column: 1;
  grid-row: 3;
}
.review-workspace[data-layout="side"] #capture-inspector {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: start;
}
.review-workspace[data-layout="side"]
  :is(#video-edit-tools, #saved-frames, #review, #status, #thread) {
  grid-column: 1 / -1;
}
.review-workspace[data-layout="side"] #video-edit-tools,
.review-workspace[data-layout="side"] #review {
  margin-top: 16px;
}
.review-workspace[data-layout="side"] .session-review {
  width: 100%;
}
@media (max-width: 900px) {
  .review-workspace[data-layout="side"] {
    display: flex;
  }
  .review-workspace[data-layout="side"] .review-primary,
  .review-workspace[data-layout="side"] .review-secondary {
    display: contents;
  }
  #review-layout {
    display: none;
  }
}
.review-workspace #preview {
  order: 1;
  width: 100%;
  max-height: min(42vh, 360px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.video-large .review-workspace #preview {
  max-height: min(72vh, 760px);
}
.review-workspace .session-review {
  order: 3;
  margin: 0;
  min-width: 0;
}
.review-workspace #editing {
  order: 2;
  margin-top: 0;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--workbench);
}
.review-workspace #preview:not(:has(+ #editing:not([hidden]))) {
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
}
.review-workspace #video-edit-tools {
  order: 4;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
}
.review-workspace #video-edit-tools > summary {
  cursor: pointer;
  font-weight: 600;
}
.review-workspace #saved-frames {
  order: 5;
  margin-top: 16px;
}
.review-workspace #review {
  order: 6;
  margin-top: 16px;
}
.review-workspace #status {
  order: 7;
}
.review-workspace #thread {
  order: 8;
}
.has-recording #editing,
.has-recording #review,
.has-recording #saved-frames {
  max-width: none;
}

.recording-demo {
  --line: #dfe3da;
  --muted: #596054;
  --text: #20241e;
  --accent: #17324d;
  --on-accent: #fff;
  --hover: #f6f7f3;
  --canvas: #fff;
  color: var(--text);
  background: var(--canvas);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 13px;
  line-height: 1.45;
  width: 100%;
  min-width: 0;
}
.recording-demo *,
.recording-demo *::before,
.recording-demo *::after {
  box-sizing: border-box;
}
.recording-demo .recording-page {
  display: block;
  width: 100%;
  height: auto;
  max-height: var(--recording-preview-height, none);
  object-fit: contain;
}
.recording-demo .session-review {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 12px 12px;
}
.recording-demo button {
  color: var(--text);
  font: inherit;
  cursor: pointer;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.recording-demo button:focus-visible,
.recording-demo input:focus-visible,
.recording-demo summary:focus-visible {
  outline: 2px solid #3875a9;
  outline-offset: 2px;
}
.recording-demo .session-review > .review-toolbar {
  margin: 4px 0 14px;
  flex-wrap: nowrap;
  gap: 8px;
}
.recording-demo .session-review > .review-toolbar > button {
  display: none;
}
.recording-demo .review-toolbar input {
  min-width: 0;
  accent-color: var(--accent);
}
.recording-demo .review-toolbar output {
  flex: 0 0 auto;
  font-size: 12px;
}
.recording-demo .review-timeline-events {
  margin-bottom: 8px;
}
.recording-demo .review-tabs {
  gap: 2px;
}
.recording-demo .review-tabs button {
  padding: 7px 6px;
  font-size: 12px;
  margin: 0;
  border-radius: 4px 4px 0 0;
  border: 0;
  border-bottom: 2px solid transparent;
}
.recording-demo .review-tabs [aria-selected="true"] {
  border-bottom-color: var(--accent);
  /* Selection already has color + underline. Changing label width can wrap
     a tab onto another row and move the entire page on some system fonts. */
  font-weight: 400;
}
.recording-demo .review-event-controls {
  margin: 7px 0;
}
.recording-demo .review-follow {
  padding: 4px 8px;
  font-size: 12px;
}
.recording-demo .review-follow[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.recording-demo .review-mode {
  display: var(--recording-mode-display, block);
  font-size: 12px;
  margin: 5px 0;
}
.recording-demo .review-events {
  height: var(--recording-event-height, 160px);
  max-height: var(--recording-event-height, 160px);
  scrollbar-color: #9caca0 #f6f7f3;
  scrollbar-width: thin;
}
.recording-demo .review-event {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 9px 6px;
  font-size: 12px;
  gap: 6px;
  background: transparent;
}
.recording-demo .review-event[aria-current="true"] {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.recording-demo .review-event time {
  flex-basis: 42px;
}
.recording-demo .review-event-tag {
  font-size: 10px;
}
.recording-demo .review-error .review-event-label {
  color: #a43e17;
}
.recording-demo .review-guide {
  display: var(--recording-guide-display, block);
  margin: 8px 0 0;
  font-size: 11px;
}
.recording-demo .review-detail pre {
  max-height: 120px;
}
.recording-demo .hint {
  font-size: 12px;
}
.recording-demo ::selection {
  background: #e4efc3;
  color: #20241e;
}
@media (max-width: 480px) {
  .recording-demo .session-review {
    padding-inline: 8px;
  }
  .recording-demo .review-tabs button {
    padding-inline: 4px;
    font-size: 11px;
  }
}

@media (min-width: 601px) {
  .recording-demo .review-tabs button {
    min-height: 32px;
  }
}
