/* Common subnavigation and option states for the gift workshop. */
[data-workshop] :is(.slot-tabs, .detail-tabs) {
  display:grid;
  grid-template-columns:none;
  grid-auto-flow:column;
  grid-auto-columns:minmax(0,1fr);
  gap:0;
  max-width:none;
  padding:0;
  border:0;
  border-radius:0;
  background:#eee;
  overflow:visible;
}
[data-workshop] :is(.slot-tabs, .detail-tabs) button {
  min-width:0;
  min-height:42px;
  padding:5px 6px;
  border:0;
  border-radius:0;
  box-shadow:none;
  background:transparent;
  color:#55555a;
  font-size:14px;
  line-height:1.18;
  white-space:normal;
}
[data-workshop] :is(.slot-tabs, .detail-tabs) button[aria-pressed=true] {
  background:transparent;
  color:var(--ink);
  font-weight:600;
  box-shadow:inset 0 -2px currentColor;
}
[data-workshop] :is(.slot-tabs, .detail-tabs) button:focus-visible {outline-offset:-3px}
[data-workshop] .detail-tabs button>span,
[data-workshop] .slot-tick,
[data-workshop] .scent-check {display:none}
[data-workshop] :is(.option, .scent-card)[aria-pressed=true] {
  background:#fff;
  border-color:var(--ink);
  box-shadow:none;
}
:where([data-workshop]:not([data-photo-format])) .m-aroma-heading {
  display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:17px 0 10px;
}
:where([data-workshop]:not([data-photo-format])) .m-aroma-heading h1 {font-size:26px;line-height:1.12;letter-spacing:-.04em}
:where([data-workshop]:not([data-photo-format])) .m-aroma-heading>span {font-size:13px;color:#66666b}
[data-workshop] .details-form .panel-heading h1,
[data-workshop] .details-form .panel-heading p {font-size:13px;line-height:1.35;letter-spacing:normal}
[data-workshop] .details-form .panel-heading h1 {font-weight:600}
[data-workshop] :is(.ribbon-options, .card-options) .option {min-height:45px;padding-block:9px}
[data-workshop] .charm-options .option {min-height:76px;padding-block:8px}
[data-workshop] .option:focus-visible,
[data-workshop] .scent-card:focus-visible {outline-offset:1px}

/* Use normal text flow so a hint can wrap word by word after its label. */
#gift-app[data-workshop] .workshop-intro h1 {
  width:100%;
  margin:0;
  font-size:13px;
  line-height:1.35;
  letter-spacing:normal;
  font-weight:400;
  color:#606065;
}
[data-workshop] .workshop-intro strong {font-weight:600;color:var(--ink)}
[data-workshop] .builder-bottom {padding-bottom:max(12px,env(safe-area-inset-bottom))}

