/* Product page — edition switcher + member box (1.0.320, Test Prep interactive-platform.md §8, pilot #162–165).
   Loaded only on products with 2+ editions (inc/product-editions.php). Generic: no product-line names here.
   Accent = --hft-acc on .hft-pdp (subject colour, set by the product line), default brand blue. */
.hft-pdp { --ed-acc: var(--hft-acc, #0758A1); --ed-navy: #1B437D; --ed-line: #E9E0D4; --ed-yellow: #FBB915; --ed-cta: #D6337B; --ed-cta-h: #B62A67; --ed-slate: #5A6B7D; --ed-green: #1F8551; --ed-display: 'Fredoka', system-ui, sans-serif; --ed-font: 'Nunito Sans', system-ui, sans-serif; }
.hft-pdp { --ed-tint: color-mix(in srgb, var(--ed-acc) 10%, #fff); }

/* WooCommerce's own variation select stays in the form (hidden): our radio cards drive it. */
.hft-pdp.has-editions .hft-pdp-buybox table.variations { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* 1.0.370: scoped to .has-editions — this file now loads on every product page, and a variable product without edition cards needs its own selects */
.hft-pdp.has-editions .hft-pdp-buybox .reset_variations, .hft-pdp.has-editions .hft-pdp-buybox .woocommerce-variation-price, .hft-pdp.has-editions .hft-pdp-buybox .woocommerce-variation-availability { display: none !important; }
.hft-tp-from { font-size: .62em; font-weight: 700; color: var(--ed-slate); vertical-align: .18em; }

/* ---------- switcher ---------- */
.hft-ed { display: grid; gap: 8px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.hft-ed legend { font: 800 13px/1 var(--ed-font); letter-spacing: .08em; text-transform: uppercase; color: var(--ed-acc); margin: 0 0 10px; padding: 0; }
.hft-ed-opt {
	display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; width: 100%; box-sizing: border-box;
	background: #fff; border: 2px solid var(--ed-line); border-radius: 16px; padding: 11px 14px; cursor: pointer;
	text-align: left; font: inherit; color: inherit; position: relative; margin: 0;
	transition: border-color .15s ease, background .15s ease;
}
.hft-ed-opt:hover { border-color: color-mix(in srgb, var(--ed-acc) 45%, var(--ed-line)); }
.hft-ed-opt input { position: absolute; opacity: 0; pointer-events: none; }
.hft-ed-opt .rad { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ed-line); flex: none; box-sizing: border-box; transition: border .15s ease; }
.hft-ed-opt:has(input:checked), .hft-ed-opt.is-on { border-color: var(--ed-acc); background: var(--ed-tint); }
.hft-ed-opt:has(input:checked) .rad, .hft-ed-opt.is-on .rad { border: 6px solid var(--ed-acc); }
.hft-ed-opt:has(input:focus-visible), .hft-ed-opt:focus-visible { outline: 3px solid color-mix(in srgb, var(--ed-acc) 40%, transparent); outline-offset: 2px; }
.hft-ed-opt .t b { display: block; font: 800 16px/1.25 var(--ed-font); color: var(--ed-navy); }
.hft-ed-opt .t small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--ed-slate); }
.hft-ed-opt .tag { display: inline-block; background: var(--ed-yellow); color: var(--ed-navy); font: 800 11px/1 var(--ed-font); padding: 4px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.hft-ed-opt .pr { font: 600 18px/1 var(--ed-display); color: var(--ed-navy); text-align: right; white-space: nowrap; }
.hft-ed-opt .pr s { display: block; font: 700 12.5px/1 var(--ed-font); color: var(--ed-slate); text-decoration-color: var(--ed-cta); margin-bottom: 4px; }
.hft-ed-opt .pr--inc { font: 800 14px/1 var(--ed-font); color: var(--ed-green); }
.hft-ed-opt.is-soon { opacity: .85; }
.hft-ed-opt.is-soon .pr { display: none; }

/* ---------- buttons ---------- */
.hft-pdp.has-editions .hft-pdp-summary .single_add_to_cart_button,
.hft-ed-cta {
	display: flex !important; align-items: center; justify-content: center; width: 100% !important; min-height: 54px;
	background: var(--ed-cta) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
	border: 0 !important; border-radius: 999px !important; padding: 14px 18px !important;
	font: 800 17px/1.1 var(--ed-font) !important; text-decoration: none !important; cursor: pointer; margin: 0;
	box-shadow: none !important;
}
.hft-pdp.has-editions .hft-pdp-summary .single_add_to_cart_button:hover, .hft-ed-cta:hover { background: var(--ed-cta-h) !important; }
.hft-pdp.has-editions .hft-pdp-summary form.cart .quantity { display: none !important; }
.hft-pdp.has-editions .hft-pdp-summary .woocommerce-variation-add-to-cart { display: block; }
.hft-pdp.has-editions .hft-pdp-summary .woocommerce-variation-add-to-cart[hidden] { display: none !important; }
.hft-ed-cta--out { background: #FBB915 !important; color: #1B437D !important; -webkit-text-fill-color: #1B437D !important; } /* option B (Mark): Amazon-recognisable yellow in our own sail yellow */
.hft-ed-cta--out:hover { background: #F2AE0C !important; }
.hft-ed-cta--out::after { content: "↗"; margin-left: 8px; font-weight: 800; }
.hft-ed-cta--out.is-soon::after { content: none; }
.hft-ed-cta--out.is-soon b::after { content: " ↗"; } /* Mark #175: "Buy on Amazon ↗" + small "Coming soon" */
.hft-ed-cta.is-soon { opacity: 1; cursor: default; }
.hft-ed-act { margin-top: 2px; }
.hft-ed-act[hidden], .hft-ed-act [hidden] { display: none !important; }
.hft-ed-sec { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.hft-ed-sec[hidden] { display: none !important; } /* 1.0.440: Assign hidden for Paperback / School License */
.hft-ed-sec > * { flex: 1 1 140px; }
.hft-ed-btn, .hft-ed-sec .hft-cls-assign, .hft-ed-sec .hft-cls-copy {
	display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 999px;
	background: #fff; color: var(--ed-navy) !important; border: 2px solid var(--ed-navy); padding: 8px 14px;
	font: 800 14.5px/1.1 var(--ed-font); text-decoration: none !important; cursor: pointer;
}
.hft-ed-btn:hover, .hft-ed-sec .hft-cls-assign:hover, .hft-ed-sec .hft-cls-copy:hover { background: var(--ed-navy); color: #fff !important; }
.hft-ed-inc { margin: 10px 2px 0; font-size: 14px; font-weight: 800; color: var(--ed-navy); }
.hft-ed-inc--note { font-weight: 600; color: var(--ed-slate); }
.hft-ed-disc { margin: 8px 2px 0; font-size: 12px; color: var(--ed-slate); }
.hft-pdp.has-editions .hft-pdp-freehint { margin: 10px 2px 0; }

@media (max-width: 560px) {
	.hft-ed-opt { grid-template-columns: 20px 1fr auto; padding: 10px 12px; gap: 10px; }
	.hft-ed-opt .pr { font-size: 16px; }
}

/* 1.0.322 (review B11): keyboard focus ring on every action button */
.hft-ed-cta:focus-visible, .hft-ed-btn:focus-visible, .hft-cls-assign:focus-visible, .hft-cls-copy:focus-visible { outline: 3px solid #1B437D; outline-offset: 3px; }

/* 1.0.324 — simple products (Printable PDF + Paperback): WooCommerce's own buy area is wrapped; the Paperback card hides it. */
.hft-ed-cartwrap[hidden] { display: none !important; }
/* 1.0.324 — paperback-only product: one Amazon card, no cart. */
.hft-ed-amazon .hft-ed-opt { grid-template-columns: 1fr auto; cursor: default; margin: 0 0 12px; } /* 1.0.439: + Amazon price */
.hft-ed-amazon .hft-ed-act { margin-top: 0; }

/* ==========================================================================
   1.0.358 — Mark's live test of the Florida page
   ========================================================================== */
/* 1+3: the variations form is a plain block (product.css makes form.cart a flex ROW, which put Add to Cart to the right of
   the option list on wide screens), and WooCommerce's hidden <select> table is truly 1 px (it measured the full screen
   width, which made phones scroll sideways). */
.hft-pdp.has-editions .hft-pdp-summary form.variations_form,
.woocommerce div.product.hft-pdp.has-editions .hft-pdp-summary form.variations_form { display: block !important; }
.hft-pdp.has-editions .hft-pdp-buybox table.variations { width: 1px !important; max-width: 1px !important; height: 1px !important; left: 0; top: 0; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.hft-pdp.has-editions .hft-pdp-summary .single_variation_wrap { width: 100%; }
/* 4: Add to Cart (or Open) + a small outline "♡ Save" on one row */
.hft-pdp-buybox .hft-ed-buyrow { display: flex !important; align-items: stretch; gap: 10px; width: 100%; }
.hft-pdp-buybox .hft-ed-buyrow[hidden] { display: none !important; }
.hft-pdp-buybox .hft-ed-buyrow > .single_add_to_cart_button, .hft-pdp-buybox .hft-ed-buyrow > .hft-ed-cta { flex: 1 1 auto; width: auto !important; min-width: 0; }
.hft-pdp-summary .hft-pdp-buybox .hft-ed-buyrow button.hft-fav--single.hft-fav--pill {
	flex: none; display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
	width: auto !important; min-height: 54px; margin: 0 !important; padding: 0 16px !important; box-sizing: border-box;
	background: #fff !important; border: 2px solid var(--ed-navy) !important; border-radius: 999px !important;
	color: var(--ed-navy) !important; font: 800 15px/1 var(--ed-font) !important; cursor: pointer; box-shadow: none !important;
}
.hft-pdp-buybox .hft-fav--pill .hft-fav-ico { width: 20px !important; height: 20px !important; }
.hft-pdp-buybox .hft-fav--pill:hover { background: color-mix(in srgb, var(--ed-navy) 6%, #fff) !important; }
.hft-pdp-buybox .hft-fav--pill:focus-visible { outline: 3px solid #1B437D; outline-offset: 3px; }
.hft-pdp-buybox .hft-fav--pill .hft-fav-txt .s { display: none; }
.hft-pdp-buybox .hft-fav--pill.is-fav { border-color: var(--ed-cta) !important; color: var(--ed-cta) !important; }
.hft-pdp-buybox .hft-fav--pill.is-fav .hft-fav-txt .a { display: none; }
.hft-pdp-buybox .hft-fav--pill.is-fav .hft-fav-txt .s { display: inline; }
/* 7: member box = actions + Paperback card */
.hft-ed-member--acts .hft-ed-mrow { display: flex; gap: 10px; }
.hft-ed-member--acts .hft-ed-sec .hft-ed-secw { display: contents; }
.hft-ed-member--acts .hft-ed-sec .hft-ed-secw[hidden] { display: none !important; }
.hft-ed-member--acts [data-school][hidden] { display: none !important; }
.hft-ed-paper { margin-top: 16px; }
.hft-ed-paper .hft-ed-opt { grid-template-columns: 1fr auto; cursor: default; margin: 0 0 10px; } /* 1.0.439: + Amazon price */
.hft-ed-member--acts .hft-ed-inc--note a { color: var(--ed-navy); font-weight: 800; }

/* ==========================================================================
   1.0.370 (Mark) — the same buy box on EVERY product page (games, worksheets, videos…), not only workbooks
   ========================================================================== */
/* Visitors: Add to Cart (or a free product's Download) + "♡ Save" on one row — the plugin's own form is the row */
.hft-pdp-buybox form.cart.hft-ed-buyrow .quantity { display: none !important; }
.hft-pdp-buybox form.cart.hft-ed-buyrow, .hft-pdp-buybox .somdn-download-form.hft-ed-buyrow { flex-wrap: nowrap !important; align-items: stretch !important; margin-bottom: 4px; }
/* the Save pill is as tall as the button next to it (the favorites plugin sets min-height:0) */
.hft-pdp .hft-pdp-summary .hft-pdp-buybox .hft-ed-buyrow button.hft-fav--single.hft-fav--pill { min-height: var(--hft-pdp-btn-h, 52px) !important; height: auto !important; align-self: stretch !important; }
.hft-pdp-summary .hft-pdp-buybox .hft-ed-buyrow > .single_add_to_cart_button,
.hft-pdp-summary .hft-pdp-buybox .hft-ed-buyrow > .somdn-download-button { flex: 1 1 auto !important; width: auto !important; min-width: 0; }
/* Members: the plugin's Download form sits in a row slot */
.hft-pdp-acts .hft-ed-mrow { align-items: stretch; }
.hft-pdp-acts .hft-ed-mrow > .hft-ed-cta, .hft-pdp-acts .hft-ed-mrow > .hft-pdp-acts-dl { flex: 1 1 auto; width: auto !important; min-width: 0; }
.hft-pdp-acts .hft-pdp-acts-dl .somdn-download-wrap, .hft-pdp-acts .hft-pdp-acts-dl .somdn-download-form { margin: 0 !important; width: 100%; }
.woocommerce div.product .hft-pdp-summary .hft-pdp-acts .somdn-download-form { margin: 0 !important; }
.hft-pdp-acts .hft-pdp-acts-dl .somdn-download-button { width: 100% !important; flex: 1 1 100%; }
.hft-pdp-acts .hft-pdp-acts-dl .hft-fav-single--below { display: none; } /* until the script moves the heart into row 1 */
/* Download in row 2 = an outline button, like Assign (the plugin's button carries an id, so this needs the id too) */
.hft-pdp.product .hft-pdp-summary .hft-pdp-acts .hft-ed-sec #somdn-form-submit-button,
.hft-pdp.product .hft-pdp-summary .hft-pdp-acts .hft-ed-sec .somdn-download-button {
	background: #fff !important; color: var(--ed-navy) !important; -webkit-text-fill-color: var(--ed-navy) !important;
	border: 2px solid var(--ed-navy) !important; box-shadow: none !important; margin: 0 !important;
	font: 800 16px/1.1 var(--ed-font) !important; border-radius: 999px !important;
}
.hft-pdp.product .hft-pdp-summary .hft-pdp-acts .hft-ed-sec #somdn-form-submit-button:hover,
.hft-pdp.product .hft-pdp-summary .hft-pdp-acts .hft-ed-sec .somdn-download-button:hover {
	background: var(--ed-navy) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
}
.hft-pdp.product .hft-pdp-summary .hft-pdp-acts .hft-ed-sec #somdn-form-submit-button:active { transform: none !important; }
/* One font for every buy-box button (Assign was falling back to Arial on games) */
.hft-pdp .hft-pdp-summary .hft-cls-assign, .hft-pdp .hft-pdp-summary .hft-cls-copy { font-family: var(--ed-font) !important; font-weight: 800 !important; }
/* Visitors on songs / videos: white "▶ Watch Free" (the try-it-free style, like Play Free Now on games; Add to cart stays the pink one) */
.hft-pdp .hft-pdp-summary .hft-ed-try {
	display: flex; align-items: center; justify-content: center; gap: .5em; width: 100%; box-sizing: border-box;
	height: var(--hft-pdp-btn-h, 52px); margin: 0 0 14px; padding: 0 24px; border-radius: 999px;
	background: #fff; color: var(--ed-navy) !important; -webkit-text-fill-color: var(--ed-navy); border: 2px solid var(--ed-navy);
	font: 800 16px/1.1 var(--ed-font); text-decoration: none !important; cursor: pointer;
}
.hft-pdp .hft-pdp-summary .hft-ed-try svg { color: var(--ed-cta); fill: var(--ed-cta); }
.hft-pdp .hft-pdp-summary .hft-ed-try:hover { background: var(--ed-navy); color: #fff !important; -webkit-text-fill-color: #fff; }
.hft-pdp .hft-pdp-summary .hft-ed-try:hover svg { color: #fff; fill: #fff; }
.hft-pdp .hft-pdp-summary .hft-ed-try:focus-visible { outline: 3px solid #1B437D; outline-offset: 3px; }
/* 1.0.371: an empty Download slot (the plugin printed nothing) takes no room */
.hft-pdp-acts .hft-pdp-acts-dl:empty { display: none; }

/* 1.0.374 — Interactive Worksheets: while the free-claim offer shows (unclaimed visitor, inc/free-claim.php), the page stays
   exactly as before — just "Free Download" + Save. The edition cards appear once she has claimed, or when she arrives asking
   for an edition (#interactive / #bundle — inc/worksheet-editions.php removes the offer class). */
html:not(.hft-fc-claimed) #hft-buybox.hft-fc-offerbox .hft-ed,
#hft-buybox.hft-fc-offerbox--free .hft-ed{ display:none; }

/* 1.0.382 — OWNER BUY BOX (a buyer of the Interactive; inc/product-editions.php hft_pdp_owner_slot + hft-pdp-editions.js ownerBox).
   One pink main button (Open), the PDF button white/outline next to ♡ Save, 10 px between rows, nothing else in the box. */
#hft-buybox.hft-ix-owner > :not(.hft-ix-own):not(script):not(style) { display: none !important; } /* cards, cart, wallets, price, free-claim row + card, membership hint */
#hft-buybox.hft-ix-owner .hft-fc-offer-note { display: none !important; }
.hft-ix-own .hft-ix-own-row1 { display: flex; gap: 10px; align-items: stretch; }
.hft-ix-own .hft-ix-own-row1 > .hft-ed-cta { flex: 1 1 auto; width: auto !important; min-width: 0; }
.hft-ix-own .hft-ix-own-row2 { display: flex; gap: 12px; margin-top: 12px; align-items: stretch; }
.hft-ix-own .hft-ix-own-row2 > .hft-ed-btn { flex: 1 1 0; min-width: 0; min-height: 50px; font-size: 15px; box-sizing: border-box; width: auto; }
.hft-pdp-summary .hft-pdp-buybox .hft-ix-own .hft-ix-own-row1 > button.hft-fav--pill {
	flex: none; display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; width: auto !important;
	min-height: 54px; margin: 0 !important; padding: 0 16px !important; box-sizing: border-box; background: #fff !important;
	border: 2px solid var(--ed-navy) !important; border-radius: 999px !important; color: var(--ed-navy) !important;
	font: 800 15px/1 var(--ed-font) !important; cursor: pointer; box-shadow: none !important;
}
.hft-ix-own .hft-ix-own-line { margin-top: 10px; }

/* 1.0.383 — the non-member "Assign in Classroom" card (the Interactive gate look: pill, Fredoka heading, a Funzy) */
.hft-ixc-veil { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; background: rgba(27, 67, 125, .55); cursor: pointer; }
.hft-ixc-card { position: relative; box-sizing: border-box; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; cursor: auto;
	background: #FFFCF6; border-radius: 26px; border-top: 8px solid #D6337B; box-shadow: 0 18px 40px -18px rgba(27, 67, 125, .55), 0 0 0 6px #FBEAF2;
	padding: 24px 24px 18px; text-align: center; color: #1B437D; font-family: "Nunito Sans", system-ui, sans-serif; }
.hft-ixc-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; background: #F3EDE3; color: #1B437D; font-size: 22px; line-height: 36px; cursor: pointer; }
.hft-ixc-x:hover { background: #E9E0D4; }
.hft-ixc-fz { display: block; width: 92px; height: 104px; margin: 0 auto 6px; background-repeat: no-repeat; background-position: 0 0; background-size: 162px 132px; } /* pose-rest = left 795×900 of the 1400×1142 atlas */
.hft-ixc-pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid #F3C9DC; color: #D6337B; border-radius: 999px; padding: 6px 14px; font: 600 14px/1 "Fredoka", system-ui, sans-serif; }
.hft-ixc-card h2 { font: 700 clamp(24px, 5vw, 30px)/1.12 "Fredoka", system-ui, sans-serif; color: #1B437D; margin: 12px 0 12px; letter-spacing: -.01em; text-wrap: balance; }
.hft-ixc-card h2 em { font-style: normal; color: #D6337B; background: linear-gradient(transparent 62%, rgba(251, 185, 21, .4) 62%, rgba(251, 185, 21, .4) 92%, transparent 92%); }
.hft-ixc-pts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; text-align: left; }
.hft-ixc-pts li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; font-size: 15px; line-height: 1.35; color: #1B437D; }
.hft-ixc-pts i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #FBB915; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; color: #1B437D; }
.hft-ixc-cta { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: 56px; padding: 0 18px; border-radius: 999px;
	background: #D6337B; color: #fff !important; -webkit-text-fill-color: #fff; text-decoration: none !important; font: 700 19px/1.1 "Fredoka", system-ui, sans-serif; box-shadow: 0 4px 0 #A4235C; }
.hft-ixc-cta:hover { background: #B62A67; }
.hft-ixc-fine { font-size: 13px; color: #5A6B7D; margin: 10px 0 0; }
.hft-ixc-alt { margin: 14px 0 0; display: grid; gap: 4px; justify-items: center; }
.hft-ixc-alt small { font-size: 12.5px; color: #5A6B7D; }
.hft-ixc-copy { background: #fff; border: 2px solid #1B437D; color: #1B437D; border-radius: 999px; padding: 8px 16px; font: 800 14px/1 "Nunito Sans", system-ui, sans-serif; cursor: pointer; }
.hft-ixc-copy:hover { background: #1B437D; color: #fff; }
.hft-ixc-x:focus-visible, .hft-ixc-cta:focus-visible, .hft-ixc-copy:focus-visible { outline: 3px solid #FBB915; outline-offset: 3px; }
html.hft-ixc-open, html.hft-ixc-open body { overflow: hidden; }

/* 1.0.430 (Mark 2026-10-10): ♡ Save = exactly the main button's 52px (border-box, 2px navy outline included) on EVERY buy box.
   It used to stretch to the row, which is 56px because the pink button keeps 4px below it for its pressable edge. */
.hft-pdp .hft-pdp-summary button.hft-fav.hft-fav--single.hft-fav--pill:not(#hft-x) {
	box-sizing: border-box !important; height: var(--hft-pdp-btn-h, 52px) !important; min-height: var(--hft-pdp-btn-h, 52px) !important;
	max-height: var(--hft-pdp-btn-h, 52px) !important; align-self: flex-start !important;
}
