/* =============================================================================
   The hosted checkout page — Kartra's six templates (P97, P99, P100).

   One set of parts (the summary card, the Billing › Shipping › Payment sections)
   arranged six ways. The arrangement is the ONLY thing that differs between
   templates, so every rule below is either shared or keyed on [data-layout].

   Every template collapses to one column at 640px: a checkout that needs a wide
   screen is a checkout half the buyers cannot complete.

   The accent the Design tab stored arrives as --eb-accent / --eb-primary on
   .eb-checkout-page itself; nothing here hardcodes a brand colour.
   ============================================================================= */

/* A 100%-wide input with 10px of padding and a border is 22px wider than its column, which on a
   390px phone is a checkout the buyer has to scroll sideways to read. */
.eb-checkout-page, .eb-checkout-page * { box-sizing: border-box; }

/* The page. The single-column 560px of the old checkout is template 6's width;
   every template with a summary column needs the room for two. */
.eb-checkout-page { max-width: 1080px; }
.eb-checkout-page[data-layout="6"] { max-width: 560px; }
.eb-co-title { margin-top: 0; font-size: 1.6rem; }

/* HIDDEN MEANS HIDDEN. theme.css gives .eb-co-label `display:block`, which outranks the user
   agent's [hidden] rule — so the State select of a country with no states, the shipping block
   behind "Same as billing" and the steps behind Continue were all drawn anyway. */
.eb-checkout-page [hidden] { display: none !important; }

/* A chrome-less render (?eb_preview=1, ?eb_embed=1) has no theme header to sit
   under, so the page starts where the document does. */
