/**
 * "Compare your options" table — the owner-supplied comparison re-skinned to
 * the AMC design system (gold / deep green / teal on cream, Parkinsans
 * display, pill buttons). Class names kept from the source block; only the
 * skin lives here. Scoped to .abmc-compare.
 */
.abmc-compare {
	--own-wash: #FBF5E2;
	--own-line: rgba(231, 174, 18, 0.4);

	box-sizing: border-box;
	max-width: 1120px;
	margin-inline: auto;
	color: var(--text);
	-webkit-font-smoothing: antialiased;
}
.abmc-compare *,
.abmc-compare *::before,
.abmc-compare *::after { box-sizing: border-box; }

.abmc-sr {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- Header — matches the site's section heads ---------- */
.abmc-compare__head { max-width: 46rem; margin: 0 0 clamp(1.75rem, 4vw, 2.75rem); }


.abmc-compare__title {
	margin: 0 0 0.85rem;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--h-2);
	line-height: 1.12; letter-spacing: -0.02em;
	color: var(--green);
	text-wrap: balance;
}
.abmc-compare__lede {
	margin: 0; font-size: clamp(1rem, 1.4vw, 1.08rem);
	line-height: 1.6; color: var(--text); max-width: 56ch;
}

/* ---------- Mobile switcher ---------- */
.abmc-compare__switch { display: none; margin-bottom: 1.25rem; }
.abmc-compare__switch-label {
	display: block; margin-bottom: 0.5rem;
	font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
	text-transform: uppercase; color: var(--teal);
}
.abmc-compare__switch-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.abmc-sw {
	flex: 1 1 auto; padding: 0.75rem 0.7rem;
	font: inherit; font-size: 0.82rem; font-weight: 600; line-height: 1.2;
	color: var(--green); background: var(--surface);
	border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s var(--ease);
}
.abmc-sw:hover { border-color: var(--gold); transform: translateY(-1px); }
.abmc-sw.is-active { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.abmc-compare :focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

/* ---------- Table shell ---------- */
.abmc-compare__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.abmc-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.abmc-table .abmc-th--criteria { width: 34%; }
.abmc-table .abmc-th { width: 16.5%; }

/* Sticky column headers keep orientation on the long scroll; compare.js sets
   --abmc-sticky-top to the sticky site-header's height so they stack cleanly. */
.abmc-table thead th {
	position: sticky; top: var(--abmc-sticky-top, 0px); z-index: 2;
	background: var(--wp--preset--color--background, #F4F1EB);
}

/* ---------- Head cells ---------- */
.abmc-th {
	vertical-align: bottom; padding: 0.75rem 0.75rem 1.05rem;
	text-align: center;
	border-bottom: 1px solid var(--border);
}
.abmc-th--criteria { border-bottom-color: transparent; }
.abmc-th__eyebrow {
	display: block; margin-bottom: 0.4rem;
	font-size: 0.625rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase;
	color: var(--teal);
}
.abmc-th__name {
	display: block; font-weight: 600;
	font-size: clamp(0.9rem, 1.25vw, 1.05rem); line-height: 1.25;
	color: var(--green-deep);
}

/* ---------- Signature: the Alberta Maple Care column as a raised gold card ----------
   The bold gold top line is a ::before "cap" that carries its own 3px border
   around the rounded corners, ending exactly where the curves straighten.
   A plain thicker border-top could not do this: mixing a 3px top border with
   1px sides makes the browser taper the widths around the 16px corner curves,
   which read as little gold horns at both corners. */
.abmc-th--own {
	background: var(--own-wash);
	border-top: 1px solid var(--own-line);
	border-left: 1px solid var(--own-line);
	border-right: 1px solid var(--own-line);
	border-bottom-color: var(--own-line);
	border-radius: 16px 16px 0 0;
	padding-top: 1.35rem;
}
.abmc-th--own::before {
	content: ""; position: absolute; top: -1px; left: -1px; right: -1px;
	height: 17px; /* exactly the corner-curve zone (16px radius + 1px border) */
	border: 3px solid var(--gold);
	border-bottom: 0;
	border-radius: 17px 17px 0 0;
	pointer-events: none;
}
.abmc-th--own .abmc-th__name {
	color: var(--green); font-weight: 700; font-size: clamp(1rem, 1.45vw, 1.2rem);
}
.abmc-cell--own {
	background: var(--own-wash);
	border-left: 1px solid var(--own-line);
	border-right: 1px solid var(--own-line);
}
.abmc-table tbody tr:last-child .abmc-cell--own {
	border-bottom: 1px solid var(--own-line);
	border-radius: 0 0 16px 16px;
}

/* ---------- Group header rows ---------- */
.abmc-grouplabel {
	text-align: left;
	padding: 2rem 1.5rem 0.65rem 0;
	font-size: 0.68rem; font-weight: 800; letter-spacing: 0.13em;
	text-transform: uppercase; color: var(--teal);
	border-bottom: none;
}
.abmc-group:first-child .abmc-grouplabel { padding-top: 1.35rem; }
.abmc-spacer { padding: 0; border-bottom: none; }

/* ---------- Body cells ---------- */
.abmc-rowlabel {
	text-align: left; font-weight: 500;
	font-size: 0.92rem; line-height: 1.5; color: var(--green-deep);
	padding: 1.05rem 1.5rem 1.05rem 0;
	border-bottom: 1px solid var(--border);
}
.abmc-cell {
	text-align: center; padding: 1.05rem 0.75rem;
	border-bottom: 1px solid var(--border);
}
.abmc-cell--own { border-bottom-color: var(--own-line); }
.abmc-table tbody tr:last-child .abmc-rowlabel,
.abmc-table tbody tr:last-child .abmc-cell { border-bottom-color: transparent; }

/* Row hover keeps eyes on the line across five columns. */
@media (hover: hover) {
	.abmc-table tbody tr:not(.abmc-group):hover .abmc-rowlabel,
	.abmc-table tbody tr:not(.abmc-group):hover .abmc-cell { background: rgba(245, 194, 51, 0.07); }
	.abmc-table tbody tr:not(.abmc-group):hover .abmc-cell--own { background: #F8EFD2; }
}

/* Footnote markers */
.abmc-fn {
	color: var(--teal); text-decoration: none; font-weight: 700;
	font-size: 0.8em; vertical-align: super; margin-left: 0.15em;
}
.abmc-fn:hover { text-decoration: underline; }

/* ---------- Three-state marks ----------
   SVG-masked glyphs (crisp at any size) on tinted discs, so the three states
   read apart at a glance: green check = included, slate tilde in a dashed
   ring = varies, red cross = not typically included. The old version drew
   the glyphs from borders — a slash for "no", a bare dash for "varies" —
   and all three washed out to similar pale circles. */
.abmc-mark {
	display: inline-block; position: relative;
	width: 1.6rem; height: 1.6rem; border-radius: 50%; vertical-align: middle;
}
.abmc-mark--sm { width: 1.1rem; height: 1.1rem; }
.abmc-mark::after {
	content: ""; position: absolute; inset: 0;
	-webkit-mask-position: center; mask-position: center;
	-webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

.abmc-mark--yes { background: rgba(24, 103, 92, 0.13); }
.abmc-mark--yes::after {
	background: var(--teal);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	-webkit-mask-size: 62%; mask-size: 62%;
}
/* Our column: gold badge with a deep-green check — same language as the
   CDHCI checker's ticked state. */
.abmc-cell--own .abmc-mark--yes,
.abmc-legend .abmc-mark--yes {
	background: var(--gold);
	box-shadow: 0 2px 8px -2px rgba(231, 174, 18, 0.7);
}
.abmc-cell--own .abmc-mark--yes::after,
.abmc-legend .abmc-mark--yes::after { background: var(--green); }

.abmc-mark--varies { border: 1.5px dashed rgba(95, 100, 99, 0.6); }
.abmc-mark--varies::after {
	background: var(--text);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 13.2c2.8-4.4 5.9-4.4 8.5 0s5.7 4.4 8.5 0' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 13.2c2.8-4.4 5.9-4.4 8.5 0s5.7 4.4 8.5 0' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
	-webkit-mask-size: 64%; mask-size: 64%;
}

.abmc-mark--no { background: rgba(216, 68, 52, 0.1); }
.abmc-mark--no::after {
	background: rgba(216, 68, 52, 0.85);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7 7 17' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7 7 17' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E");
	-webkit-mask-size: 52%; mask-size: 52%;
}

.abmc-cost {
	font-weight: 700;
	font-size: 0.95rem; letter-spacing: 0.02em; color: var(--text);
}
.abmc-cell--own .abmc-cost { color: var(--green); }

/* ---------- Legend (sits above the table: the key comes before the icons)
   + notes ---------- */
.abmc-legend {
	display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem;
	margin-bottom: 1.1rem;
}
.abmc-legend__item {
	display: inline-flex; align-items: center; gap: 0.5rem;
	font-size: 0.82rem; color: var(--text);
}
.abmc-notes { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); max-width: 54rem; }
.abmc-note {
	margin: 0 0 0.7rem; padding-left: 1.15rem; position: relative;
	font-size: 0.8rem; line-height: 1.55; color: var(--text);
}
.abmc-note__mark {
	position: absolute; left: 0; top: 0; color: var(--teal); font-weight: 700;
}

/* ---------- CTA — brand pills ---------- */
.abmc-cta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.1rem; align-items: center; margin-top: 2rem; }
.abmc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
	padding: 0.85em 1.7em;
	font-size: 1rem; font-weight: 700; text-decoration: none;
	color: var(--green); background: var(--gold);
	border: 2px solid transparent; border-radius: 999px;
	box-shadow: 0 12px 28px -12px rgba(231, 174, 18, 0.8);
	position: relative; overflow: hidden; isolation: isolate;
	transition: color 0.3s ease, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.abmc-btn::after { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; background: var(--green); transform: translateX(-101%); transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.abmc-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(17, 78, 70, 0.5); }
.abmc-btn:hover::after { transform: translateX(0); }

/* ---------- Responsive: single-competitor view + switcher ---------- */
@media (max-width: 900px) {
	.abmc-compare__switch { display: block; }
	.abmc-table .abmc-th--criteria { width: 46%; }
	.abmc-table .abmc-th { width: 27%; }

	.abmc-compare[data-compare="franchise"] .abmc-col--private,
	.abmc-compare[data-compare="franchise"] .abmc-col--facility,
	.abmc-compare[data-compare="private"] .abmc-col--franchise,
	.abmc-compare[data-compare="private"] .abmc-col--facility,
	.abmc-compare[data-compare="facility"] .abmc-col--franchise,
	.abmc-compare[data-compare="facility"] .abmc-col--private { display: none; }

	.abmc-rowlabel { font-size: 0.85rem; padding-right: 1rem; }
	.abmc-grouplabel { padding-top: 1.6rem; padding-right: 1rem; }
	.abmc-cell, .abmc-th { padding-left: 0.4rem; padding-right: 0.4rem; }
	.abmc-cta .abmc-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.abmc-compare * { transition: none !important; animation: none !important; }
}
