/* Shared presentation surfaces. Load after route, product and mobile styles. */
@property --rp-camera-zoom {
  syntax:"<number>";
  inherits:true;
  initial-value:1;
}
:root {
  --rz-preview-radius:8px;
  --rz-preview-border:#c8c8c8;
  --rz-preview-shadow:0 16px 40px rgba(28,24,44,.12);
}
html[data-theme=dark] {
  --rz-preview-border:#505050;
  --rz-preview-shadow:0 16px 40px rgba(0,0,0,.36);
}

/* Draw one opaque gray stroke inside the visible frame without changing canvas
   measurements. The overlay keeps opaque app layers from covering the edge. */
html body main :is(.rz-motion-scene,.rz-browser-shell,.rz-code-laptop__lid,
  .rz-code-laptop__viewport,.rz-engage-demo,.rz-player-design-demo,
  .rz-streamers-app,.rz-streamers-hero__media,.sp-demo,.sp-url),
html body main :is(.rz-hero__visual,.rz-feature-hero__visual,.rz-solution-hero__visual)>img[src*=".gif"] {
  border-color:transparent!important;
  border-radius:var(--rz-preview-radius)!important;
  box-shadow:var(--rz-preview-shadow)!important;
  outline:0!important;
}
html body main :is(.rz-engage-demo,.rz-player-design-demo,.rz-streamers-hero__media) {
  position:relative;
}
html body main :is(.rz-motion-scene,.rz-browser-shell,.rz-code-laptop__lid,
  .rz-code-laptop__viewport,.rz-engage-demo,.rz-player-design-demo,
  .rz-streamers-app,.rz-streamers-hero__media,.sp-demo,.sp-url):before {
  position:absolute;
  inset:0;
  z-index:100;
  box-sizing:border-box;
  border:1px solid var(--rz-preview-border);
  border-radius:inherit;
  background:none;
  box-shadow:none;
  pointer-events:none;
  content:"";
}
/* Replaced images have no pseudo-elements and can draw their own inset edge. */
html body main :is(.rz-hero__visual,.rz-feature-hero__visual,.rz-solution-hero__visual)>img[src*=".gif"] {
  outline:1px solid var(--rz-preview-border)!important;
  outline-offset:-1px;
}

/* The enclosing screen supplies the frame; avoid stacked shadows and corner seams. */
html body main .rz-story__images.is-motion {
  border-radius:var(--rz-preview-radius)!important;
  overflow:visible!important;
}
html body :is(.rz-code-laptop__viewport,.rz-browser-shell__canvas) .rz-motion-scene {
  border-radius:0!important;
  box-shadow:none!important;
  outline:0!important;
}
html body .rz-code-laptop__viewport {box-shadow:none!important;outline:0!important}
html body :is(.rz-engage-demo,.rz-player-design-demo):has(.rz-motion-scene) {
  box-shadow:none!important;
  outline:0!important;
}
html body .rz-motion-canvas>:is(.rz-broadcaster-preview,.rz-motion-app,.rz-streamers-app) {
  border-color:transparent!important;
  border-radius:0!important;
  box-shadow:none!important;
  outline:0!important;
}
html body .rz-engage-demo .rz-radio-demo {border-radius:0;box-shadow:none}
html body :is(.rz-code-laptop__viewport,.rz-browser-shell__canvas) .rz-motion-scene:before,
html body .rz-code-laptop__viewport:before,
html body :is(.rz-engage-demo,.rz-player-design-demo):has(.rz-motion-scene):before,
html body .rz-motion-canvas>:is(.rz-broadcaster-preview,.rz-motion-app,.rz-streamers-app):before {
  content:none!important;
}
/* Streamers scales its whole app, so compensate to keep a one-pixel stroke. */
html body .sp-showcase :is(.sp-demo,.sp-url):before {
  border-width:calc(1px / var(--sp-demo-scale,1));
}

/* Compensate for both responsive canvas scaling and the preview camera zoom.
   Cards keep the same visible corners as the unscaled outer frame. */
