/* Checkout iMessage pass + BYB layout. Cream in, plum out. */
:root {
  --glz-im-cream: #fffaf3;
  --glz-im-bubble: #f3eadf;
  --glz-im-plum: #5b2a4a;
  --glz-im-gold: #e5be5e;
}

/* ---- Hide duplicate checkout copy ---- */
#order #cascadeGuide,
#order #deliveryConfirmPill,
#order #bakeDateNotice,
#order #schedulerNote { display: none !important; }
html[data-v-order="ch"] #order .cart-empty-title,
html[data-v-order="ch"] #order .cart-empty-sub { display: none !important; }
html[data-v-order="ch"] #order .lb-tw-copy > strong,
html[data-v-order="ch"] #order .lb-tw-copy > span { display: none !important; }

/* Watch again: quiet text link */
html[data-v-order="ch"] #order .lb-again {
  margin: .35rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--glz-im-plum);
  font: 560 13px/1.3 system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transform: none !important;
}
html[data-v-order="ch"] #order .lb-again:hover { border: 0; opacity: .8; }

/* Unclip chapter stripe; kill off-brand pink */
html[data-v-order="ch"] #order .lg-ch,
html[data-v-order="ch"] #order .cart-section {
  overflow: visible !important;
  border-radius: 30px;
}
html[data-v-order="ch"] #order .lg-ch::before {
  border-radius: 30px 30px 0 0;
}
html[data-v-order="ch"] #order .lg-ch3 {
  --lg-band: linear-gradient(90deg, #F3CF73, #D4A843) !important;
  --lg-dot: #5b2a4a !important;
  --lg-dot-ink: #FDF8F0 !important;
  background: radial-gradient(120% 80% at 100% 0%, #fffaf3 0%, #FFFFFF 55%) !important;
}
html[data-v-order="ch"] #order .lg-ch4 {
  --lg-band: linear-gradient(90deg, #D4A843, #5b2a4a) !important;
}
html[data-v-order="ch"] #order .lg-ch3 .lb-dial-arc,
html[data-v-order="ch"] #order .lg-ch3 .lb-count-ring .lb-count-arc {
  stroke: #D4A843 !important;
}
html[data-v-order="ch"] #order .lg-ch-head.is-done .lg-ch-num {
  background: var(--glz-im-plum);
  color: #fffaf3;
}

/* Day chips: do not fade-clip the first Closed chip */
.lb-days-track {
  padding-left: 16px !important;
  padding-right: 16px !important;
  scroll-padding-inline: 20px;
  scroll-snap-type: none !important;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 14px), transparent 100%) !important;
          mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 14px), transparent 100%) !important;
}
#order .lb-days-track .lb-day,
#order .lb-days-track .date-card { scroll-snap-align: none !important; }

