/* Compare v3: /vergelijk/ and the deal page (docs/design/compare-v3.md §2.7, §2.8, §6).
   Loaded only by page-vergelijk.php and om/offer.php, after main.css. */

/* ---------- shared: plus, benefits, mini "Wat heb je al?" ---------- */
.cmpv3 .plus-gb, .deal-h1 .plus-gb, .calc .plus-gb { display: inline-block; padding: .02em .38em; margin-left: .12em; border-radius: 6px; white-space: nowrap; background: var(--frog-wash); color: var(--frog-text); box-shadow: inset 0 0 0 1.5px var(--frog-2); font: inherit; font-weight: 800; }
.plus-from { display: flex; gap: .3em; align-items: center; margin: 0; font: 600 var(--t-xs)/1.3 var(--f-body); color: var(--frog-text); }
.plus-from .icon { width: 1em; height: 1em; flex: none; }
.price-was { display: block; font-size: var(--t-xs); color: var(--ink-3); }
.price-was s { text-decoration-thickness: 1.5px; }
.cmpv3 .price-disc, .calc .price-disc { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 2px; justify-items: start; }
.price-disc li { display: flex; gap: .3em; align-items: center; font: 700 var(--t-xs)/1.3 var(--f-body); color: var(--frog-text); }
.price-disc li span { font-weight: 500; }
.price-disc li.is-off, .price-disc li.is-more { color: var(--ink-3); }
.price-disc .icon { width: 1em; height: 1em; flex: none; }

.hmini { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin: 0 0 16px; padding: 12px 14px; background: var(--frog-wash); border: 1.5px solid #bfe5b3; border-radius: 14px; transition: opacity .2s; }
.hmini.is-loading { opacity: .55; }
.hmini-title { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .3em .6em; align-items: center; margin: 0; }
.hmini-title > .icon { color: var(--frog-text); }
.hmini-on { display: inline-flex; flex-wrap: wrap; gap: .3em; align-items: center; font-weight: 700; color: var(--frog-text); }
.hmini-on a { color: var(--ink); font-weight: 600; }
.hmini-help { font-size: var(--t-xs); color: var(--ink-2); }
.hmini-fields { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: end; }
.hmini-field { display: grid; gap: 4px; }
.hmini-field > span { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); }
.hmini-field select { min-height: 40px; min-width: 150px; }
.hmini-check { display: inline-flex; gap: .5em; align-items: center; min-height: 40px; font-weight: 600; cursor: pointer; }
.hmini-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--frog-text); }

/* Price over the term (§4.1, simple): two halves, year 1 and year 2; after a 1-year contract hatched. */
.cptl { margin: 0; width: 100%; max-width: 260px; }
.cptl-bar { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 36px; }
.cptl:not(.cptl--12) .cptl-bar::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid var(--line-c); }
.cptl-seg { flex: var(--m) 1 0; height: calc(6px + 26px * var(--h)); background: var(--frog-wash); box-shadow: inset 0 2px 0 var(--frog-2); border-radius: 4px 4px 0 0; }
.cptl-seg.is-up { background: var(--sun-wash); box-shadow: inset 0 2px 0 var(--sun-2); }
.cptl-seg.is-after { background: repeating-linear-gradient(135deg, var(--paper-2) 0 4px, transparent 4px 8px); box-shadow: inset 0 2px 0 var(--line-ctl); }
.cptl-bar.has-avg::after { content: ""; position: absolute; left: 0; width: calc(100% * var(--avg-span)); bottom: calc(6px + 26px * var(--avg)); border-top: 1.5px dashed var(--ink); }
.cptl-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin-top: 3px; font-size: var(--t-xs); color: var(--ink-3); line-height: 1.3; }
.cptl-cap b { color: var(--ink); }
.cptl-fixed { margin: 0; font-size: var(--t-xs); color: var(--ink-2); }
/* The shared bar (omt_ptl, main.css) in a table cell / the deal price block: full width of its box. */
.cmpv3 .ptl, .calc .ptl { width: 100%; max-width: 280px; justify-self: start; align-self: start; margin: 0; }
.calc .ptl { max-width: none; }

/* ---------- /vergelijk/ ---------- */
.cmp3-sum { margin: 0 0 18px; padding: 14px 18px; background: var(--sun-wash); border: 1.5px solid #f0dc8a; border-radius: var(--r-card); }
.cmp3-sum p { margin: 0; font-size: var(--t-base); line-height: 1.5; }
.cmp3-sum b { font-weight: 800; }

.cmp3-pager { display: inline-flex; align-items: center; gap: 6px; font: 600 var(--t-xs)/1 var(--f-body); }
.cmp3-pg { width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--line-c); border-radius: 10px; background: var(--card); cursor: pointer; color: var(--ink); }
.cmp3-pg:disabled { opacity: .35; cursor: default; }
.cmp3-pager[hidden] { display: none; }