html body .rz-zeus-preview .rp-camera-content {
  transition:transform 600ms cubic-bezier(.22,.68,.25,1),--rp-camera-zoom 600ms cubic-bezier(.22,.68,.25,1)!important;
}
@media(prefers-reduced-motion:reduce) {
  html body .rz-zeus-preview .rp-camera-content {transition:none!important}
}
html body .rz-zeus-preview,
html body .rz-zeus-preview :is(.rp-camera-content,.rp-live-shell) {
  --rp-radius:calc(var(--rz-preview-radius) / var(--rz-canvas-scale,1) / var(--rp-camera-zoom,1));
  --rp-card-radius:var(--rp-radius);
  --rp-art-radius:var(--rp-radius);
}
html body .rz-zeus-preview :is(
  .rp-panel,.rp-mini-player,.rp-dropzone,.rp-playlist-page,.rp-calendar,.rp-event,
  .rp-queue-banner,.rp-deck-now,.rp-deck-wave,.rp-studio-sources,.rp-embed,
  .rp-api-consumer,.rp-api-player,.rp-episode-row,.rp-episode-preview,
  .rp-episode-drop,.rp-episode-transfer,.rp-public-show,.rp-hook-info,.rp-hook-payload,
  .rp-api-console,.rp-world-map,.rp-agenda-program,.rp-queue-programs,
  .rp-queue-table-wrap,.rp-week-song,.rp-queue-confirmation,.rp-report-chart,
  .rp-report-details,.rp-station-menu,.rp-preview-dialog,.rp-current-song,.rp-studio-tools,
  .rp-audio-toggle,.rp-public-episode,.rp-color-palette,.rp-live-drag,.rp-public-player,
  .rp-art,.rp-file-art,.rp-playlist-art,.rp-episode-art,.rp-public-show-cover,
  .rp-podcast-symbol,.rp-preset-surface,.rp-live-added-track,
  .rp-stats>div,.rp-queue-days>span,.rp-source-pads>span,.rp-soundboard>div,
  .rp-hook-flow>div,.rp-hook-triggers>div,.rp-presets>:is(button,span),.rp-presets i,
  .rp-podcast-cards>div,.rp-podcast-cards>article,.rp-crossfade-methods>label
) {border-radius:var(--rp-radius)!important}
/* Appearance's working corner-radius control still styles its sample output. */
html body .rz-zeus-preview .rp-player:not(.rp-widget-stage .rp-player) {
  border-radius:var(--rp-radius)!important;
}

/* The original illustrations and Streamers use the same surface contract. */
html body .rz-motion-canvas :is(
  .rz-motion-app,.rz-now-playing,.rz-motion-stats>span,.rz-motion-queue,
  .rz-schedule-grid,.rz-schedule-event,.rz-live-decks article,.rz-live-mixer,
  .rz-live-bottom section,.rz-analytics-panel,.rz-analytics-locations,
  .rz-streamers-player,.rz-streamers-genres article,.rz-streamers-cover,
  .rz-streamers-genres article>span,.rz-now-playing__art,.rz-live-cover,
  .rz-bc-panel,.rz-bc-settings-card,.rz-bc-public-card,.rz-bc-sx-card
) {border-radius:calc(var(--rz-preview-radius) / var(--rz-canvas-scale,1))!important}
html body :is(.rz-radio-demo__cover,.sp-station,.sp-note) {
  border-radius:var(--rz-preview-radius);
}
html body .sp-showcase .sp-top {
  border-radius:calc(var(--rz-preview-radius) / var(--sp-demo-scale,1)) calc(var(--rz-preview-radius) / var(--sp-demo-scale,1)) 0 0;
}
html body .sp-showcase .sp-player {
  border-radius:0 0 calc(var(--rz-preview-radius) / var(--sp-demo-scale,1)) calc(var(--rz-preview-radius) / var(--sp-demo-scale,1));
}
html body .sp-showcase :is(.sp-demo,.sp-url,.sp-station,.sp-note) {
  border-radius:calc(var(--rz-preview-radius) / var(--sp-demo-scale,1))!important;
}
