/* Only the ClinMate workspace overview uses an in-frame control. */
#products #cx-demo-workspace .cx-workspace-frame .inline-player-workspace {
  display: grid;
  align-items: center;
  height: 100%;
}

#products #cx-demo-workspace .cx-workspace-frame .inline-player-screen {
  position: relative;
  width: min(100%, calc((var(--cx-screen-height) + 44px) * 1280 / 860));
  height: auto;
  aspect-ratio: 1280 / 860;
  margin-inline: auto;
}

#products #cx-demo-workspace .cx-workspace-frame .inline-player-screen .product-inline-video {
  height: 100%;
}

@media (max-width: 760px) {
  #products #cx-demo-workspace .cx-workspace-frame .inline-player-screen {
    width: min(100%, calc((var(--cx-screen-height) + 161px) * 1280 / 860));
    height: auto;
  }

  #products #cx-demo-workspace .cx-workspace-frame .inline-player-screen .product-inline-video {
    height: 100%;
  }
}

#products #cx-demo-workspace .inline-player-workspace .inline-player-play,
#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) .inline-player-teaching .inline-player-play {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-end: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid hsl(var(--disclosure-line));
  border-radius: 50%;
  background: hsl(var(--disclosure-paper) / 0.94);
  color: hsl(var(--disclosure-accent));
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
  z-index: 2;
}

#products #cx-demo-workspace .inline-player-workspace .inline-player-play:hover,
#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) .inline-player-teaching .inline-player-play:hover {
  background: hsl(var(--disclosure-hover));
  border-color: hsl(var(--disclosure-accent));
  transform: translateY(-5px);
}

#products #cx-demo-workspace .inline-player-workspace .inline-player-play:focus-visible,
#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) .inline-player-teaching .inline-player-play:focus-visible {
  outline: 2px solid hsl(var(--disclosure-accent));
  outline-offset: 3px;
}

@media (pointer: coarse) {
  #products #cx-demo-workspace .inline-player-workspace .inline-player-play,
#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) .inline-player-teaching .inline-player-play {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #products #cx-demo-workspace .inline-player-workspace .inline-player-play,
#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) .inline-player-teaching .inline-player-play {
    transition: none;
  }
}
/* Selected clinical recordings fill the selector row without a timeline. */
#products .cx-layout:has(:is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching):not([hidden])) .cx-stage {
  position: relative;
  align-self: stretch;
  height: auto;
}

#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) .cx-media-panel {
  position: relative;
  flex: 1;
  min-height: 0;
}

#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) .inline-player-teaching {
  position: absolute;
  inset: 0;
}

#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) .inline-player-screen,
#products :is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching) .inline-player-screen .product-inline-video {
  height: 100%;
}

@media (max-width: 760px) {
  #products .cx-layout:has(:is(#clinmate-ads, #clinmate-cds, #clinmate-research, #clinmate-teaching):not([hidden])) .cx-stage {
    height: 480px;
  }
}

/* Native tracks retain timing; this overlay gives captions breathing room. */
#products .cx-explorer .inline-player-caption {
  position: absolute;
  inset-block-end: 14px;
  inset-inline: 60px;
  width: fit-content;
  max-width: calc(100% - 120px);
  margin-inline: auto;
  padding: 9px 24px;
  border-radius: 8px;
  background: hsl(var(--disclosure-surface) / 0.96);
  color: var(--ink);
  font-size: calc(.85rem - 2px);
  font-weight: 400;
  line-height: 1.65;
  text-align: center;
  white-space: pre-line;
  word-break: normal;
  overflow-wrap: break-word;
  pointer-events: none;
  z-index: 1;
}

#products .cx-explorer .inline-player-caption[hidden] {
  display: none;
}

#products .cx-explorer .inline-player-teaching .inline-player-caption {
  font-size: calc(1rem - 5px);
}

@media (max-width: 760px) {
  #products .cx-explorer .inline-player-caption {
    inset-inline: 12px 60px;
    max-width: calc(100% - 72px);
    padding: 8px 18px;
  }
}

/* Center the complete support illustration, with a quiet control at the edge. */
#products .cx-layout:has(.cx-pane:not([hidden]) .cx-illustration) .cx-stage {
  position: relative;
  align-self: stretch;
  height: auto;
}

#products .cx-pane:has(.cx-illustration) {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 20px 0 56px;
}

#products .cx-pane .cx-illustration {
  width: min(680px, 100%);
  min-width: 0;
  min-height: 0;
  margin-inline: auto;
}

#products .cx-illustration .clinmate-support-motion {
  width: 94%;
  max-height: none;
}

#products .cx-illustration-steps {
  margin-top: 8px;
  font-size: calc(.9375rem - 2px);
}

#products .cx-illustration-steps span {
  min-width: 0;
  white-space: normal;
}

#products .cx-layout:has(.cx-pane:not([hidden]) .cx-illustration)
  .cx-stage > .cx-motion-toggle.site-playback-control {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid hsl(var(--disclosure-line));
  border-radius: 50%;
  background: hsl(var(--disclosure-paper) / 0.94);
  color: hsl(var(--disclosure-accent));
}

#products .cx-layout:has(.cx-pane:not([hidden]) .cx-illustration)
  .cx-stage > .cx-motion-toggle.site-playback-control:hover {
  background: hsl(var(--disclosure-hover));
  border-color: hsl(var(--disclosure-accent));
}

@media (max-width: 760px) {
  #products .cx-layout:has(.cx-pane:not([hidden]) .cx-illustration) .cx-stage {
    height: 300px;
  }
}

@media (pointer: coarse) {
  #products .cx-layout:has(.cx-pane:not([hidden]) .cx-illustration)
    .cx-stage > .cx-motion-toggle.site-playback-control {
    width: 44px;
    height: 44px;
  }
}
