/* Checkout Summary, the look. Behaviour is assets/checkout-summary.js.
   Tokens from STYLE_GUIDE.md §5, read from the page when it sets them and
   falling back to the canonical values when it does not. Outfit only;
   typed controls stay 16px; every target is at least 44px. */
.jc{
  --jc-blue:var(--blue,#1E3EAF);
  --jc-accent:var(--accent,#1C88ED);
  --jc-ink:var(--navy,#27277C);
  --jc-text:var(--text,#2D3748);
  --jc-gray:var(--gray,#475569);
  --jc-line:#E2E8F0;
  --jc-soft:var(--bg,#EDF2F7);
  --jc-tint:var(--light,#D2E9FF);
  --jc-green:#1f7d2b;
  --jc-red:#B4232A;
  --jc-warn:#8A5A00;
  font-family:var(--font-display,'Outfit',system-ui,sans-serif);
  color:var(--jc-text);
  font-size:1rem;
  line-height:1.5;
}
.jc *,.jc *::before,.jc *::after{box-sizing:border-box}
.jc [hidden]{display:none!important}
.jc-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.jc-head{margin-bottom:12px}
.jc-title{font-family:inherit;font-size:1.0625rem;font-weight:700;color:var(--jc-ink);margin:0;line-height:1.3}
.jc-sub{font-size:.875rem;color:var(--jc-gray);margin:2px 0 0}

/* lines */
.jc-items,.jc-adjs{display:flex;flex-direction:column}
.jc-adjs{margin-top:2px}
.jc-line{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:10px 0}
.jc-item{border-bottom:1px solid var(--jc-soft)}
.jc-line-main{display:flex;flex-direction:column;min-width:0;flex:1}
.jc-line-name{font-size:.9375rem;font-weight:600;color:var(--jc-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jc-adj .jc-line-name{font-weight:500;font-size:.875rem}
.jc-line-note{font-size:.8125rem;color:var(--jc-gray);line-height:1.4;margin-top:1px}
.jc-line-side{display:flex;flex-direction:column;align-items:flex-end;flex:none;text-align:right}
.jc-line-amt{font-size:.9375rem;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.jc-adj .jc-line-amt{font-size:.875rem;font-weight:500}
.jc-line-per{font-size:.75rem;color:var(--jc-gray);white-space:nowrap}
.jc-line.is-discount .jc-line-amt,.jc-line.is-discount .jc-line-name{color:var(--jc-green)}
.jc-line.is-muted .jc-line-name,.jc-line.is-muted .jc-line-amt{color:var(--jc-gray)}
.jc-adj{padding:6px 0}

.jc-slot:empty{display:none}
.jc-slot{margin-top:4px}

/* promo code */
.jc-coupon{margin-top:14px}
.jc-code{display:flex;gap:8px}
.jc-code input{flex:1 1 0;width:0;min-width:0;font-family:inherit;font-size:16px;color:var(--jc-text);min-height:44px;padding:9px 12px;border:1.5px solid #CBD5E0;border-radius:8px;outline:none;background:#fff;text-transform:uppercase;letter-spacing:.02em}
.jc-code input::placeholder{text-transform:none;letter-spacing:0;color:#64748B}
.jc-code input:focus{border-color:var(--jc-accent)}
.jc-code input:focus-visible{outline:3px solid var(--jc-blue);outline-offset:2px}
.jc-code input[aria-invalid="true"]{border-color:var(--jc-red)}
.jc-code button{flex:none;border:1.5px solid var(--jc-blue);background:#fff;color:var(--jc-blue);font-family:inherit;font-weight:600;font-size:var(--fs-label,.8125rem);letter-spacing:0;text-transform:none;min-height:44px;min-width:76px;padding:9px 14px;border-radius:8px;cursor:pointer;transition:background .15s,color .15s}
.jc-code button[aria-busy="true"]{cursor:progress;opacity:.75}
.jc-chip{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 0 0 12px;border-radius:10px;background:var(--jc-tint);color:var(--jc-ink);font-size:.875rem}
.jc-chip .jc-ic-tag{width:16px;height:16px;color:var(--jc-blue)}
.jc-chip-code{font-weight:700;letter-spacing:.03em;color:var(--jc-blue)}
.jc-chip-note{flex:1;color:var(--jc-ink)}
.jc-chip-x{flex:none;width:44px;height:44px;border:0;background:transparent;color:var(--jc-ink);border-radius:10px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.jc-chip-x .jc-ic{width:16px;height:16px}
.jc-code-msg{font-size:.8125rem;line-height:1.45;margin:6px 0 0;color:var(--jc-gray)}
.jc-code-msg:empty{display:none}
.jc-code-msg.is-error{color:var(--jc-red)}
.jc-code-msg.is-ok{color:var(--jc-green)}

/* total */
.jc-total{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-top:14px;padding-top:14px;border-top:1px dashed #CBD5E0}
.jc-total-l{font-weight:700;font-size:.9375rem;color:var(--jc-text)}
.jc-total-v{font-weight:700;font-size:1.75rem;line-height:1.1;color:var(--jc-blue);font-variant-numeric:tabular-nums;white-space:nowrap}

/* the one button */
.jc-pay{position:relative;display:grid;place-items:center;width:100%;min-height:52px;margin-top:16px;padding:12px 18px;border:0;border-radius:10px;background:var(--jc-blue);color:#fff;font-family:inherit;font-weight:600;font-size:1rem;letter-spacing:0;cursor:pointer;overflow:hidden;transition:background-color .2s,opacity .2s,transform .12s}
.jc-pay-face{grid-area:1/1;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}
.jc-pay-face.is-out{pointer-events:none}
.jc-pay .jc-ic{width:18px;height:18px;flex:none}
.jc-pay[data-state="processing"]{cursor:progress}
.jc-pay[data-state="paid"]{background:var(--jc-green);cursor:default}
.jc-pay:disabled{opacity:.55;cursor:not-allowed}
.jc-pay:focus-visible{outline:3px solid var(--jc-accent);outline-offset:3px}
@media (hover:hover) and (pointer:fine){
  .jc-pay:not(:disabled):not([data-state="processing"]):not([data-state="paid"]):hover{opacity:.92;transform:translateY(-1px)}
  .jc-code button:hover{background:var(--jc-blue);color:#fff}
  .jc-chip-x:hover{background:rgba(30,62,175,.1)}
}
.jc-pay:not(:disabled):active{transform:scale(.985)}

.jc-secure{display:flex;align-items:center;justify-content:center;gap:6px;margin:10px 0 0;font-size:.75rem;color:var(--jc-gray)}
.jc-secure .jc-ic{width:13px;height:13px}
.jc-msg{font-size:.875rem;line-height:1.5;margin:10px 0 0}
.jc-msg:empty{display:none}
.jc-msg.is-error{color:var(--jc-red)}
.jc-msg.is-ok{color:var(--jc-green)}
.jc-msg.is-warn{color:var(--jc-warn)}
.jc-foot{margin-top:12px;font-size:.75rem;line-height:1.55;color:var(--jc-gray);background:var(--jc-soft);padding:10px 12px;border-radius:8px}

/* icons */
.jc-ic{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.jc-ic-spinner{animation:jc-spin .8s linear infinite}
.jc-spin-arc{stroke-dasharray:42 100;opacity:.95}
@keyframes jc-spin{to{transform:rotate(360deg)}}
.jc-ic-spinner{transform-origin:50% 50%}

@media (prefers-reduced-motion:reduce){
  .jc-pay,.jc-code button{transition:none}
  .jc-ic-spinner{animation-duration:1.6s}
}
html[data-a11y-motion="off"] .jc-pay,html[data-motion="reduce"] .jc-pay{transition:none}
html[data-a11y-motion="off"] .jc-ic-spinner,html[data-motion="reduce"] .jc-ic-spinner{animation-duration:1.6s}