.cmp3-body { position: relative; }
.cmpv3 .cmp-table-wrap { overflow: visible; border: 1.5px solid var(--line-c); border-radius: var(--r-card); background: var(--card); }
.cmpv3 .cmp3 { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.cmpv3 .cmp3 col.cmp3-col-lbl { width: 190px; }
.cmpv3 .cmp3 col.cmp3-col-add { width: 150px; }
.cmpv3 .cmp3 th, .cmpv3 .cmp3 td { padding: 12px 14px; border-bottom: 1px solid var(--paper-2); text-align: left; vertical-align: top; font-size: var(--t-sm); overflow-wrap: anywhere; }
.cmpv3 .cmp3 thead th { position: static; z-index: auto; vertical-align: top; background: var(--card); box-shadow: none; padding: 18px 14px 16px; border-bottom: 1.5px solid var(--line-c); }
.cmpv3 .cmp3 thead th:first-child { border-top-left-radius: var(--r-card); }
.cmpv3 .cmp3 thead th:last-child { border-top-right-radius: var(--r-card); }
.cmpv3 .cmp3 tbody th[scope=row] { width: auto; font-weight: 600; color: var(--ink-2); }
.cmpv3 .cmp3 tbody th[scope=row] small { display: block; margin-top: 2px; font-weight: 500; color: var(--ink-3); line-height: 1.3; }
.cmpv3 .cmp3 td small { display: block; color: var(--ink-3); font-weight: 500; line-height: 1.35; }
.cmpv3 .cmp3 td.is-best { background: var(--frog-wash); font-weight: inherit; }
.cmpv3 .cmp3 td.is-best::after { content: none; }
.cmpv3 .cmp3 tr.is-same td { color: var(--ink-3); }
.cmpv3 .cmp3 ul { margin: 0; padding: 0; }
.cmpv3.only-diff tr.is-same { display: none; }
.cmpv3.only-diff tbody.cmp-group:not(:has(tr:not(.is-same):not(.cmp-gh))) { display: none; }

.cmpv3 .cmp3 tr.cmp-gh th { padding: 9px 14px; background: var(--paper-2); border-bottom: 0; font: 700 var(--t-xs)/1.2 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.win { display: flex; width: fit-content; gap: .3em; align-items: center; margin-top: 6px; padding: .15em .55em .15em .4em; font: 700 var(--t-xs)/1.25 var(--f-body); color: var(--frog-text); background: var(--card); border: 1.5px solid var(--frog-2); border-radius: 999px; }
.win .icon { width: 1em; height: 1em; }

.cmp3-head { position: relative; display: grid; gap: 6px; justify-items: start; }
.cmp3-head .pbadge { padding-right: 34px; }
.cmp3-rm { position: absolute; top: -12px; right: -10px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-3); }
.cmp3-rm:hover { background: var(--paper-2); color: var(--ink); }
.cmp3-rm .icon { width: 18px; height: 18px; }
.cmp3-bundle { margin: 2px 0 0; font: 800 1.3rem/1.15 var(--f-display); }
.cmp3-price { margin: 0; font: 800 1.55rem/1 var(--f-display); }
.cmp3-price small, .cmp3-lead small { margin-left: .2em; font: 600 var(--t-xs)/1 var(--f-body); color: var(--ink-3); }
.cmp3-term { display: inline-flex; padding: .2em .6em; font: 600 var(--t-xs)/1.3 var(--f-body); background: var(--paper-2); color: var(--ink-2); border-radius: 999px; }
.cmp3-head .btn { white-space: normal; text-align: center; margin-top: 4px; }
.cmp3-deal { font-size: var(--t-xs); font-weight: 600; }
.cmp3-lead { display: block; font: 800 1.3rem/1.15 var(--f-display); }
.cmpv3 .cmp3 td .cmp3-lead small { display: inline; }
.cmp3-next b { color: var(--ink); }
.cmp3-strong { font-weight: 700; }
.cmpv3 .cmp3 td .plus-from { margin-top: 3px; }

.cmp3-perks { list-style: none; display: grid; gap: 6px; }
.cmp3-perks li { display: flex; gap: .4em; align-items: flex-start; line-height: 1.35; }
.cmp3-perks li .icon { width: 1.05em; height: 1.05em; flex: none; margin-top: .15em; }
.cmp3-perks li.is-on { color: var(--frog-text); }
.cmp3-perks li.is-on b { font-weight: 800; }
.cmp3-perks li.is-off { color: var(--ink-3); }
.cmp3-perks.is-maybe li { display: block; color: var(--ink-2); }
.cmp3-perks.is-maybe b { color: var(--ink); }

.cmpv3 .cmp3 .cmp3-add { background: repeating-linear-gradient(0deg, transparent 0 6px, transparent 6px 12px); border-left: 1.5px dashed var(--line-c); border-bottom: 0; }
.cmp3-add-in { display: grid; place-items: center; gap: 6px; min-height: 150px; padding: 12px; text-align: center; font-weight: 700; text-decoration: none; border: 1.5px dashed var(--line-ctl); border-radius: 12px; color: var(--ink-2); }
.cmp3-add-in:hover { background: var(--paper); color: var(--ink); }
.cmpv3 .cmp3 tfoot td, .cmpv3 .cmp3 tfoot th { border-bottom: 0; padding-block: 14px 16px; }

/* Compact sticky column head, shown once the real heads scroll away (JS toggles .is-on). */
.cmp3-stick { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h)); z-index: 6; height: 0; }
.cmp3-stick-in { overflow: hidden; background: color-mix(in srgb, var(--paper) 96%, transparent); backdrop-filter: blur(8px); border: 1.5px solid var(--line-c); border-radius: 0 0 12px 12px; box-shadow: 0 8px 20px rgb(19 41 31 / .08); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility 0s .15s; }
.cmp3-stick.is-on .cmp3-stick-in { opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s; }
.cmp3-stick-track { display: grid; grid-template-columns: 190px repeat(var(--cols), minmax(0, 1fr)); }
.cmp3-stick-track:has(.cmp3-stick-add) { grid-template-columns: 190px repeat(var(--cols), minmax(0, 1fr)) 150px; }
.cmp3-stick-col { display: flex; gap: 8px; align-items: center; min-width: 0; padding: 8px 14px; font-size: var(--t-xs); line-height: 1.3; }
.cmp3-stick-col .pbadge-dot { flex: none; }
.cmp3-stick-txt { min-width: 0; }
.cmp3-stick-txt b.num { font: 800 1.05rem/1.1 var(--f-display); }
.cmp3-stick-txt small { color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .cmp3-stick-in { transition: none; } }