@media (max-width:736px) {
  body {position:fixed;inset-inline:0;top:var(--m-viewport-top,0px)}
  #gift-app[data-workshop] {
    --workshop-gutter:max(16px,env(safe-area-inset-left),env(safe-area-inset-right));
    --choice-space:250px;
    padding:0;
    background:#eee;
  }
  [data-workshop] .workshop-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:44px;
    gap:6px;
    padding:0 var(--workshop-gutter);
    background:#eee;
  }
  [data-workshop] .workshop-title {display:none}
  [data-workshop] .gift-format-return {
    display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0;
    font-size:13px;text-decoration:none;
  }
  [data-workshop] .steps {gap:clamp(7px,3vw,16px)}
  [data-workshop] .steps button {min-height:44px;padding:0;gap:3px;font-size:13px;color:#5c5c60}
  [data-workshop] .steps button:disabled {color:#77777a;opacity:1}
  [data-workshop] .steps [aria-current] {color:var(--ink);font-weight:600}
  [data-workshop] .steps .step-num {
    display:inline;width:auto;height:auto;border:0;background:none;color:inherit;font:inherit;
  }
  [data-workshop] .workspace {
    container-type:size;
    min-height:0;
    overflow:auto;
    overflow-anchor:none;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    background:#eee;
  }
  [data-workshop] .builder-layout {display:block;height:auto;min-height:100%;padding:0;background:#fff}
  [data-workshop] #visual-container {
    /* Keep the same photographic frame for assembly and wrapping. Reserve room
       for the ribbon and the first row of charms below it on shorter phones. */
    height:calc(var(--app-height) * .49);
    height:min(calc(var(--app-height) * .49), max(115px, calc(100cqh - var(--choice-space))));
    min-height:0;
    max-height:570px;
    background:#eee;
  }
  [data-workshop] .gift-preview {border-radius:0;background:#eee}
  [data-workshop] .builder-options {display:block;padding:0}
  [data-workshop]:not([data-photo-format]) .builder-options {display:flex;flex-direction:column}
  [data-workshop]:not([data-photo-format]) .panel-navigation {
    order:1;height:auto;min-height:0;padding:0 var(--workshop-gutter);
  }
  [data-workshop][data-photo-format].gift-step-4 .panel-navigation {padding:0 var(--workshop-gutter)}
  [data-workshop] #options-panel {padding:0 var(--workshop-gutter) 12px;overflow:visible}
  [data-workshop] :is(.slot-tabs, .detail-tabs) {
    margin:0 calc(-1 * var(--workshop-gutter));
    border-bottom:1px solid #dadadc;
  }
  [data-workshop] :is(.slot-tabs, .detail-tabs) button {
    min-height:40px;
    padding:5px 3px;
    font-size:13px;
  }
  [data-workshop] .m-aroma-heading {
    display:flex;align-items:baseline;justify-content:space-between;gap:8px;
    margin:10px 0 8px;
  }
  [data-workshop] .m-aroma-heading h1 {font-size:13px;line-height:1.3;letter-spacing:normal;font-weight:600}
  [data-workshop] .m-aroma-heading>span {font-size:12px;color:#66666b}
  [data-workshop] .panel-heading {padding:9px 0 8px}
  [data-workshop] .details-form .panel-heading {padding:8px 0}
  [data-workshop] .details-form .panel-heading :is(h1,p) {font-size:13px;line-height:1.25}
  [data-workshop] .details-form .panel-heading>div {
    display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;
  }
  [data-workshop] .details-form .panel-heading p {margin:0}
  [data-workshop] .details-form fieldset {margin:0 0 8px}
  [data-workshop] .details-form legend,
  [data-workshop] .field-label {font-size:13px;line-height:1.25}
  [data-workshop] .details-form legend {margin:0 0 5px}
  [data-workshop] :is(.ribbon-options, .card-options) .option {
    min-height:40px;padding:6px 4px;gap:7px;
  }
  [data-workshop] .ribbon-swatch {height:21px}
  [data-workshop] .charm-options .option {min-height:60px;padding:4px 2px;gap:3px}
  [data-workshop] .charm-options img {width:29px;height:29px}
  [data-workshop] .scent-grid {gap:6px}
  [data-workshop] .scent-card {min-height:48px;padding:6px 8px;gap:7px}
  [data-workshop] .scent-card small {margin-top:3px}
  [data-workshop] .field-label {margin:8px 0 5px}
  [data-workshop] .builder-bottom {
    min-height:58px;padding:6px var(--workshop-gutter) max(6px,env(safe-area-inset-bottom));
  }
  [data-workshop] .gift-price>span,
  [data-workshop] .button-arrow {display:none}
  [data-workshop] .primary-button {
    width:auto;min-width:96px;max-width:calc(100% - 82px);min-height:44px;justify-content:center;
    padding:8px 12px;
  }

  /* Keep editing in the original field. The fixed footer has its own grid row
     outside the scroller, including during a software keyboard animation. */
  [data-workshop][data-editing] #visual-container {display:none}
  [data-workshop][data-editing] .builder-layout {min-height:100%}
  [data-workshop][data-editing] #gift-message {
    height:clamp(66px,calc(var(--app-height) * .23),106px);
    min-height:66px;
  }
  [data-workshop] :is(#gift-initials, #gift-message) {font-size:16px;scroll-margin-block:8px}
}
@media (max-width:350px) {
  #gift-app[data-workshop] {--workshop-gutter:max(12px,env(safe-area-inset-left),env(safe-area-inset-right))}
  [data-workshop] .steps button,
  [data-workshop] :is(.slot-tabs, .detail-tabs) button {font-size:12px}
}
