/* Cart page (#383), from the Front Porch mockup's cart (reports/site-concepts/frontporch/fp-c.html, data-page="cart").
   Reads tokens.css; the shell's .btn, .chip, .crumbs, .price and .note. */

.ct .ti { width: 44px; height: 44px; border-radius: 50%; background: var(--mist); color: var(--roof); display: grid; place-items: center; flex: none; }
.ct .ti .ic { width: 21px; height: 21px; }

/* heading */
.ct-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; padding: 2px 0 18px; border-bottom: 1px solid var(--line); }
.ct-h h1 { font-size: 2.6rem; }
.ct-h h1:focus { outline: 0; }
.ct-c { color: var(--muted); font-weight: 600; }
.ct-h .more { margin-left: auto; font-weight: 700; display: flex; align-items: center; gap: 4px; min-height: 44px; }
.ct-h .more .ic { width: 18px; height: 18px; }

/* status lines: WooCommerce notices, this page's messages and the cart's errors (the ClassWallet banner: pages/cw-banner.css) */
.ct-st, .ct-wc { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin-top: 14px; background: var(--mist); border-left: 3px solid var(--garden); border-radius: 0 6px 6px 0; padding: 10px 14px 10px 16px; min-height: 52px; font-size: .95rem; }
.ct-st:empty { display: none; }
.ct-msg { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.ct-errs { display: grid; gap: 4px; color: var(--brick); font-weight: 600; }
.ct-st:has(.ct-errs) { border-left-color: var(--brick); background: var(--brick-t); }
.ct-st:has(.ct-note), .ct-st:has(.ct-errs) { display: grid; gap: 10px; }
.ct-st:has(.ct-note) { border-left-color: var(--brick); }
.ct-note p:first-child { font-weight: 700; color: var(--navy); }
.ct-note ul { list-style: disc; padding-left: 20px; margin: 4px 0; }
.ct-note p + p { margin-top: 4px; color: var(--muted); }
.ct-wc ul, .ct-wc .woocommerce-message, .ct-wc .woocommerce-info, .ct-wc .woocommerce-error { margin: 0; padding: 0; list-style: none; }
.ct-wc .woocommerce-error { color: var(--brick); font-weight: 600; }
.ct-wc a.button { margin-right: 10px; font-weight: 700; }

/* layout */
.ct-b { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 52px; align-items: start; padding-top: 4px; }
.ct-b.is-empty, .ct-b.is-loading { grid-template-columns: minmax(0, 1fr); }
.ct-b.busy .ct-l { opacity: .7; transition: opacity .15s; }
.ct-load { padding: 28px 0; color: var(--muted); }
.ct-nojs { background: var(--mist); border-radius: 8px; padding: 24px 28px; display: grid; gap: 12px; color: var(--ink); }
.ct-top { display: none; }

/* lines */
.ct-i { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto 104px; grid-template-areas: "t d q p" "t a a a"; gap: 4px 24px; padding: 22px 0 16px; border-bottom: 1px solid var(--line); }
.ct-t { grid-area: t; position: relative; display: block; width: 112px; aspect-ratio: 1; background: var(--mist); border-radius: 4px; transition: background .15s; }
a.ct-t:hover { background: var(--mist-2); }
.ct-t img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; mix-blend-mode: multiply; }
.ct-d { grid-area: d; min-width: 0; display: grid; gap: 2px; align-content: start; }
.ct-d h3 { font: 600 1.06rem/1.3 var(--sans); }
.ct-d h3 a { color: var(--ink); }
.ct-m { font-size: .9rem; color: var(--muted); }
.ct-w { font-size: .86rem; font-weight: 600; margin-top: 4px; color: var(--brick); }
.ct-kit { margin-top: 6px; font-size: .88rem; color: var(--muted); }
.ct-kh { font-weight: 700; color: var(--navy); font-size: .82rem; letter-spacing: .04em; }
.ct-kit ul { display: grid; gap: 1px; padding-left: 14px; list-style: disc; }
.ct-i .qty { grid-area: q; height: 44px; align-self: start; }
.ct-i .step input { width: 44px; height: 100%; border: 0; border-inline: 1px solid var(--line); text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--white); -moz-appearance: textfield; appearance: textfield; }
.ct-i .step input::-webkit-inner-spin-button, .ct-i .step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ct-i .step input:focus-visible { outline-offset: -3px; }
.ct-qf { display: flex; align-items: center; font-weight: 600; color: var(--muted); }
.ct-p { grid-area: p; text-align: right; display: grid; align-content: start; line-height: 1.3; padding-top: 9px; }
.ct-p .price { font-size: 1.12rem; }
.ct-a { grid-area: a; display: flex; gap: 0 22px; flex-wrap: wrap; }
.ct-lk { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--roof); font-weight: 600; font-size: .92rem; text-decoration: underline; text-decoration-color: rgba(34, 64, 126, .3); text-underline-offset: 3px; }
.ct-lk:hover { text-decoration-color: currentColor; }

