/*
 * « Finaliser ma commande » (partials/cart .pill--finish and .fin-note, public/shop/finish.js), every theme, after
 * every sheet. The bar is the cart pill of shop.css (its place: a bar at the bottom of a phone, a pill at the bottom
 * right of a computer, each theme's own dress: Famille's bar, Rétro's above its taskbar, Rituel's corners), with
 * « Finaliser ma commande » over « 2 articles · 13 800 FCFA ». Colours: the theme's tokens only (--ink / --paper of
 * the bar, --brand / --brand-ink of its arrow), the pairs stay readable on a dark page. The cosmetic rules are in
 * :where() so that a theme's own dress wins.
 * Nothing important under it: WhatsApp sits above it (frame.css), the stuck « Ajouter » bar of a product page above
 * it, Rétro's taskbar under it; while the cookies banner waits for an answer on a phone, the bar waits too; the cart
 * and the order step (the sheets) hide it. The page keeps its room under the footer (--fin-room, finish.js).
 */
:where(.pill--finish){gap:10px;text-align:left;box-shadow:0 0 0 1px color-mix(in srgb,var(--paper) 16%,transparent),0 10px 30px -8px rgb(0 0 0 / .45)}
:where(.pill--finish) .pill__text{display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start;min-width:0;line-height:1.2}
:where(.pill--finish) .pill__label{max-width:100%;overflow:hidden;font-size:15px;font-weight:800;white-space:nowrap;text-overflow:ellipsis}
:where(.pill--finish) .pill__sub{max-width:100%;overflow:hidden;font-size:13px;font-weight:600;white-space:nowrap;text-overflow:ellipsis;opacity:.86}
:where(.pill--finish) .pill__total{margin:0;font-weight:800}
:where(.pill--finish) .pill__icon{background:color-mix(in srgb,currentColor 14%,transparent);color:inherit}
:where(.pill--finish) .pill__go{background:var(--brand);color:var(--brand-ink)}
/* The label is an action, not « Panier ˄ » (Famille underlined it and pointed up to the cart). */
html body .pill--finish .pill__label{text-decoration:none}
html body .pill--finish .pill__label::after{content:none}
.pill--finish:focus-visible{outline:3px solid var(--brand);outline-offset:3px}

/* Its room: under the footer while it is there (no last link under it). */
html body:has(.pill--finish:not([hidden])) .foot{padding-bottom:calc(max(32px,calc(env(safe-area-inset-bottom) + 16px)) + var(--fin-room,84px))}
/* The sheets (the cart, the order step) and the pop-ups over the page: it is not over them. */
html body:has(dialog[open]) :is(.pill--finish,.fin-note){visibility:hidden;opacity:0;pointer-events:none}

/* A product page on a phone: the bar under the stuck « Ajouter » bar (buybar.js counts it), smaller. */
@media (max-width:999px){
html body.page-product.has-buybar .pill--finish:not([hidden]){display:flex !important}
html body.page-product.has-buybar .pill--finish{min-height:50px;padding-top:3px;padding-bottom:3px}
html body.page-product.has-buybar .pill--finish :is(.pill__icon,.pill__go){width:40px;height:40px}
html body.has-buybar:has(.pill--finish:not([hidden])) .buy{bottom:var(--fin-room,72px)}
html body.has-buybar:has(.pill--finish:not([hidden])) .waf{bottom:calc(var(--fin-room,72px) + 84px)}
/* While the price line is where the stuck bar would be (buybar.js .is-held: the price is read first), or where the
   « Ajouter » bar cannot stand above it (a short screen: buybar.js body.buy-on-finish), the bar waits too. */
html body.page-product.has-buybar:is(:has(.buy.is-held),.buy-on-finish) .pill--finish{visibility:hidden;opacity:0;pointer-events:none}
}
/* The cookies banner of a phone covers the bottom of the screen: the bar waits for the answer (on a computer the
   banner is in the middle, the pill on the right). */
@media (max-width:1099px){html body:has(.ck:not([hidden])) .pill--finish{visibility:hidden;opacity:0;pointer-events:none}}

/* The note after « Ajouter au panier »: over the bar, never blocking (no backdrop, the page stays usable). */
.fin-note{position:fixed;z-index:46;left:50%;bottom:calc(var(--fin-room,84px) + 10px);width:min(calc(100% - 32px),420px);margin:0;padding:14px 14px 12px;border-radius:var(--r-lg,16px);background:var(--paper,#fff);color:var(--ink,#111);box-shadow:0 0 0 1px var(--line,rgb(0 0 0 / .08)),0 14px 36px -10px rgb(0 0 0 / .4);transform:translateX(-50%)}
.fin-note[hidden]{display:none}
.fin-note__title{display:flex;align-items:center;gap:8px;margin:0;font-weight:800;font-size:15px;line-height:1.3}
.fin-note__ok{display:grid;flex:none;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--brand);color:var(--brand-ink)}
.fin-note__ok .ico{width:15px;height:15px}
.fin-note__name{margin:2px 0 0 32px;overflow:hidden;color:var(--muted,inherit);font-size:13px;line-height:1.3;white-space:nowrap;text-overflow:ellipsis}
.fin-note__actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
html body .fin-note__btn{flex:1 1 9.5rem;min-width:0;min-height:44px;margin:0;padding:8px 12px;font-size:14px;line-height:1.2;white-space:normal}
@media (min-width:1100px){.fin-note{left:auto;right:var(--gutter,24px);width:420px;transform:none} html body .fin-note__btn{min-width:auto;padding:8px 10px;white-space:nowrap}}
@media (prefers-reduced-motion:no-preference){html:not(.motion-low) .fin-note:not([hidden]){animation:fin-in 220ms var(--ease,ease-out)}}
@keyframes fin-in{from{opacity:0;translate:0 12px}to{opacity:1;translate:none}}
/* While the note is there: the toast says nothing more (the same words), WhatsApp steps back under it. */
html body:has(.fin-note:not([hidden])) .toast{visibility:hidden}
html body:has(.fin-note:not([hidden])) .waf{opacity:0;pointer-events:none}
