/* Beyond The Pass · notices
   The Estimate marker, the band under the header and the cookie choice. The
   shop head links this file after site.css and extra.css whenever it exists.
   Every colour and space reads a token site.css defines, so the light and
   dark themes both follow without a rule of their own. */

/* ---------- The Estimate marker ----------
   A quiet label after a figure nobody has confirmed yet: the crocus of the
   design system on its soft ground, so it is plain to see without reading as
   a warning. The madder red stays the colour of sales and errors. */
.estimate{display:inline-block;padding:0 var(--s2);border-radius:var(--r-control);background:var(--crocus-soft);color:var(--crocus);font-family:var(--sans);font-size:11px;font-weight:500;font-style:normal;letter-spacing:.06em;line-height:18px;text-transform:uppercase;text-decoration:none;white-space:nowrap;vertical-align:1px;cursor:help}

/* ---------- The band under the header ----------
   One still line the owner types in Settings, Store, such as Opening soon,
   in the Estimate marker's colours, which the shop uses for "not final yet".
   It sits in the page under the sticky header and scrolls away with it. On a
   narrow phone a longer line wraps rather than being cut off. */
.announce{background:var(--crocus-soft);color:var(--crocus);text-align:center;padding:var(--s2) max(var(--gutter),env(safe-area-inset-right)) var(--s2) max(var(--gutter),env(safe-area-inset-left))}
.announce p{font-size:12px;font-weight:500;letter-spacing:.06em;line-height:1.5;text-transform:uppercase;overflow-wrap:break-word}

/* ---------- The cookie choice ----------
   One compact card anchored to the bottom of the window, never a wall over
   the page. It is sticky rather than fixed: it rides the bottom edge while
   the page scrolls, then settles above the footer at the end, so it never
   hides the footer's links. It stacks above the page and the phone's buy
   bar, and below the sticky nav, the drawers, the Ship to window and the
   toast. The band around the card lets clicks through to the page; the card
   itself takes them. */
.consent{position:sticky;bottom:0;z-index:28;padding:0 var(--gutter) var(--s4);pointer-events:none}
.consent-card{pointer-events:auto;max-width:920px;margin:0 auto;background:var(--paper);color:var(--ink);border:1px solid var(--warp);border-radius:var(--r-soft);box-shadow:var(--shadow-raised);padding:var(--s4) var(--s5);display:flex;flex-wrap:wrap;align-items:center;gap:var(--s3) var(--s6)}
.consent-text{flex:1 1 360px;min-width:0}
.consent-title{font-family:var(--serif);font-size:18px;line-height:1.3;font-variation-settings:"opsz" 18;color:var(--ink);margin:0 0 2px}
.consent-text p{font-size:14px;line-height:1.5;color:var(--slate)}
.consent-text a{color:var(--ink);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;white-space:nowrap}
.consent-text a:hover{text-decoration-color:var(--crocus)}
.consent-note{font-size:13px;color:var(--madder)}
.consent-note:empty{display:none}

/* Reject and Accept are the same button, the same size, side by side:
   saying no takes exactly as much effort as saying yes. */
.consent-actions{display:flex;gap:var(--s2);flex:0 0 auto;margin:0}
.consent-actions .btn{height:44px;min-width:120px;background:var(--paper)}
.consent-actions .btn:hover{background:var(--stage)}
.consent-actions .btn[aria-busy="true"]{opacity:.6;cursor:progress}
.consent a:focus-visible,.consent button:focus-visible{outline:2px solid var(--crocus);outline-offset:2px}

/* While the card is up, a control that takes the focus near the bottom of
   the window is scrolled clear of it rather than left underneath. */
html:has(.consent){scroll-padding-bottom:128px}

/* On a phone the card spans the width and the two buttons share it equally.
   On a product page it sits above the sticky Add to bag bar, not over it. */
@media (max-width:767px){
  body:has(.buybar) .consent{bottom:72px}
  html:has(.consent){scroll-padding-bottom:280px}
}
@media (max-width:599px){
  .consent{padding:0 var(--s3) var(--s3)}
  .consent-card{padding:var(--s4)}
  .consent-text{flex-basis:100%}
  .consent-text p{font-size:13px;line-height:1.45}
  .consent-actions{flex:1 1 100%}
  .consent-actions .btn{flex:1 1 0;min-width:0}
}

/* The footer strip's Cookie choice button sits in line with the links beside it. */
.footer-consent{display:inline}

/* ---------- The bottom of an iPhone (module 8, quality) ----------
   The page reaches the screen's edge (viewport-fit=cover), so the card keeps
   clear of the home indicator; env(safe-area-inset-bottom) is 0 elsewhere.
   Above the Add to bag bar it sits clear of the bar, which keeps clear of the
   indicator itself. */
.consent{padding-bottom:calc(var(--s4) + env(safe-area-inset-bottom))}
@media (max-width:767px){
  body:has(.buybar) .consent{bottom:calc(72px + env(safe-area-inset-bottom));padding-bottom:var(--s3)}
}
@media (max-width:599px){
  .consent{padding-bottom:calc(var(--s3) + env(safe-area-inset-bottom))}
  body:has(.buybar) .consent{padding-bottom:var(--s3)}
}
