/* Owner artwork, trimmed and measured at source resolution. Each cap is fixed
   in CSS pixels; the larger PNG keeps curved edges sharp on high-density phones.
   See assets/brand/action-buttons-20261020 for untouched masters and provenance. */
:root {
  --ew-button-primary-image: url('/assets/brand/action-buttons/primary-gold.png');
  --ew-button-primary-slice: 100;
  --ew-button-primary-cap: 20px;
  --ew-button-secondary-image: url('/assets/brand/action-buttons/secondary-gold.png');
  --ew-button-secondary-slice: 80;
  --ew-button-secondary-cap: 16px;
}
/* Keep labels native and selection cards/camera pixels untouched. */
body.storybook :is(.button, .magic-capture-shutter) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px !important;
  max-width: 100%;
  padding: 11px 20px;
  font-family: inherit;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
}
/* Owner command labels: capitals and a genuinely bold Lancelot face. The brand
   resets every descendant to regular and disables synthesis, so cover native
   label children too. Image-card copy and children's names retain their style. */
body.storybook :is(button, summary, .button, .back, .text-option,
  .ew-header-home, .ew-header-menu-panel a, .experience-text-link):not(
  .choice, .elf-sticker-card, .journey-sticker-card, .santa-call-name-choice),
body.storybook :is(button, summary, .button, .back, .text-option,
  .ew-header-home, .ew-header-menu-panel a, .experience-text-link):not(
  .choice, .elf-sticker-card, .journey-sticker-card, .santa-call-name-choice) *,
body.storybook .choice-label {
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-synthesis: weight;
  /* A clear same-colour stroke adds real weight to regular-only Lancelot
     without changing the label width, button placement or approved palette. */
  -webkit-text-stroke: .8px currentColor;
}
body.storybook :is(.button, .magic-capture-shutter):focus-visible {
  outline: 2px solid #DFB87A;
  outline-offset: 4px;
}
body.storybook :is(.button, .magic-capture-shutter):disabled {
  opacity: .4;
  cursor: default;
}
body.storybook :is(.button, .magic-capture-shutter)[aria-disabled="true"] {
  opacity: .4;
}

/* Configure each image, source-pixel slice and CSS-pixel cap independently.
   Rendering on a non-interactive layer keeps large source caps from consuming
   the label's touch area. Corners stay fixed; edges and centre stretch.
   Do not enable data-ew-action-buttons="ready" without both final PNGs. */
html[data-ew-action-buttons="ready"] body.storybook :is(.button.primary, .button.secondary, .magic-capture-shutter) {
  position: relative;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}
html[data-ew-action-buttons="ready"] body.storybook :is(.button.primary, .magic-capture-shutter) {
  color: #0B1F3A;
}
html[data-ew-action-buttons="ready"] body.storybook .button.secondary {
  color: var(--gold, #f4e5c8);
}
html[data-ew-action-buttons="ready"] body.storybook :is(.button.primary, .button.secondary, .magic-capture-shutter)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  box-sizing: border-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 0;
  pointer-events: none;
  border-image-repeat: stretch;
}
html[data-ew-action-buttons="ready"] body.storybook :is(.button.primary, .magic-capture-shutter)::before {
  border-width: var(--ew-button-primary-cap);
  border-image-source: var(--ew-button-primary-image);
  border-image-slice: var(--ew-button-primary-slice) fill;
  border-image-width: var(--ew-button-primary-cap);
}
html[data-ew-action-buttons="ready"] body.storybook .button.secondary::before {
  border-width: var(--ew-button-secondary-cap);
  border-image-source: var(--ew-button-secondary-image);
  border-image-slice: var(--ew-button-secondary-slice);
  border-image-width: var(--ew-button-secondary-cap);
}
@media (hover: hover) {
  html[data-ew-action-buttons="ready"] body.storybook :is(.button, .magic-capture-shutter):hover:not(:disabled):not([aria-disabled="true"]) {
    background: transparent;
    filter: brightness(1.05);
  }
}
html[data-ew-action-buttons="ready"] body.storybook :is(.button, .magic-capture-shutter):active:not(:disabled):not([aria-disabled="true"]) {
  transform: scale(.98);
  filter: brightness(.94);
}

/* Room/placement actions already sit below the camera. Keep their paired rows
   and finished-media Save/Share layout rather than floating over the picture. */
body.storybook :is(.result-delivery, .product-menu-actions,
  .reindeer-photo-actions, .tree-side-options, .video-adjust-actions, .video-result-links,
  .journey-menu-begin-actions, .journey-recap-actions,
  .santa-call-name-suggestions) { gap: 12px; }
body.storybook .journey-camera-actions { gap: 12px !important; }
body.storybook #placement-editor .video-editor-controls { gap: 12px; }
body.storybook .magic-capture-controls { gap: 12px; }
body.storybook .magic-capture-fallback { margin-top: 0; }

/* These secondary controls are not artwork buttons, but must be as easy to
   touch. Do not retheme gallery cards, progress dots or the call's phone discs. */
body.storybook :is(main, .video-immersive, .welcome-actions) :is(.back, .text-option),
body.storybook :is(.video-close, .magic-capture-fallback,
  .video-more-controls summary, .journey-fine-adjustments summary,
  .product-menu-tips summary,
  .santa-call-name-choice, .santa-call-request, .santa-call-generic,
  .santa-call-resume, #video-room-choice-cancel, #journey-room-choice-cancel) {
  min-height: 48px;
  touch-action: manipulation;
}
body.storybook :is(.magic-capture-close, .santa-chat-close) {
  min-width: 48px;
  min-height: 48px;
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}
body.storybook :is(.ew-header-menu-toggle, .ew-header-home,
  .journey-gallery-controls button, .gallery-back, #experience-menu-toggle) {
  min-width: 48px !important;
  min-height: 48px !important;
}
body.storybook .ew-header-nav { gap: 12px; }
body.storybook .ew-header-menu-panel { display: flex; flex-direction: column; gap: 12px; }
body.storybook .ew-header-menu-panel :is(a, button) { min-height: 48px; }
body.storybook .santa-chat :is(.santa-call-request, .santa-call-generic) {
  margin-top: 12px;
}
body.storybook[data-journey-menu="intro"] .journey-menu-begin-actions .button {
  height: auto;
}

/* A failed Santa preview has one recovery action. Continue returns after a
   successful retry; this never changes media generation or event handlers. */
body.storybook #santa-fit:has(#santa-preview-retry:not([hidden])) #santa-looks-good {
  display: none;
}
/* The selected room already has its own Change photo action. */
body.storybook #santa-photo:has(#santa-use-photo:not([hidden])) .santa-picker {
  display: none;
}