body.eb-checkout-bare { margin: 0; background: var(--eb-bg, #fff); }
body.eb-checkout-bare .eb-checkout-page { margin: 24px auto; }

/* --- the two arrangements ------------------------------------------------- */
.eb-co-cols { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 28px; align-items: start; }
.eb-co-stack { display: grid; grid-template-columns: 1fr; gap: 24px; }
.eb-co-centred { max-width: 520px; margin: 0 auto; }
.eb-co-main { min-width: 0; }

/* --- the summary card ----------------------------------------------------- */
.eb-co-summary {
	border: 1px solid var(--eb-border, #e3e8ef);
	border-radius: 16px;
	padding: 20px;
	background: var(--eb-surface, #fff);
}
.eb-co-sumtop { display: flex; justify-content: flex-end; gap: 14px; margin: 0 0 10px; font-size: 12px; opacity: .7; }
.eb-co-img { margin: 0 0 14px; text-align: center; }
.eb-co-img img { max-width: 100%; max-height: 220px; border-radius: 12px; }
.eb-co-desc { margin: 0 0 12px; font-size: 14px; opacity: .8; }
.eb-co-summary .eb-co-price { font-size: 1.4rem; margin: 0 0 14px; }
.eb-co-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--eb-border, #e3e8ef); }
.eb-co-rowlab { font-size: 14px; }
.eb-co-rowval { font-variant-numeric: tabular-nums; }
.eb-co-today { font-weight: 700; font-size: 1.05rem; border-top-width: 2px; }
.eb-co-coupon { margin: 12px 0 0; }
/* The field and its Apply button on one row; the answer under them (P78). */
.eb-co-couponrow { display: flex; gap: 8px; align-items: stretch; }
.eb-co-couponrow .eb-co-input { flex: 1 1 auto; min-width: 0; }
.eb-co-apply { flex: 0 0 auto; padding: 0 14px; }
.eb-co-couponmsg { margin: 6px 0 0; font-size: 13px; min-height: 1em; }
.eb-co-coupon[data-eb-coupon-applied] .eb-co-couponmsg { color: var(--eb-cta, #08CF65); }

/* Kartra's − n + */
.eb-co-qty { display: inline-flex; align-items: center; border: 1px solid var(--eb-border, #e3e8ef); border-radius: 10px; overflow: hidden; }
.eb-co-qbtn {
	border: 0; background: transparent; cursor: pointer;
	width: 34px; height: 34px; font-size: 18px; line-height: 1; color: inherit;
}
.eb-co-qbtn:hover { background: rgba(0, 0, 0, .05); }
.eb-co-qnum { width: 48px; height: 34px; border: 0; border-left: 1px solid var(--eb-border, #e3e8ef); border-right: 1px solid var(--eb-border, #e3e8ef); text-align: center; background: transparent; color: inherit; }
.eb-co-qnum::-webkit-outer-spin-button, .eb-co-qnum::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.eb-co-qnum { -moz-appearance: textfield; appearance: textfield; }

/* --- the sections --------------------------------------------------------- */
.eb-co-steps { min-width: 0; }
.eb-co-panel { margin-bottom: 18px; }
.eb-co-card {
	border: 1px solid var(--eb-border, #e3e8ef);
	border-radius: 16px;
	padding: 18px 20px;
	background: var(--eb-surface, #fff);
}
.eb-co-steps[data-steps] .eb-co-panel:last-child { margin-bottom: 0; }
.eb-co-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.eb-co-lab { display: block; font-size: 13px; margin-bottom: 4px; }
.eb-co-req { color: #d92d20; }
.eb-checkout-h2 { font-size: 1.05rem; margin: 0 0 12px; }

/* Template 3 is ONE list: no cards, no headings, no gaps between the sections. */
.eb-co-steps[data-eb-steps="list"] .eb-co-panel { margin-bottom: 0; }

.eb-co-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 6px 0 12px; }
.eb-co-biz { margin: 6px 0 4px; }
.eb-co-biztitle { font-size: 12px; opacity: .7; margin: 14px 0 4px; }
.eb-co-foot { display: flex; justify-content: space-between; font-size: 11px; opacity: .55; margin: 14px 0 0; }

/* The Billing › Shipping › Payment header — template 1 only. */
.eb-co-stepbar {
	display: flex; gap: 8px; align-items: center;
	list-style: none; margin: 0 0 18px; padding: 12px 14px;
	border: 1px solid var(--eb-border, #e3e8ef); border-radius: 14px;
	background: var(--eb-surface, #fff);
}
.eb-co-stepchip { display: flex; align-items: center; gap: 8px; flex: 1 1 0; font-size: 13px; opacity: .5; }
.eb-co-stepchip + .eb-co-stepchip::before { content: "›"; opacity: .5; margin-right: 4px; }
.eb-co-stepchip.is-current, .eb-co-stepchip.is-done { opacity: 1; }
.eb-co-chipnum {
	display: inline-flex; align-items: center; justify-content: center;
	width: 24px; height: 24px; border-radius: 50%; font-size: 12px;
	background: var(--eb-border, #e3e8ef); color: inherit;
}
.eb-co-stepchip.is-current .eb-co-chipnum { background: var(--eb-accent, var(--eb-primary)); color: #fff; }

/* Template 4 runs the product details across the top: image beside the words. */
.eb-co-horizontal .eb-co-summary { display: grid; grid-template-columns: 180px 1fr; gap: 0 20px; align-items: start; }
.eb-co-horizontal .eb-co-img { grid-row: 1 / span 8; margin: 0; }
.eb-co-horizontal .eb-co-sumtop { grid-column: 2; }

/* Template 5 splits its three sections side by side under the summary. */
.eb-co-split .eb-co-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: start; }
.eb-co-split .eb-co-stepbar, .eb-co-split .eb-co-foot { grid-column: 1 / -1; }

@media (max-width: 640px) {
	.eb-co-cols, .eb-co-stack { grid-template-columns: 1fr; gap: 18px; }
	.eb-co-horizontal .eb-co-summary { grid-template-columns: 1fr; }
	/* Without this the `grid-column: 2` above opens an implicit second column and template 4
	   stays two-up on a phone — the one screen it is named Best for mobile for. */
	.eb-co-horizontal .eb-co-sumtop { grid-column: 1; }
	.eb-co-horizontal .eb-co-img { grid-row: auto; margin: 0 0 14px; }
	.eb-co-split .eb-co-steps { grid-template-columns: 1fr; }
	.eb-co-pair { grid-template-columns: 1fr; }
	.eb-co-stepbar { padding: 10px; }
	.eb-co-chipname { display: none; }
	.eb-checkout-page { padding: 0 14px; margin: 24px auto; }
}
