/* Super Mundo 3D checkout: compact forms, visible actions and brand palette.
   Scoped so the store, spool renderer and marketplace identities stay independent. */
#checkout-dialog,#cart-dialog{--paper:#fff;--surface:#f5f5f7;--ink:#222;--muted:#777;--line:#e5e5ea;--cor:#215ed4;--texto:var(--ink);--cinza:var(--muted);--linha:var(--line);--bg:var(--surface);--card:var(--paper);font-family:Poppins,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:13px;line-height:1.5}
#checkout-dialog.co-dialog,#cart-dialog.sheet-right{position:fixed;inset:0;width:100%;max-width:620px;max-height:94dvh;height:auto;margin:3dvh auto auto;padding:0;border:0;border-radius:16px;display:flex;flex-direction:column;overflow:hidden;background:var(--paper);color:var(--ink);box-shadow:0 18px 60px #0003;animation:none}
#checkout-dialog.co-dialog:not([open]),#cart-dialog:not([open]){display:none}
#checkout-dialog.co-dialog,#cart-dialog.sheet-right{bottom:auto}
#checkout-dialog::backdrop,#cart-dialog::backdrop{background:#0007;backdrop-filter:none}
#checkout-dialog .co-top,#cart-dialog .sheet-head{position:relative;flex:none;padding:0;border:0;background:var(--paper)}
#checkout-dialog .co-top-row,#cart-dialog .sheet-head{position:relative;min-height:58px;display:flex;align-items:center;justify-content:center;padding:0 46px}
#checkout-dialog #co-dialog-title,#cart-dialog #cart-title{font:800 18px/1.3 Poppins,sans-serif;text-align:center;margin:0;padding:0;color:var(--ink)}
#checkout-dialog .close,#cart-dialog .close{position:absolute;right:12px;top:12px;min-width:34px;width:34px;height:34px;min-height:34px;border-radius:50%;background:#888;color:#fff;font:400 23px/1 Arial;display:grid;place-items:center;padding:0}
#checkout-steps{position:absolute;left:14px;top:50%;transform:translateY(-50%);flex:none;margin:0;display:block}
#checkout-dialog .co-stage-chip,#cart-dialog .co-stage-chip{font-size:12.5px;font-weight:800;letter-spacing:.2px;padding:3px 12px;border-radius:999px;background:#215ed412;color:var(--cor);white-space:nowrap}
#cart-dialog .co-stage-chip{position:absolute;left:14px;top:50%;transform:translateY(-50%)}
#checkout-dialog .co-simbar{margin:0;padding:7px 14px;font-size:10px;line-height:1.4}
#checkout-dialog .co-scroll,#cart-dialog .sheet-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 16px}
#checkout-dialog .co-summary{display:none}
#checkout-dialog .co-body{border:1px solid var(--line);border-radius:14px;background:var(--paper);padding:6px 14px 14px;min-width:0}
#checkout-dialog #co-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0;padding:0}
#checkout-dialog .co-set{margin:0 0 10px}
#checkout-dialog .co-set legend{font:700 13px/1.4 Poppins,sans-serif;padding:0;margin:6px 0 8px}
#checkout-dialog .co-field{margin-bottom:8px;min-width:0}
#checkout-dialog .co-field span{font-size:12px;font-weight:600;margin-bottom:3px}
#checkout-dialog .co-field input,#checkout-dialog .co-select{border:1px solid var(--line);border-radius:10px;padding:7px 10px;font:400 13px/1.5 Poppins,sans-serif;color:var(--ink);background:transparent;min-height:36px;width:100%}
#checkout-dialog .co-field input:focus,#checkout-dialog .co-select:focus{outline:2px solid var(--cor);outline-offset:1px}
#checkout-dialog .co-row{gap:8px;grid-template-columns:1fr 1fr}
#checkout-dialog .co-row-uf{grid-template-columns:1fr 72px}
#checkout-dialog .co-msg,#checkout-dialog .co-hint{font-size:11.5px}
#checkout-dialog .co-warn{font-size:11px;line-height:1.45;padding:8px 10px;margin:5px 0 10px;border-radius:10px}
#checkout-dialog .co-foot,#cart-dialog .cart-foot{position:relative;flex:none;display:flex;flex-direction:row;align-items:center;gap:10px;background:var(--paper);padding:14px 18px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line);box-shadow:0 -4px 14px #0000000f}
#checkout-dialog .co-foot-total{flex:1;min-width:0;display:flex;flex-direction:column;gap:0}
#co-foot-breakdown>div{display:flex;align-items:baseline;justify-content:space-between;font-size:10px;line-height:1.3;gap:8px;color:var(--muted)}
#co-foot-breakdown b{font:inherit;white-space:nowrap}
#checkout-dialog .co-foot-sum{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-top:2px;white-space:nowrap}
#checkout-dialog .co-foot-sum span{font-size:12px;font-weight:800;color:var(--ink)}
#checkout-dialog .co-foot-sum b{font:800 15px/1.4 Poppins,sans-serif;color:var(--ink)}
#checkout-dialog .co-foot-actions{flex:none;width:38%;max-width:150px;display:flex}
#checkout-dialog .co-foot .primary,#cart-dialog #go-checkout{width:100%;min-height:49px;height:49px;max-height:49px;margin:0;display:flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:12px;background:var(--cor);color:#fff;font:800 13px/1.12 Poppins,sans-serif;padding:0 8px;text-align:center;box-shadow:0 3px 12px #00000024}
#checkout-dialog .co-foot .co-back{flex:none;width:42px;min-height:49px;height:49px;max-height:49px;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);font-size:18px}
#checkout-dialog .co-review{gap:8px}#checkout-dialog .co-payment-choice{min-width:0}
#checkout-dialog .co-review>div{padding:10px 72px 10px 12px;border-radius:12px}
#checkout-dialog .co-review p{font-size:12px}
#checkout-dialog .co-review h3{font:700 11px Poppins,sans-serif}
#checkout-dialog .co-edit{font-size:11px;min-height:36px;color:var(--cor)}
#checkout-dialog .co-resumo{padding:6px 12px;border-radius:12px}
#checkout-dialog .co-line{font-size:12px;padding:6px 0}
#checkout-dialog .co-line.co-sum{font-size:14px}
#checkout-dialog .co-line.co-sum b{color:var(--cor)}
/* Final source rules: 44px payments, 6px gaps. Detail panels never stretch cards. */
#checkout-dialog .pag-opcoes{display:flex;flex-direction:column;gap:6px;margin:4px 0 12px}
#checkout-dialog .pag-opcoes .pag-op{width:100%;height:44px!important;min-height:44px!important;max-height:44px;box-sizing:border-box;display:flex;position:relative;align-items:center;justify-content:center;overflow:hidden;padding:0 12px;border-radius:10px;margin:0;font:600 14px Poppins,sans-serif;cursor:pointer}
#checkout-dialog .pag-op input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
#checkout-dialog .pag-op:focus-within{outline:3px solid #38bdf8;outline-offset:3px}
#checkout-dialog .pag-op.sel{box-shadow:0 0 0 2px #1db954;border-color:#1db954}
#checkout-dialog .pag-op .po-logo-img{height:30px;max-width:100%;object-fit:contain;z-index:5}
#checkout-dialog .pag-op .po-pix{height:36px;max-height:36px}
#checkout-dialog .co-pix-option,#checkout-dialog .co-pix-option.sel{background:linear-gradient(110deg,#0f766e,#14b8a6);border:0}
#checkout-dialog .pag-op.mp-card .po-logo-img{height:58px;max-height:58px}
#checkout-dialog .co-pay-neutral{background:var(--surface);color:var(--ink)}
#checkout-dialog .co-payment-expansion{background:var(--surface);border:1px solid var(--line);border-radius:0 0 10px 10px;padding:10px 12px;font-size:11px}
#checkout-dialog .co-payment-choice.selected .pag-op{border-bottom-left-radius:0;border-bottom-right-radius:0}
#checkout-dialog .co-payment-detail{display:flex;justify-content:space-between;align-items:start;gap:12px;line-height:1.5}
#checkout-dialog .co-payment-detail strong{font-size:13px;white-space:nowrap}
#checkout-dialog .co-installments{display:block;margin-top:8px;font-weight:600}
#checkout-dialog .co-select{display:block;margin-top:4px;grid-column:auto}
#checkout-dialog .co-machine{display:flex;align-items:center;gap:8px;margin-top:8px}
#checkout-dialog .co-machine img{width:36px;height:18px;object-fit:contain}
#checkout-dialog .co-cardsim{padding:12px;border-width:1px;border-radius:12px}
#checkout-dialog .co-simbig{font-size:11px}
#checkout-dialog .co-qr{max-width:180px;max-height:180px}
#checkout-dialog .co-delivery-info{font-size:11px;padding:10px 12px;margin:0 0 6px;border-radius:0 0 14px 14px}
#checkout-dialog #co-ship .co-delivery-group h3{font:700 12px Poppins,sans-serif;margin:6px 0 2px}
#checkout-dialog #co-ship .motion-card:has(+.co-delivery-info){border-bottom-left-radius:0;border-bottom-right-radius:0}
#cart-dialog .cart-list{padding:6px 18px;border:1px solid var(--line);border-radius:14px}
#cart-dialog .cart-row{grid-template-columns:34px minmax(0,1fr) auto;gap:8px;padding:5px 0;align-items:center}
#cart-dialog .cart-dot{width:34px;height:34px;border-radius:7px}
#cart-dialog .cart-row h3{font:600 11.5px/1.2 Poppins,sans-serif}
#cart-dialog .cart-row p,#cart-dialog .cart-side .remove{font-size:10px;margin:2px 0}
#cart-dialog .cart-side b{font-size:12px;white-space:nowrap}
#cart-dialog .quantity{gap:6px;margin-top:4px;font-size:12.5px}
#cart-dialog .quantity button{width:22px;height:22px;min-height:22px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--cor);font-size:16px}
#cart-dialog .co-add-more{display:block;width:calc(100% - 36px);margin:8px 18px;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--cor);font:700 15px Poppins,sans-serif;cursor:pointer}
#cart-dialog .cart-notice{font-size:10px;line-height:1.4;color:var(--muted);padding:4px 18px}
#cart-dialog .cart-foot .cart-total{flex:1;min-width:0;display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0}
#cart-dialog .cart-total span{font-size:12px;font-weight:800}
#cart-dialog .cart-total strong{font-size:15px;white-space:nowrap}
#cart-dialog #go-checkout{flex:none;width:38%;max-width:150px}
#cart-dialog .cart-foot>.co-ghost{display:none}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) #checkout-dialog,:root:not([data-theme="light"]) #cart-dialog{--paper:#0c172d;--surface:#182843;--ink:#f2f6ff;--muted:#a7b9d2;--line:#34496a;--cor:#8cb7ff}}
:root[data-theme="dark"] #checkout-dialog,:root[data-theme="dark"] #cart-dialog{--paper:#0c172d;--surface:#182843;--ink:#f2f6ff;--muted:#a7b9d2;--line:#34496a;--cor:#8cb7ff}
#checkout-dialog .co-foot .primary,#cart-dialog #go-checkout{background:#215ed4}
@media(max-width:680px){#checkout-dialog.co-dialog,#cart-dialog.sheet-right{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}#checkout-dialog .co-stage-chip,#cart-dialog .co-stage-chip{font-size:10px;padding:3px 8px}#checkout-dialog #co-dialog-title,#cart-dialog #cart-title{font-size:16px}#checkout-dialog .co-field input,#checkout-dialog .co-select{font-size:16px}#checkout-dialog .co-scroll{padding:12px 10px}#checkout-dialog .co-body{padding:6px 12px 12px}}
@media(prefers-reduced-motion:reduce){#checkout-dialog .pv-fall,#checkout-dialog .pv-shine,#checkout-dialog .pv-tap,#checkout-dialog .pv-swipe{animation:none}#checkout-dialog .pv-shine{display:none}}

/* The header and actions never shrink; only the middle area scrolls. */
#checkout-dialog.co-dialog,#cart-dialog.sheet-right{box-sizing:border-box;min-height:0;min-width:0;height:min(760px,94dvh)}
#checkout-dialog .co-scroll,#cart-dialog .sheet-body{box-sizing:border-box;min-height:0;flex:1 1 0;overflow:auto}
#checkout-dialog .co-top,#cart-dialog .sheet-head,#checkout-dialog .co-foot,#cart-dialog .cart-foot{box-sizing:border-box;flex:0 0 auto}
#cart-dialog .cart-foot:empty{display:none}
#checkout-dialog .close,#cart-dialog .close{background:var(--surface);color:var(--ink);border:1px solid var(--line)}
#cart-dialog .empty-cart{padding:16px 0}
#cart-dialog .empty-cart .primary{background:#215ed4;color:#fff}
#checkout-dialog .co-stage-chip,#cart-dialog .co-stage-chip{background:#215ed41a}
#checkout-dialog button:focus-visible,#cart-dialog button:focus-visible{outline:2px solid #ffd43b;outline-offset:2px}
@media(max-width:680px){
 #checkout-dialog.co-dialog,#cart-dialog.sheet-right{inset:var(--checkout-visible-top,0px) 0 auto;box-sizing:border-box;width:100%;max-width:100%;height:var(--checkout-visible-height,100dvh);max-height:var(--checkout-visible-height,100dvh);margin:0;padding:0}
 #checkout-dialog .co-foot,#cart-dialog .cart-foot{padding:10px 12px calc(10px + env(safe-area-inset-bottom));gap:8px}
 #checkout-dialog .co-foot-actions{width:auto;min-width:104px;max-width:44%}
 #cart-dialog #go-checkout{width:auto;min-width:112px;max-width:46%}
 #cart-dialog .cart-total{flex-wrap:wrap;gap:2px 6px}
}


body:has(#cart-dialog[open]),body:has(#checkout-dialog[open]){overflow:hidden}
@media(max-width:680px){
 #checkout-dialog #co-foot-breakdown{display:none}
 #checkout-dialog .co-foot-sum{flex-direction:column;gap:0;align-items:flex-start}
 #checkout-dialog .co-foot-sum span{font-size:10px;color:var(--muted)}
 #checkout-dialog .co-foot-sum b{font-size:14px}
 #checkout-dialog .co-foot .co-back{width:34px}
 #checkout-dialog .co-review>div{padding-right:60px}
}

#checkout-dialog .co-delivery-tabs{display:flex;gap:8px;margin:12px 0}
#checkout-dialog .co-delivery-tabs button{flex:1;min-height:42px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:600 13px Poppins,sans-serif}
#checkout-dialog .co-delivery-tabs button[aria-pressed="true"]{background:#215ed4;border-color:#215ed4;color:#fff}

#checkout-dialog .co-pix-preview{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px;text-align:center;color:var(--ink)}
#checkout-dialog .co-pix-preview .co-qr{display:block;width:160px;height:160px;flex:none}
#checkout-dialog .co-pix-preview small{color:var(--muted);font-size:11px}