/* Mobile: 2 columns with swipe, row label as a band over the full width. */
@media (max-width: 700px) {
	.hmini { padding: 10px 12px; gap: 6px 12px; }
	.hmini-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; gap: 8px 10px; }
	.hmini-field select { width: 100%; min-width: 0; }
	.hmini-check { grid-column: 1 / -1; }
	.cmpv3 { --vw: calc(100vw - 2 * var(--gutter) - 3px); --cw: calc(var(--vw) / 2); }
	.cmp3-sum { padding: 12px 14px; }
	/* 3+ columns always scroll here, so the script will show the pager: keep its room from the start (no layout shift). */
	.cmpv--dense .cmp3-pager[hidden] { display: inline-flex; visibility: hidden; }
	/* Line 1 is always "N abonnementen naast elkaar" + the pager; the count line gives way instead of the pager
	   wrapping, so a few pixels of font difference (fallback vs web font) can't move the table. */
	.cmpv--dense .cmpv-bar { column-gap: 8px; }
	.cmpv--dense .cmpv-bar > p { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.cmpv--dense .cmp3-pager { flex: none; }
	.cmp3-sum p { font-size: var(--t-sm); }
	.cmpv3 .cmp-table-wrap { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.cmpv3 .cmp-table-wrap::-webkit-scrollbar { display: none; }
	.cmpv3 .cmp3 { display: block; width: max-content; table-layout: auto; }
	.cmpv3 .cmp3 colgroup, .cmpv3 .cmp3 .cmp3-corner, .cmpv3 .cmp3 .cmp3-add { display: none; }
	.cmpv3 .cmp3 thead, .cmpv3 .cmp3 tbody, .cmpv3 .cmp3 tfoot { display: block; position: static; box-shadow: none; background: none; }
	.cmpv3 .cmp3 tr { display: grid; grid-template-columns: repeat(var(--cols), var(--cw)); border: 0; }
	.cmpv3.only-diff .cmp3 tr.is-same { display: none; }
	.cmpv3 .cmp3 td, .cmpv3 .cmp3 thead th { min-width: 0; padding: 6px 10px 12px; border-bottom: 0; scroll-snap-align: start; font-size: var(--t-xs); }
	.cmpv3 .cmp3 thead th { padding: 16px 10px 12px; border-bottom: 1.5px solid var(--line-c); border-radius: 0 !important; }
	.cmpv3 .cmp3 tbody th[scope=row], .cmpv3 .cmp3 tr.cmp-gh th { grid-column: 1 / -1; position: sticky; left: 0; width: var(--vw); scroll-snap-align: none; }
	.cmpv3 .cmp3 tbody th[scope=row] { padding: 10px 10px 0; border-top: 1px solid var(--paper-2); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .06em; }
	.cmpv3 .cmp3 tbody th[scope=row] small { text-transform: none; letter-spacing: 0; }
	.cmpv3 .cmp3 tr.cmp-gh th { padding: 8px 10px; }
	.cmpv3 .cmp3 tfoot td { padding: 12px 10px 14px; border-top: 1.5px solid var(--line-c); }
	.cmpv3 .cmp3 tfoot .btn, .cmp3-head .btn { width: 100%; min-height: 40px; padding: .4em .5em; font-size: var(--t-xs); }
	.cmp3-head .btn svg { display: none; }
	.cmp3-head { gap: 4px; }
	.cmp3-head .pbadge { gap: .45em; font-size: var(--t-xs); }
	.cmp3-head .pbadge-dot { width: 30px; height: 30px; border-radius: 8px; }
	.cmp3-rm { top: -14px; right: -8px; }
	.cmp3-bundle { font-size: 1.05rem; }
	.cmp3-price { font-size: 1.25rem; }
	.cmp3-lead { font-size: 1.1rem; }
	.cptl-bar { height: 28px; }
	.cptl-seg { height: calc(5px + 20px * var(--h)); }
	.cptl-bar.has-avg::after { bottom: calc(5px + 20px * var(--avg)); }
	.cmp3-stick-track, .cmp3-stick-track:has(.cmp3-stick-add) { grid-template-columns: repeat(var(--cols), var(--cw)); will-change: transform; }
	.cmp3-stick-lbl, .cmp3-stick-add { display: none; }
	.cmp3-stick-col { padding: 6px 10px; gap: 6px; }
	.cmp3-stick-col .pbadge-dot { width: 24px !important; height: 24px !important; }
	.cmpv-bar { gap: 8px 14px; }
}

/* ---------- deal page ---------- */
.deal-h1 .plus-gb { font-size: .92em; }
.deal-from { margin-top: 6px; font-size: var(--t-sm); }
.calc .price-was { font-size: var(--t-sm); margin-top: 2px; }
.calc .price-disc li { font-size: var(--t-sm); }
.promo-row.is-perk { background: var(--frog-wash); color: var(--frog-text); }
.promo-row.is-perk span { display: flex; flex-wrap: wrap; gap: 0 .4em; align-items: baseline; font-weight: 700; }
.promo-row.is-perk small { font-weight: 500; color: var(--frog-text); }
.promo-row.is-perk.is-off { background: var(--paper); color: var(--ink-2); }
.promo-row.is-avg small { display: block; font-size: var(--t-xs); color: var(--ink-3); }
.calc .hmini { margin: 0; }
/* With benefit rows and the mini form the price block gets taller than a screen: sticky would hide the CTA. */
.calc:has(.hmini), .calc:has(.is-perk) { position: static !important; }
/* The split had an inline two-column grid that also applied on phones (price block squeezed next to the specs). */
@media (max-width: 860px) {
	.deal-split { grid-template-columns: minmax(0, 1fr) !important; }
	.deal-split > .calc { position: static !important; }
}.calc .hmini-field select { min-width: 0; }

/* === vergelijker2 === "Nog een toevoegen" under the table (benchmark 2026-09 #10) */
.cmp3-more { margin-top: 18px; padding: 14px 16px; background: var(--card); border: var(--hair); border-radius: var(--r-card); }
.cmp3-more h2 { font-size: 1.15rem; }
.cmp3-more > p { margin-top: 2px; }
.cmp3-more-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.cmp3-more-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--paper-2); }
.cmp3-more-list .pbadge-dot { width: 36px; height: 36px; border-radius: 10px; }
.cmp3-more-what { font-weight: 700; }
.cmp3-more-what small { font-weight: 500; color: var(--ink-3); }
.cmp3-more-price { font: 800 1.1rem/1.1 var(--f-display); white-space: nowrap; }
.cmp3-more-price small { font: 600 var(--t-xs)/1 var(--f-body); color: var(--ink-3); }
.cmp3-more-list .btn { min-height: 44px; }
@media (max-width: 600px) {
	.cmp3-more-list li { grid-template-columns: auto minmax(0, 1fr) auto; }
	.cmp3-more-list .btn { grid-column: 1 / -1; }
}
/* === /vergelijker2 === */
