/* Studio stage styles (app/javascript/studio/stage.js). The default look is the holiday-bundle landing page's
   frost section; &bg=0 makes the page transparent for embeds and snapshots, &fill=1 fills the window. */
:root {
  --bl-frost: #e8f1f7; --bl-frost-2: #f3f8fb; --bl-ice: #9cc3dd; --bl-ink: #163a2a; --bl-ink-2: #4a5e52;
  --bl-berry: #b11226; --bl-bar: rgba(255, 255, 255, .78); --bl-line: rgba(22, 58, 42, .16);
  --bl-ui: ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --bl-w: min(560px, calc(100vw - 32px));
  color-scheme: light;
}
:root[data-bl-size="desktop"] { --bl-w: 330px; }
:root[data-bl-size="phone"] { --bl-w: 210px; }
html.bl, html.bl body { height: 100%; margin: 0; background: var(--bl-frost); color: var(--bl-ink); font-family: var(--bl-ui); }
.bl-root { position: relative; min-height: 100%; display: grid; grid-template-rows: 1fr auto; overflow: hidden;
           padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); box-sizing: border-box; }
.bl-backdrop { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 52%, var(--bl-frost-2) 0%, rgba(243, 248, 251, 0) 70%),
              linear-gradient(180deg, #edf4f9 0%, var(--bl-frost) 60%, #e1ecf4 100%); }
.bl-frame { position: relative; display: grid; place-items: center; padding-block: 16px; }
.bl-stage { position: relative; width: var(--bl-w); aspect-ratio: 1 / 1; max-width: 100%; }
.bl-stage canvas { display: block; }
.bl-status { position: absolute; inset: 0; display: grid; place-items: center; font: 500 13px/1.4 var(--bl-ui); color: var(--bl-ink-2); text-align: center; padding: 16px; }
.bl-status.is-error { color: var(--bl-berry); }
.bl-status[hidden], [hidden] { display: none !important; }
.bl-bar { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
          margin: 0 auto 14px; padding: 8px 12px; max-width: 760px; border-radius: 12px; background: var(--bl-bar);
          border: 1px solid var(--bl-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 12px; }
.bl-btn, .bl-seg-btn { font: 600 12px/1 var(--bl-ui); color: var(--bl-ink); background: #fff; border: 1px solid var(--bl-line);
                       border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.bl-btn[aria-pressed="true"], .bl-seg-btn[aria-pressed="true"] { background: var(--bl-ink); color: #fff; border-color: var(--bl-ink); }
.bl-btn:focus-visible, .bl-seg-btn:focus-visible, .bl-scrub:focus-visible { outline: 2px solid var(--bl-berry); outline-offset: 2px; }
.bl-play { min-width: 64px; }
.bl-scrub { width: min(220px, 60vw); accent-color: var(--bl-berry); }
.bl-seg { display: inline-flex; align-items: center; gap: 4px; }
.bl-seg-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--bl-ink-2); margin-right: 2px; }
.bl-seg .bl-seg-btn { border-radius: 0; margin-left: -1px; }
.bl-seg .bl-seg-btn:first-of-type { border-radius: 8px 0 0 8px; margin-left: 0; }
.bl-seg .bl-seg-btn:last-of-type { border-radius: 0 8px 8px 0; }
.bl-fps { font-variant-numeric: tabular-nums; color: var(--bl-ink-2); min-width: 9ch; text-align: right; }
.bl-noui .bl-frame { padding-block: 0; }
.bl-noui { grid-template-rows: 1fr; }
.bl-nobg, html.bl-nobg body { background: transparent !important; }
/* v2: orbit controls on the stage */
.bl-stage { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; outline: none; }
.bl-stage.is-dragging { cursor: grabbing; }
html.bl-noorbit .bl-stage { cursor: default; touch-action: auto; } /* ?orbit=0: the page drives the view */
.bl-stage:focus-visible { outline: 2px solid var(--bl-berry); outline-offset: 4px; border-radius: 6px; }
.bl-hint { position: relative; z-index: 2; text-align: center; font: 400 11.5px/1.4 var(--bl-ui); color: var(--bl-ink-2); margin: -6px auto 14px; padding: 0 16px; }
/* fill=1: the stage fills the window at its aspect (embeds, the admin workbench) */
html.bl-fill .bl-root { padding: 0; }
html.bl-fill .bl-frame { padding: 0; height: 100vh; }
html.bl-fill .bl-stage { width: min(100vw, calc(100vh * var(--bl-aspect, 1))); max-width: none; }
/* fill=window: the stage is the whole window, any shape (the holiday-bundle page's showcase) */
html.bl-fillw .bl-root { padding: 0; }
html.bl-fillw .bl-frame { padding: 0; height: 100vh; }
html.bl-fillw .bl-stage { width: 100vw; height: 100vh; aspect-ratio: auto; max-width: none; }
