/* Poof Books: checkout, looked after by Lil Otter in the Mailroom. Loaded after section.css.
   Layout follows the section pages: the room as background, the figure in front on the left,
   and the checkout panel where a curator's speech box sits. Curators off: just the panel. */

/* Test-mode band (sandbox only; remove at go-live) */
.test-band { padding: 10px var(--gutter); background: var(--lilac); color: var(--on-pink); font-size: 14px; line-height: 1.5; text-align: center; }
.test-band p { margin: 0; }
.test-band code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; white-space: nowrap; }
.test-band .demo { margin-top: 4px; font-size: 13px; }
.test-band .demo a { color: var(--on-pink); font-weight: 600; margin: 0 6px; }
.test-band .demo a[aria-current] { text-decoration: none; background: var(--night); color: var(--lilac); padding: 1px 8px; border-radius: 999px; }

/* The Mailroom */
.co-room { border-bottom: 0; }
.co-room .room-bg { height: 780px; bottom: auto; object-position: center bottom; opacity: .6; } /* anchored to the floor line, so the floor stays at ~600-650px down at any width */
.co-room .room-shade { height: 780px; bottom: auto;
  background:
    linear-gradient(180deg, rgba(var(--night-rgb), 0) 72%, var(--night) 100%),
    linear-gradient(90deg, rgba(var(--night-rgb), .05) 0%, rgba(var(--night-rgb), .3) 34%, rgba(var(--night-rgb), .82) 56%, rgba(var(--night-rgb), .94) 100%); }
.co-room .room-glow { left: 4%; top: 280px; bottom: auto; }

.co-room .wrap.co-grid { display: grid; grid-template-columns: minmax(260px, 430px) minmax(0, 1fr);
  grid-template-areas: "otter head" "otter form" "sum form"; grid-template-rows: auto auto 1fr;
  align-items: start; gap: 0 clamp(32px, 4vw, 64px); padding-top: 40px; padding-bottom: 88px; }
.otter { grid-area: otter; }
.co-head { grid-area: head; min-width: 0; max-width: 720px; }
.co-box { grid-area: sum; }
.co-panel { grid-area: form; }
.otter { min-width: 0; }
.otter-stage { position: relative; padding-bottom: 28px; min-height: 712px; display: flex; flex-direction: column; justify-content: flex-end; } /* parcels sit on the foreground floor (~725px down), in front of the packing bench */
.otter .fig { width: 100%; max-height: 600px; object-position: bottom center; }
.co-head h1 { font-size: clamp(40px, 5vw, 64px); }

/* Play button by his figure (only shown when Sound is on) */
.otter-play-wrap { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); margin: 0; white-space: nowrap; }
.otter-play { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 0; background: var(--lilac); color: var(--on-pink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,.45); }
.otter-play:hover { background: var(--cream); }
.otter-play .i-stop { display: none; }
.otter-play[aria-pressed="true"] { background: var(--pink); }
.otter-play[aria-pressed="true"] .i-play { display: none; }
.otter-play[aria-pressed="true"] .i-stop { display: inline; }
.otter-play-wrap[hidden] { display: none !important; }

.otter-speech { max-width: 680px; }
.otter-speech .catch { color: var(--pink); font-weight: 700; }
.plain-intro { margin: 18px 0 0; max-width: 640px; font-size: 18px; line-height: 1.6; color: var(--muted); }

/* The two boxes: Your order (left, under the Mailroom) and the checkout form (where the curator's box sits) */
.co-panel, .co-box { padding: clamp(18px, 3vw, 32px); background: rgba(var(--surface-rgb), .95); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.co-panel { margin-top: 28px; min-width: 0; max-width: 720px; }
.co-box { margin-top: 28px; position: sticky; top: 16px; }        /* stays in view while the form scrolls */

/* Curators off: a plain, on-brand form */
html.no-curators .co-room .wrap.co-grid { grid-template-areas: "head head" "sum form"; grid-template-rows: auto 1fr; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); padding-top: 56px; }
html.no-curators .co-head { max-width: 760px; }
html.no-curators .co-head h1 { font-size: clamp(44px, 6vw, 72px); }

/* Order summary */