/* ---- iMessage bubbles: one fill, DM Sans, no nested outline ---- */
.glz-im-in,
.glz-im-out {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 5px;
  max-width: 36rem;
}
.glz-im-out { justify-content: flex-end; margin-left: auto; }
.glz-im-in img {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.glz-im-bubble,
.glz-im-out p,
#order .lb-ready.glz-im-ready .glz-im-copy,
.ex5-pane[data-pane="0"] .ex5-lead {
  position: relative;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: var(--glz-im-bubble);
  color: var(--glz-im-plum);
  font: 500 14.5px/1.4 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border-radius: 18px;
}
.glz-im-bubble .glz-im-copy,
.glz-im-in p,
.glz-im-bubble p {
  margin: 0;
  padding: 0;
  border: 0;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0;
  color: inherit;
  font: inherit;
}
.glz-im-out p {
  background: var(--glz-im-plum);
  color: #fffaf3;
  font-weight: 620;
  border-radius: 18px 18px 5px 18px;
}
.glz-im-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.glz-im-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--glz-im-plum);
  opacity: .35; animation: glz-im-dot 1.1s ease-in-out infinite;
}
.glz-im-dots i:nth-child(2) { animation-delay: .15s; }
.glz-im-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes glz-im-dot { 0%, 80%, 100% { opacity: .28; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.glz-im-in.is-typing p,
.glz-im-in.is-typing .glz-im-copy { display: none; }
.glz-im-in:not(.is-typing) .glz-im-dots { display: none; }

.glz-im-pickup {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.glz-im-car {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fffaf3;
  color: var(--glz-im-plum);
  box-shadow: inset 0 0 0 1px rgba(91,42,74,.12);
  display: grid; place-items: center;
}
.glz-im-car svg { width: 24px; height: 24px; }
.glz-im-thread { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
#order #pickupInfoBox[data-glz-im="1"] {
  background: transparent !important;
  border: 0 !important;
  padding: .2rem 0 1rem !important;
}

.glz-im-thread { display: flex; flex-direction: column; gap: 5px; }
.glz-im-thread .glz-im-in { margin: 0; }
/* Tail on the last incoming bubble of a group */
.glz-im-thread .glz-im-in:last-child .glz-im-bubble,
#glzImReady .glz-im-in:last-child .glz-im-bubble,
#glzImReady .glz-im-in:has(+ .glz-im-out) .glz-im-bubble,
#order .lb-ready.glz-im-ready .glz-im-copy,
.ex5-pane[data-pane="0"] .ex5-lead {
  border-radius: 18px 18px 18px 5px;
}
.glz-im-thread .glz-im-in:last-child .glz-im-bubble::after,
#glzImReady .glz-im-in:last-child .glz-im-bubble::after,
#glzImReady .glz-im-in:has(+ .glz-im-out) .glz-im-bubble::after,
#order .lb-ready.glz-im-ready .glz-im-copy::after,
.ex5-pane[data-pane="0"] .ex5-lead::after {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 0;
  width: 14px;
  height: 12px;
  background: inherit;
  clip-path: polygon(100% 0, 100% 100%, 12% 100%);
}
.glz-im-out p::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 0;
  width: 14px;
  height: 12px;
  background: inherit;
  clip-path: polygon(0 0, 88% 100%, 0 100%);
}

html[data-v-order="ch"] #order .lb-ready.glz-im-ready {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 1rem;
  padding: 0;
  background: none !important;
  border: 0;
  box-shadow: none;
}

.glz-bake-line {
  margin: .6rem 0 0;
  font: 520 14.5px/1.4 system-ui, sans-serif;
  color: #5A4D44;
  text-align: center;
}

#glzImReady { margin: .2rem 0 .75rem; }

/* After Checkout pane: bubble + gold track */
.ex5-pane[data-pane="0"] .ex5-pane-copy {
  display: grid;
  gap: 12px;
}
.ex5-pane[data-pane="0"] .ex5-lead {
  margin: 0;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 5px;
  background: #f3eadf;
  color: #5b2a4a;
  font: 500 15px/1.4 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border: 0;
  box-shadow: none;
}
.ex5-pane[data-pane="0"] .ex5-copy,
.ex5-pane[data-pane="0"] h4 { display: none; }
.ex5-pane[data-pane="0"] .ex5-btn-gold { justify-self: start; }
#order #dateCardsScroll,
#order .date-cards-scroll {
  padding-left: 16px !important;
  padding-right: 16px !important;
  scroll-padding-inline: 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%) !important;
          mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%) !important;
}
#order #dateCardsScroll .date-card { scroll-snap-align: center !important; }
#how-it-works .guide-page[data-page="0"] .guide-lead,
#how-it-works .guide-page[data-page="0"] > p:not(.guide-folio):not(.guide-lead) {
  background: #f3eadf; color: #5b2a4a; padding: 12px 16px; border-radius: 18px 18px 18px 5px;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border: 0; box-shadow: none;
}
#how-it-works .guide-page[data-page="0"] > p + p { display: none; }
#how-it-works .guide-page[data-page="0"] .guide-track-link {
  display: inline-flex; margin-top: 10px; padding: .7rem 1.1rem; border-radius: 999px;
  background: linear-gradient(135deg, #e5be5e, #d4a843); color: #3a1942; font-weight: 700; text-decoration: none;
}

/* ---- BYB removals ---- */
#boxBuilder .glz-cad-save,
#boxBuilder [data-sub-placement="flavor_picker_club"],
#quickFillWrap,
#addonsSection { display: none !important; }

