/* "Upgrade to hoodie" on tee PDPs (inc/pdp-hoodie-upgrade.php). The page stays the tee page.
   The first block is the owner-approved preview verbatim (outputs/hoodie-addon-preview/upgrade2.css,
   less its unused swatch rule); the additions after it cover states the preview did not draw. Black and white only: red means sale. */
.s6m-upg{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.s6m-upg__head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.s6m-upg__card{position:relative;display:grid;grid-template-columns:22px 60px 1fr auto;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--6m-line);background:var(--6m-bg);cursor:pointer;margin:0;transition:border-color .15s,background .15s}
.s6m-upg__card:hover{border-color:rgba(10,10,10,.35)}
.s6m-upg.is-on .s6m-upg__card{border:2px solid var(--6m-ink);padding:9px 11px;background:var(--6m-bg-2)}
.s6m-upg__check{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.s6m-upg__tick{width:22px;height:22px;border:1.5px solid var(--6m-ink);background:#fff;display:grid;place-items:center}
.s6m-upg.is-on .s6m-upg__tick{background:var(--6m-ink)}
.s6m-upg.is-on .s6m-upg__tick::after{content:"";width:11px;height:6px;margin-top:-3px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg)}
.s6m-upg__img{width:60px;height:60px;object-fit:cover;background:var(--6m-bg-2);display:block}
.s6m-upg__body{display:flex;flex-direction:column;gap:3px;min-width:0}
.s6m-upg__name{font-family:var(--6m-sans);font-size:14px;font-weight:700;line-height:1.25;color:var(--6m-ink)}
.s6m-upg__meta{font-family:var(--6m-sans);font-size:12px;line-height:1.3;color:var(--6m-muted-solid)}
.s6m-upg__meta a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.s6m-upg__price{font-family:var(--6m-sans);font-size:15px;font-weight:700;color:var(--6m-ink);white-space:nowrap}
.s6m-upg__sum{display:none;align-items:baseline;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--6m-line);border-top:0;margin-top:-8px;background:var(--6m-bg-2)}
.s6m-upg.is-on .s6m-upg__sum{display:flex}
.s6m-upg__sum-text{font-family:var(--6m-sans);font-size:12px;color:var(--6m-ink)}
.s6m-upg__sum-price{font-family:var(--6m-sans);font-size:16px;font-weight:700;color:var(--6m-ink);white-space:nowrap}
@media (max-width:480px){.s6m-upg__card{grid-template-columns:22px 52px 1fr auto;gap:10px}.s6m-upg__img{width:52px;height:52px}}

/* Additions. display:flex above beats the user-agent [hidden] rule (size not offered). */
.s6m-upg[hidden],.s6m-upg__price[hidden]{display:none}
.s6m-upg__check:focus-visible+.s6m-upg__tick{outline:2px solid var(--6m-ink);outline-offset:2px}
/* Colour the supplier does not print hoodies in: muted like an unavailable size pill, cannot be ticked. */
.s6m-upg.is-disabled .s6m-upg__card{cursor:not-allowed;background:var(--6m-bg)}
.s6m-upg.is-disabled .s6m-upg__card:hover{border-color:var(--6m-line)}
.s6m-upg.is-disabled .s6m-upg__tick,.s6m-upg.is-disabled .s6m-upg__img,.s6m-upg.is-disabled .s6m-upg__name{opacity:.35}
/* Wallet buttons while the box is ticked: shown only once pdp-hoodie-upgrade.js has hooked both wallet
   calls (sheet amount, tap) AND seen the sheet amount requested as the hoodie, which marks the form
   data-hoodie-wallet="ready". Until then they stay hidden, as before (same !important as the size gate
   in pdp.css, which the gateway's display:flex otherwise beats). The :has() rule covers a tick with no
   script at all; it is its own rule so a browser without :has() drops only it. */
form.s6m-pdp__form[data-hoodie-upgrade="on"]:not([data-hoodie-wallet="ready"]) #wc-stripe-express-checkout-element,
form.s6m-pdp__form[data-hoodie-upgrade="on"]:not([data-hoodie-wallet="ready"]) #wc-stripe-express-checkout-button-separator,
form.s6m-pdp__form[data-hoodie-upgrade="on"]:not([data-hoodie-wallet="ready"]) [data-wallets]{display:none!important}
form.s6m-pdp__form:has(.s6m-upg__check:checked):not([data-hoodie-wallet="ready"]) #wc-stripe-express-checkout-element,
form.s6m-pdp__form:has(.s6m-upg__check:checked):not([data-hoodie-wallet="ready"]) #wc-stripe-express-checkout-button-separator,
form.s6m-pdp__form:has(.s6m-upg__check:checked):not([data-hoodie-wallet="ready"]) [data-wallets]{display:none!important}

/* No hoodie thumbnail yet: same box, text-only (no image column). */
.s6m-upg--text .s6m-upg__card { grid-template-columns: 22px 1fr auto; padding-top: 14px; padding-bottom: 14px; }
.s6m-upg--text.is-on .s6m-upg__card { padding-top: 13px; padding-bottom: 13px; }