/* empty */
.ct-e { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 40px; align-items: center; background: var(--mist); border-radius: 8px; padding: 40px 44px; margin-top: 22px; }
.ct-e > svg { width: 150px; height: 138px; grid-row: span 4; --win: var(--unlit); }
.ct-e h2 { font-size: 1.9rem; }
.ct-e p { color: var(--muted); max-width: 58ch; }
.ct-eg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ct-eg .chip { padding: 0 14px; }
.ct-ea { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
/* Lists (#364): "Save this cart as a list" under the lines, its answer beside it */
.ct-sv { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; }
.ct-sv .ct-fm a { color: var(--roof); text-decoration: underline; text-underline-offset: 3px; }

/* summary */
.ct-sc { background: var(--mist); border-top: 4px double var(--navy); border-radius: 0 0 6px 6px; padding: 20px 24px 22px; }
.ct-sc h2 { font-size: 1.45rem; }
.ct-fs { margin: 12px 0 10px; font-size: .94rem; }
.ct-fs b { color: var(--navy); }
.ct-fs.free b { color: var(--garden); }
.ct-road { position: relative; height: 40px; margin: 4px 44px 0 0; }
.ct-road::before { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 8px; border-radius: 4px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.ct-fill { position: absolute; left: 0; bottom: 6px; height: 8px; border-radius: 4px; width: var(--p, 0%); background: var(--garden); transition: width .45s; }
.ct-road .ic { position: absolute; bottom: 13px; left: var(--p, 0%); transform: translateX(-72%); width: 26px; height: 26px; color: var(--navy); transition: left .45s; }
.ct-home { position: absolute; right: -44px; bottom: 0; width: 38px; height: 35px; --win: var(--unlit); }
.ct-fs.free .ct-home { --win: var(--lit); }
.ct-fs-s { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.ct .ledger { font-variant-numeric: tabular-nums; margin-top: 6px; }
.ct .ledger li { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ct .ledger li small { display: block; color: var(--muted); font-size: .82rem; }
.ct .ledger i { flex: 1; border-bottom: 2px dotted var(--line-2); transform: translateY(-5px); min-width: 16px; }
.ct .ledger .kp { font-weight: 700; color: var(--navy); font-size: 1.3rem; border-bottom: 0; padding-top: 12px; }
.ct-mu { color: var(--muted); font-size: .9rem; }
.ct-free { color: var(--garden); font-weight: 700; }

.ct-rates { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.ct-rates legend { font-weight: 700; color: var(--navy); font-size: .92rem; margin-bottom: 6px; padding: 0; }
.ct-rate { position: relative; }
.ct-rate + .ct-rate { margin-top: 6px; }
.ct-rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ct-rate label { display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 44px; padding: 8px 14px 8px 42px; border: 1.5px solid var(--line); border-radius: 6px; background: var(--white); cursor: pointer; position: relative; font-size: .92rem; }
.ct-rate label::before { content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--field); background: var(--white); }
.ct-rate input:checked + label { border-color: var(--roof); box-shadow: inset 0 0 0 1px var(--roof); }
.ct-rate input:checked + label::before { border: 6px solid var(--roof); }
.ct-rate input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.ct-rate label small { display: block; margin-top: 2px; font-size: .82rem; color: var(--muted); } /* pickup: where, when (#554) */
/* When the order leaves us (#540), under the shipping choice: the plugin's sentences, the first as a headline */
.ct-when { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; font-size: .88rem; line-height: 1.45; color: var(--muted); }
.ct-when .ic { width: 22px; height: 22px; color: var(--roof); flex: none; margin-top: 1px; }
.ct-when > div { min-width: 0; }
.ct-when p + p { margin-top: 4px; }
.ct-when .ct-when-h { font-weight: 700; color: var(--navy); font-size: .95rem; }

.ct-est { margin-top: 12px; border-top: 1px solid var(--line); }
.ct-est summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--roof); font-size: .92rem; list-style: none; }
.ct-est summary::-webkit-details-marker { display: none; }
.ct-est summary::after { content: "+"; font: 400 1.4rem/1 var(--sans); }
.ct-est[open] summary::after { content: "\2212"; }
.ct-estf { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.ct-f { display: grid; gap: 4px; min-width: 0; }
.ct-f label, .ct-cp label { font-weight: 600; font-size: .88rem; color: var(--navy); }
.ct-f select, .ct-f input, .ct-cp input { width: 100%; min-width: 0; height: 44px; border: 1.5px solid var(--field); border-radius: 4px; padding: 0 10px; background: var(--white); font-size: 1rem; }
.ct-f select:focus, .ct-f input:focus, .ct-cp input:focus { border-color: var(--roof); box-shadow: 0 0 0 3px rgba(62, 123, 224, .22); outline: 0; }
.ct-estf .btn { padding: 0 14px; }
.ct-estf .ct-fm { grid-column: 1 / -1; }
.ct-est .note { margin: 6px 0 4px; }
.ct-fm { font-size: .86rem; font-weight: 600; color: var(--garden); }
.ct-fm.bad { color: var(--brick); }
.ct-fm:empty { display: none; }

.ct-cp { margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.ct-cp > div { display: flex; gap: 8px; }
.ct-cp input { flex: 1; text-transform: uppercase; }
.ct-cps { display: grid; gap: 2px; }
.ct-cps li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; color: var(--garden); font-size: .9rem; }

.ct-go { width: 100%; margin-top: 16px; min-height: 52px; font-size: 1.06rem; }
.ct-go .ic { width: 20px; height: 20px; }

.ct-n { margin-top: 14px; }
.ct-n li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.ct-n b { display: block; color: var(--navy); line-height: 1.3; }
.ct-n p { font-size: .88rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.ct-n a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 700; font-size: .9rem; margin-top: 2px; }
.ct-esa { margin-top: 14px; padding: 0 4px; line-height: 1.45; }

@media (max-width: 960px) {
	.ct-b { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.ct-s { max-width: 560px; }
}
@media (max-width: 560px) {
	.ct-h h1 { font-size: 2rem; }
	.ct-h .more { display: none; }
	.ct-top:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.ct-top .btn { padding: 0 18px; }
	.ct-i { grid-template-columns: 84px minmax(0, 1fr) auto; grid-template-areas: "t d d" "t q p" "a a a"; gap: 10px 14px; padding: 18px 0 8px; }
	.ct-t { width: 84px; }
	.ct-p { padding-top: 10px; }
	.ct-sc { padding: 18px 18px 20px; }
	.ct-e { grid-template-columns: minmax(0, 1fr); padding: 28px 20px; }
	.ct-e > svg { width: 96px; height: 88px; grid-row: auto; }
	.ct-e h2 { font-size: 1.6rem; }
	.ct-estf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.ct-estf .btn { grid-column: 1 / -1; }
}
