/* A calm purchase flow. Success always follows the verified order state. */
#checkout-dialog{scrollbar-gutter:stable both-edges}
#checkout-dialog:has(.checkout-result){width:min(540px,calc(100vw - 32px));max-width:calc(100vw - 32px);padding:32px;scrollbar-width:thin;scroll-padding-block:24px}
#checkout-dialog>.close{float:none;position:sticky;top:0;margin:0 0 -44px auto}
#checkout-dialog .checkout-result{isolation:isolate;animation:receipt-arrive .45s cubic-bezier(.2,.8,.2,1) both}
#checkout-dialog .receipt-brand{margin:2px 0 22px;font-size:.68rem;letter-spacing:.26em;color:#786558;text-align:center;font-weight:600}
#checkout-dialog .receipt-hero{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;text-align:center;padding:6px 0 24px;gap:0}
#checkout-dialog .receipt-emblem{position:relative;display:grid;place-items:center;width:100px;height:100px;margin:4px 0 26px;color:#644b5b;border-radius:50%;background:#f5eee9}
#checkout-dialog .receipt-emblem>img{width:44px;height:44px;object-fit:contain}
#checkout-dialog .receipt-emblem>svg{width:46px;height:46px}
#checkout-dialog .receipt-orbit,#checkout-dialog .receipt-orbit-secondary{position:absolute;inset:0;border:1px solid #bba58e55;border-radius:50%;pointer-events:none}
#checkout-dialog .receipt-orbit-secondary{inset:8px;border-color:#bba58e25}
#checkout-dialog [data-payment-state="processing"] .receipt-orbit{border:1.5px solid #bba58e35;border-top-color:#755269;border-right-color:#bba58e;animation:receipt-orbit 1.8s linear infinite}
#checkout-dialog [data-payment-state="processing"] .receipt-orbit-secondary{border-color:transparent;border-bottom-color:#bba58e90;animation:receipt-orbit 2.8s linear infinite reverse}
#checkout-dialog [data-payment-state="processing"] .receipt-emblem>img{animation:receipt-breathe 2.4s ease-in-out infinite}
#checkout-dialog .receipt-heading{display:block;margin:0;min-width:0;width:100%;max-width:100%}
#checkout-dialog .receipt-heading #checkout-title{margin:0;max-width:100%;font:400 clamp(1.65rem,5.5vw,2.15rem)/1.16 var(--serif,Georgia,serif);letter-spacing:-.025em;color:var(--deep,#4f3547);text-wrap:balance}
#checkout-dialog #checkout-title:focus{outline:none}
#checkout-dialog .receipt-amount{display:grid;gap:7px;margin:24px 0 0}
#checkout-dialog .receipt-amount>span{font-size:.75rem;line-height:1.4;color:var(--muted,#766e73)}
#checkout-dialog .receipt-amount>strong{font:500 1.65rem/1.2 var(--sans,Arial,sans-serif);font-variant-numeric:tabular-nums;letter-spacing:-.035em}
#checkout-dialog .receipt-delivery-note{font-size:.76rem;margin:9px 0 0;color:var(--muted,#766e73)}
#checkout-dialog .receipt-next{margin:18px 0 0;max-width:31ch;font-size:.84rem;line-height:1.55;color:var(--muted,#766e73)}
#checkout-dialog .receipt-next:empty{display:none}
#checkout-dialog .receipt-hero .order-test-badge{margin-top:12px}
#checkout-dialog .receipt-primary{display:grid;gap:8px;padding:0 0 18px}
#checkout-dialog .receipt-primary .button{width:100%;min-height:50px;border-radius:100px;display:flex;align-items:center;justify-content:center;text-align:center;white-space:normal;line-height:1.35;font-size:.9rem;transition:transform .2s,box-shadow .2s,background .2s}
#checkout-dialog .receipt-primary .button:not(:disabled):hover{transform:translateY(-2px);box-shadow:0 8px 22px #4f354712}
#checkout-dialog .receipt-primary .text-button{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 12px;font-size:.82rem;text-decoration:none;color:var(--muted,#766e73)}
#checkout-dialog [data-payment-state="success"] #checkout-done.outline{background:transparent;border-color:#dacdd1;color:var(--deep,#4f3547)}
#checkout-dialog [data-payment-state="processing"] .receipt-primary{padding-bottom:8px}
#checkout-dialog [data-payment-state="success"] .receipt-emblem{color:#667454;background:#eff0e7}
#checkout-dialog [data-celebrate="true"] .receipt-emblem{animation:receipt-bloom .65s cubic-bezier(.2,.8,.25,1) both}
#checkout-dialog [data-celebrate="true"] .receipt-orbit{animation:receipt-ripple 1.1s .1s ease-out both;border-color:#a8b38a75}
#checkout-dialog [data-payment-state="success"] .receipt-orbit-secondary{border-color:#a8b38a55}
#checkout-dialog .receipt-check{stroke-dasharray:42;stroke-dashoffset:0}
#checkout-dialog .receipt-details{border-top:1px solid var(--line,#e6dcd5);margin:0;padding-top:4px}
#checkout-dialog .receipt-details>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;min-height:48px;cursor:pointer;padding:8px 0;font-size:.82rem;font-weight:500;color:var(--deep,#4f3547)}
#checkout-dialog .receipt-details>summary::-webkit-details-marker{display:none}
#checkout-dialog .receipt-details>summary>svg{width:18px;height:18px;transition:transform .25s}
#checkout-dialog .receipt-details[open]>summary>svg{transform:rotate(180deg)}
#checkout-dialog .receipt-details[open]>.receipt-details-body{animation:receipt-details .28s ease both}
#checkout-dialog .receipt-details-body{padding-top:14px}
#checkout-dialog .receipt-details .receipt-id{font-size:.75rem;line-height:1.5;margin:0 0 12px;color:var(--muted,#766e73)}
#checkout-dialog .receipt-details .order-code{font-weight:500;color:var(--deep,#4f3547);overflow-wrap:anywhere}
#checkout-dialog .receipt-details .receipt-payment-status{font-size:.8rem;margin:10px 0}
#checkout-dialog .receipt-details .receipt-summary{margin:20px 0;padding:16px;border-radius:20px}
#checkout-dialog .receipt-details .purchase-total{margin-top:16px;font-size:.85rem}
#checkout-dialog .receipt-details .purchase-total strong{font-size:1.12rem}
#checkout-dialog .receipt-details .purchase-shipping{font-size:.76rem;gap:16px}
#checkout-dialog .receipt-details .order-timeline li{font-size:.65rem;line-height:1.4;overflow-wrap:normal;word-break:normal}
#checkout-dialog .receipt-actions{gap:4px}
#checkout-dialog .receipt-actions>.text-button{justify-self:start;min-height:44px;padding:10px 0;font-size:.8rem;text-underline-offset:4px}
#checkout-dialog .receipt-link-note{font-size:.73rem!important;margin:0 0 12px!important}
#checkout-dialog [data-receipt-extra]>.purchase-care,#checkout-dialog [data-receipt-extra]>.commerce-care{margin:14px 0 0;border:0;border-top:1px solid var(--line,#e6dcd5);border-radius:0;padding:14px 0 0;background:transparent}
#checkout-dialog [data-receipt-extra] summary{font-size:.8rem;font-weight:500}
#checkout-dialog [data-receipt-extra] [data-repeat]{font-size:.8rem;min-height:44px}
#checkout-dialog .receipt-action-status{font-size:.84rem;line-height:1.5;border-radius:18px;margin:0 0 18px;padding:14px 16px}
#checkout-dialog [hidden]{display:none!important}
#checkout-dialog .checkout-head{margin-bottom:20px}
#checkout-dialog .checkout-head .eyebrow{font-size:.68rem;letter-spacing:.2em}
#checkout-dialog .checkout-head h2{margin:8px 0 0;font:400 2rem/1.2 var(--serif,Georgia,serif)}
#checkout-dialog .checkout-summary{margin:0 0 22px;border-radius:22px;box-shadow:none}
#checkout-dialog .secure-note{display:flex;justify-content:center;gap:5px;padding:6px 0;background:none;font-size:.73rem;color:var(--muted,#766e73)}
#checkout-dialog .button.is-loading{display:flex;align-items:center;justify-content:center;gap:10px}
#checkout-dialog .button.is-loading::before{content:"";width:14px;height:14px;flex:none;border:1.5px solid #ffffff55;border-top-color:#fff;border-radius:50%;animation:receipt-orbit 1s linear infinite}
#checkout-dialog [data-celebrate="true"] .receipt-check{animation:receipt-check .55s .2s ease both}
@keyframes receipt-orbit{to{transform:rotate(360deg)}}
@keyframes receipt-breathe{50%{opacity:.6;transform:scale(.94)}}
@keyframes receipt-arrive{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes receipt-bloom{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}
@keyframes receipt-check{from{stroke-dashoffset:42}to{stroke-dashoffset:0}}
@keyframes receipt-ripple{from{opacity:.9;transform:scale(1)}to{opacity:0;transform:scale(1.35)}}
@keyframes receipt-details{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:520px){
 #checkout-dialog:has(.checkout-result){padding:28px 24px;max-height:calc(100dvh - 24px)}
 #checkout-dialog .receipt-brand{margin-bottom:18px}
 #checkout-dialog .receipt-emblem{width:86px;height:86px;margin-bottom:22px}
 #checkout-dialog .receipt-hero{padding-bottom:22px}
 #checkout-dialog .receipt-amount{margin-top:20px}
 #checkout-dialog .receipt-details .order-timeline{grid-template-columns:1fr;gap:16px;text-align:left;margin:18px 0}
 #checkout-dialog .receipt-details .order-timeline li{grid-template-columns:25px 1fr;align-items:center;justify-items:start;gap:12px;font-size:.78rem}
 #checkout-dialog .receipt-details .order-timeline li::after{left:11px;right:auto;top:25px;width:1px;height:16px}
 #checkout-dialog .receipt-details .purchase-items li{grid-template-columns:44px minmax(0,1fr) auto;gap:8px}
 #checkout-dialog .receipt-details .order-product-image{width:44px;height:56px;grid-row:auto}
 #checkout-dialog .receipt-details .purchase-item-amount{grid-column:auto;margin:0;font-size:.78rem}
 #checkout-dialog .receipt-details .purchase-item-detail strong{font-size:.8rem}
}
@media(max-width:360px){#checkout-dialog .receipt-heading #checkout-title{font-size:1.4rem}}
@media(prefers-reduced-motion:reduce){
 #checkout-dialog .checkout-result,#checkout-dialog .receipt-emblem,#checkout-dialog .receipt-orbit,#checkout-dialog .receipt-orbit-secondary,#checkout-dialog .receipt-emblem>img,#checkout-dialog .receipt-check,#checkout-dialog .receipt-details-body,#checkout-dialog .is-loading::before{animation:none!important;transition:none!important}
 #checkout-dialog .receipt-primary .button{transition:none}
}