/* Empty cart: Lil Otter shoos you back upstairs; the box moves up beside him (where the form would be) */
html.cart-empty .co-box { grid-area: form; max-width: 520px; position: static; }
.empty-note { margin: 4px 0 0; font-size: 17px; line-height: 1.55; color: var(--muted); }
.back-to-shelves { text-decoration: none; }
html.cart-empty .summary .totals, html.cart-empty .summary .sum-note, html.cart-empty .summary [data-fx-note] { display: none !important; }
.summary h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--rule); }
.line img { width: 52px; height: auto; border-radius: 3px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.line-text b { display: block; font-size: 15.5px; line-height: 1.3; }
.line-text span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.line-text .stock { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(185,163,255,.14); color: var(--lilac); }
.line-text .stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.line-text .stock.back { background: rgba(255,95,162,.14); color: var(--pink); }
.line-price { font-weight: 600; white-space: nowrap; }
.totals { margin: 2px 0 0; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; }
.totals .grand { font-size: 19px; font-weight: 800; }
.totals .grand dt { color: var(--cream); }
.totals .grand dd { color: var(--pink); }
.sum-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.summary [data-fx-note] { margin: 4px 0 0; }

/* Form */
.co-form { margin: 0; }
.co-form .co-step:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.co-step { margin: 28px 0 0; padding: 26px 0 0; border: 0; border-top: 1px solid var(--line-subtle); min-width: 0; }
.co-step legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; padding: 0; margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.co-step legend + * { clear: both; }
.co-step .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pink); color: var(--on-pink); font-size: 15px; }
.co-step label { display: block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.co-step label.opt span { font-weight: 400; }
.row { display: grid; gap: 0 14px; }
.row.two { grid-template-columns: 1fr 1fr; }
.row.three { grid-template-columns: 2fr 1fr 1fr; }
.co-step input:not([type]), .co-step input[type="email"], .co-step select {
  display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 11px 14px;
  background: var(--night); color: var(--cream); border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 16px; font-weight: 400;
}
.co-step select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--lilac) 50%), linear-gradient(135deg, var(--lilac) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.co-step input:focus, .co-step select:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,95,162,.25); }
.co-step input.is-error { border-color: #FF6B6B; }
.hint { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 400; color: var(--muted); }

.ship { margin-top: 18px; display: grid; gap: 10px; }
.ship-wait { margin: 0; font-size: 14px; color: var(--muted); }
.ship-opt { display: flex !important; align-items: center; gap: 14px; margin: 0 !important; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--night); cursor: pointer; }
.ship-opt:has(input:checked) { border-color: var(--pink); }
.ship-opt input { accent-color: var(--pink); width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.ship-opt b { display: block; color: var(--cream); font-size: 15px; }
.ship-opt small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.ship-opt > span:nth-child(2) { flex: 1 1 auto; }

/* Payment: Square draws the card fields; we only size the box (under 480px wide it stacks the card number on top) */
.secure { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.secure svg { flex: 0 0 auto; margin-top: 2px; color: var(--lilac); }
.card-box { min-height: 56px; max-width: 460px; }
.card-loading { margin: 0; font-size: 14px; color: var(--muted); }
.card-loading[hidden] { display: none; }
.adult { display: flex !important; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px !important; padding: 14px 16px; border-radius: 12px; background: var(--night); color: var(--cream) !important; }
.adult[hidden] { display: none !important; }
.adult input { accent-color: var(--pink); width: 18px; height: 18px; }
.adult .hint { flex-basis: 100%; margin: 0; }

/* The big pink button */
.pay { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 66px; margin-top: 24px; padding: 16px 28px; border: 0; border-radius: 999px; background: var(--pink); color: var(--on-pink); font: inherit; font-size: 21px; font-weight: 800; letter-spacing: .01em; cursor: pointer; box-shadow: 0 14px 30px rgba(255,95,162,.28); }
.pay:hover:not([disabled]) { background: var(--cream); }
.pay:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.pay[disabled] { opacity: .55; cursor: progress; box-shadow: none; }
.pay-small { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; text-align: center; color: var(--muted); }
.pay-status { margin-top: 16px; }
.pay-status:empty { display: none; }
.pay-status .msg { margin: 0; padding: 14px 16px; border-radius: 14px; font-size: 15px; line-height: 1.55; }
.pay-status .msg.ok { background: rgba(185,163,255,.16); border: 1px solid var(--lilac); }
.pay-status .msg.err { background: rgba(255,107,107,.12); border: 1px solid #FF6B6B; }
.pay-status a { color: var(--cream); }

/* Order received */
.done { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line-subtle); }
.done[hidden] { display: none; }
.done h2 { margin: 0; font-size: 28px; font-weight: 800; color: var(--pink); }
.done p { margin: 12px 0 0; font-size: 16px; line-height: 1.6; }
.done .done-test { font-size: 13.5px; color: var(--muted); }
.done .btn { margin-top: 8px; }

.gap-inline { display: inline-block; padding: 1px 8px; border: 1px dashed var(--line); border-radius: 6px; font-size: 12.5px; color: var(--muted); font-weight: 400; white-space: nowrap; }

/* Narrower screens */
@media (max-width: 1000px) {
  .co-room .wrap.co-grid, html.no-curators .co-room .wrap.co-grid { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .co-room .wrap.co-grid, html.no-curators .co-room .wrap.co-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "otter" "head" "sum" "form"; grid-template-rows: auto; padding-top: 20px; gap: 0; }
  .co-box { position: static; }
  .otter { display: flex; justify-content: center; }
  .otter-stage { width: min(72vw, 300px); min-height: 530px; } /* parcels on the foreground floor (~520px down) */
  .co-room .room-bg, .co-room .room-shade { height: 560px; }
  .co-room .room-shade { background: linear-gradient(180deg, rgba(var(--night-rgb), .15) 0%, rgba(var(--night-rgb), .4) 60%, rgba(var(--night-rgb), .9) 90%, var(--night) 100%); }
  .co-head { margin-top: 12px; }
  .co-panel, .co-box { margin-left: calc(-1 * var(--gutter) / 2); margin-right: calc(-1 * var(--gutter) / 2); }
  .row.two, .row.three { grid-template-columns: 1fr; }
  .pay { font-size: 19px; }
}

/* Express checkout: Apple Pay and Google Pay (white buttons on Night, per both brands' dark-background guidance) */
.express { margin: 0 0 26px; }
.express[hidden] { display: none; }
.express-h { margin: 0 0 12px; font-size: 21px; font-weight: 800; }
.wallets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.wallets [hidden] { display: none !important; }
.apple-pay { display: block; width: 100%; height: 52px; min-height: 52px; padding: 0; border: 0; border-radius: 12px; cursor: pointer;
  -webkit-appearance: -apple-pay-button; -apple-pay-button-type: plain; -apple-pay-button-style: white; }
.google-pay { height: 52px; min-height: 52px; border-radius: 12px; overflow: hidden; }
.express-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.or { display: flex; align-items: center; gap: 14px; margin: 22px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line-subtle); }
.adult { margin: 0 0 20px !important; }

.line-remove { display: block; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.line-remove:hover { color: var(--pink); }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.qty-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--cream); font: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
.qty-btn:hover:not([disabled]) { border-color: var(--pink); color: var(--pink); }
.qty-btn:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.qty-btn[disabled] { opacity: .35; cursor: default; }
.qty-n { min-width: 1.6em; text-align: center; font-size: 15px; font-weight: 700; color: var(--cream); }
.qty .line-remove { margin: 0 0 0 6px; }
.sample-note { margin: 0 0 6px; color: var(--lilac); }

.sum-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.sum-head h2 { margin: 0; }
.empty-cart { padding: 4px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.empty-cart:hover, .empty-cart[data-armed] { color: var(--pink); }

.done a[href^="mailto:"] { color: var(--pink); font-weight: 700; }
.done .catch { color: var(--pink); font-weight: 800; white-space: nowrap; }
.co-box[hidden] { display: none; }
.co-form[hidden] ~ .done { margin-top: 0; padding-top: 0; border-top: 0; }

/* Thank-you page (/checkout/thanks/) */
.thanks .otter-speech blockquote p { margin: 0; }
.thanks .otter-speech blockquote p + p { margin-top: 12px; }
.thanks .otter-speech a, .thanks .plain-intro a { color: var(--pink); font-weight: 700; }
.thanks .otter-speech .catch { color: var(--pink); font-weight: 800; white-space: nowrap; }
.thanks .plain-intro p { margin: 0 0 10px; }
.order-done[hidden] { display: none; }
.od-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 6px; }
.od-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.od-ref { margin: 0; font-size: 14px; color: var(--muted); }
.od-ref b { color: var(--cream); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.od-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 32px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-subtle); }
.od-cols h3 { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--lilac); }
.od-cols address, .od-cols p { margin: 0; font-style: normal; font-size: 15px; line-height: 1.55; }
.od-help { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.od-help a { color: var(--pink); font-weight: 700; }
.order-done .btn { margin-top: 8px; }
html.no-curators .thanks .co-room .wrap.co-grid { grid-template-areas: "head" "form"; grid-template-columns: minmax(0, 1fr); }
html.no-curators .thanks .co-panel { max-width: 760px; }

/* Address lookup (Google Places) */
.co-step label:has(.addr-suggest) { position: relative; }
.addr-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: 4px 0 0; padding: 6px 0; list-style: none;
  background: var(--night); border: 1.5px solid var(--pink); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.addr-suggest li { padding: 10px 14px; font-size: 15px; font-weight: 400; color: var(--cream); cursor: pointer; }
.addr-suggest li[aria-selected="true"], .addr-suggest li:hover { background: rgba(255, 95, 162, .14); }

/* Stripe (5 Nov 2026): currency selector above the Payment Element */
.pay-box { margin: 8px 0 0; }
.pay-box[hidden] { display: none; }
.currency-box { margin: 0 0 16px; }
.card-box { max-width: none; }

/* Apple Pay / Google Pay buttons above the card form (Stripe Express Checkout Element) */
.wallet-box { margin: 0 0 16px; }
.wallet-box[hidden] { display: none; }
.wallet-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; font-size: 14px; opacity: .75; }
.wallet-or::before, .wallet-or::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .3; }

/* thank-you page: Australian-dollar total beside a foreign-currency charge */
.total-aud { font-size: .7em; font-weight: 400; opacity: .75; }

/* Looker List box at checkout (17 Nov 2026): unticked by default */
.optin { display: flex !important; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px !important; font-weight: 600; }
.optin input { accent-color: var(--pink); width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.optin .hint { flex-basis: 100%; margin: 0 0 0 28px !important; }