/* ---- Itemized order column + 3-col ---- */
#glzBybOrder {
  background: #fffdf8;
  border: 1px solid rgba(91,42,74,.1);
  border-radius: 22px;
  padding: 14px 16px 16px;
  box-shadow: 0 1px 0 rgba(255,255,255,.85) inset, 0 16px 32px -28px rgba(74,25,66,.35);
}
.glz-byb-order-k {
  margin: 0 0 10px;
  font: 800 .66rem/1.2 system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8A6B1E;
}
#glzBybItems { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#glzBybItems li {
  display: flex; justify-content: space-between; gap: 10px;
  font: 560 14px/1.3 system-ui, sans-serif; color: #5b2a4a;
}
#glzBybItems .qty { font-variant-numeric: tabular-nums; color: #8A6B1E; font-weight: 700; }
.glz-byb-order-empty { margin: 0; color: #5A4D44; font-size: 14px; }
.glz-byb-order-empty[hidden],
.glz-byb-order-foot[hidden] { display: none !important; }
.glz-byb-order-foot {
  display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(91,42,74,.1);
  font: 700 14px/1.2 system-ui, sans-serif; color: #5b2a4a;
}

#orderGuide.glz-journey,
#orderGuide.glz-journey.visible { display: block !important; }
#order .glz-bake-line { display: none !important; }

@media (min-width: 1080px) {
  html.r2a #boxBuilder.glz-byb3,
  html.r2a #boxBuilder.glz-byb3.active,
  html #boxBuilder.glz-byb3.active,
  html #boxBuilder.glz-byb3 {
    display: grid !important;
    grid-template-columns: minmax(230px, .82fr) minmax(300px, 1.12fr) minmax(300px, 1.16fr);
    column-gap: 1.35rem;
    row-gap: 1rem;
    align-items: start;
    grid-auto-flow: dense;
  }
  #boxBuilder.glz-byb3 > .glz-nar { grid-column: 1 / -1; }
  #boxBuilder.glz-byb3 > .active-box-nav,
  #boxBuilder.glz-byb3 > .box-size-carousel,
  #boxBuilder.glz-byb3 > #sizesGrid,
  #boxBuilder.glz-byb3 > #subscriptionScheduler,
  #boxBuilder.glz-byb3 > #occasionOptions,
  #boxBuilder.glz-byb3 > #customBoxOptions,
  #boxBuilder.glz-byb3 > .cinnamon-discount,
  #boxBuilder.glz-byb3 > .builder-header,
  #boxBuilder.glz-byb3 > .compact-special-sizes,
  #boxBuilder.glz-byb3 > p.unified-size-label { grid-column: 1 / -1; }
  #glzBybOrder {
    grid-column: 1;
    position: sticky;
    top: 88px;
    z-index: 3;
    isolation: isolate;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }
  #boxBuilder.glz-byb3 > .box-stage {
    grid-column: 2;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    overflow-y: visible;
    isolation: isolate;
    z-index: 1;
  }
  #boxBuilder.glz-byb3 > .box-stage .box-visual,
  #boxBuilder.glz-byb3 > .box-stage .box-container,
  #boxBuilder.glz-byb3 > .box-stage .box-grid {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  #boxBuilder.glz-byb3 > .obx-guide { grid-column: 2; min-width: 0; }
  #boxBuilder.glz-byb3 > .r2a-controls { grid-column: 2; min-width: 0; }
  #boxBuilder.glz-byb3 > .builder-content { grid-column: 3; min-width: 0; max-width: 100%; }
}

/* Smart add-on prompt: in-flow toast, not a fixed bottom sheet */
#glzAddonPrompt {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 2;
  width: min(440px, calc(100% - 32px));
  margin: 12px auto;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fffdf8;
  color: #4a1942;
  border: 1px solid rgba(91,42,74,.2);
  box-shadow: 0 10px 24px -18px rgba(74,25,66,.4);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#glzAddonPrompt[hidden] { display: none !important; }
#glzAddonPrompt p { margin: 0 0 8px; font: 500 14px/1.4 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #4a1942; }
#glzAddonPrompt .glz-ap-row { display: flex; flex-wrap: wrap; gap: 8px; }
#glzAddonPrompt button {
  appearance: none; border: 0; cursor: pointer;
  padding: 8px 12px; border-radius: 999px;
  font: 650 13px/1 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#glzAddonPrompt [data-ap="dismiss"] { background: transparent; color: #5b2a4a; text-decoration: underline; }
#glzAddonPrompt [data-ap="matcha"] { background: #5b2a4a; color: #fffaf3; }
#glzAddonPrompt [data-ap="order"] { background: #f3eadf; color: #5b2a4a; }

@media (prefers-reduced-motion: reduce) {
  .glz-im-dots, .glz-im-dots i { animation: none !important; }
  #glzBybOrder { position: static; }
}
html.glz-static .glz-im-dots, html.glz-static .glz-im-dots i { animation: none !important; }
