/* Checkout calculator (sridu/checkout-calc, inc/checkout-calc.php, assets/js/checkout-calc.js)
   and the print sheet of the checkout chart guide. Loaded only where the block is used. */

.cc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "form board" "route board" "more more"; gap: 20px 32px; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--r-l); background: radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--surface) 70%); }
.cc-form { grid-area: form; display: grid; gap: 16px; margin: 0; }
.cc-route { grid-area: route; min-width: 0; }
.cc-board { grid-area: board; margin: 0; align-self: center; }
.cc-more { grid-area: more; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px 32px; border-top: 1px solid var(--line); padding-top: 20px; }
.cc-more[hidden] { display: none; }

/* ---- the form */
.cc .cc-label { display: block; margin: 0 0 8px; padding: 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cc fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cc-num { display: flex; align-items: stretch; gap: 8px; }
.cc-num input { flex: 1; min-width: 0; height: 64px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--bg); color: var(--text); font: 700 44px/1 var(--font-num); text-align: center; -moz-appearance: textfield; appearance: textfield; }
.cc-num input::-webkit-outer-spin-button, .cc-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cc-num input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.cc-step { flex: none; width: 56px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface-2); color: var(--text); font: 600 26px/1 var(--font); cursor: pointer; touch-action: manipulation; }
.cc-step:hover { border-color: var(--text); }
.cc-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cc-picks button { min-width: 44px; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text-2, var(--text)); font: 700 15px/1 var(--font-num); letter-spacing: 0.02em; cursor: pointer; touch-action: manipulation; }
.cc-picks button:hover { border-color: var(--accent); color: var(--accent); }
.cc-seg-row { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.cc-seg-row input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cc-seg-row label { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 10px; border-radius: 999px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; text-align: center; line-height: 1.15; cursor: pointer; transition: background 0.2s, color 0.2s; touch-action: manipulation; }
.cc-seg-row label:hover { color: var(--text); }
.cc-seg-row input:checked + label { background: var(--accent); color: var(--accent-ink); }
.cc-seg-row input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-favs select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--bg); color: var(--text); font: 600 var(--fs-body) var(--font); }
.cc-favs select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- the route */
.cc-route-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cc-route-head .eyebrow { text-align: right; }
.cc-left { display: inline-flex; align-items: baseline; gap: 8px; }
.cc-left small { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.cc-left b { font: 700 40px/1 var(--font-num); color: var(--text); }
.cc[data-kind="bogey"] .cc-route-head .eyebrow, .cc[data-kind="one"] .cc-route-head .eyebrow { color: var(--warn); }
.cc-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.cc-tiles li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 12px; border-radius: 12px; background: rgba(61, 220, 132, 0.1); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--muted); }
.cc-tiles li.is-end { background: var(--accent); box-shadow: none; }
.cc-tiles li.is-end b, .cc-tiles li.is-end small, .cc-tiles li.is-end span { color: var(--accent-ink); }
.cc-tiles li.is-setup { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.cc-tiles li.is-setup b { color: var(--cream); }
.cc-tiles li.is-none { background: rgba(240, 182, 74, 0.1); box-shadow: inset 0 0 0 1.5px var(--warn); }
.cc-tiles li.is-none b { color: var(--warn); }
.cc-tiles small { font-size: 11px; }
.cc-tiles b { font: 700 34px/1 var(--font-num); color: var(--accent); letter-spacing: 0.02em; }
.cc-tiles span { font-size: 12px; font-variant-numeric: tabular-nums; }
.cc.is-swap .cc-tiles li { animation: ccIn 0.4s var(--out) backwards; }
.cc.is-swap .cc-tiles li:nth-child(2) { animation-delay: 0.05s; }
.cc.is-swap .cc-tiles li:nth-child(3) { animation-delay: 0.1s; }
@keyframes ccIn { from { opacity: 0; transform: translateY(6px); } }
.is-guide .section .cc p.cc-note, .cc-note { margin: 14px 0 0; font-size: var(--fs-body); line-height: 1.6; color: var(--text-2, var(--text)); }
.cc-note b { color: var(--text); font-family: var(--font-num); font-size: 1.08em; letter-spacing: 0.02em; }
.cc-share { display: none; align-items: center; gap: 8px; margin-top: 14px; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text); font: 600 var(--fs-sm) var(--font); cursor: pointer; }
.cc.is-ready .cc-share { display: inline-flex; }
.cc-share:hover { border-color: var(--accent); }
.cc-share .ico { width: 16px; height: 16px; }

/* ---- the board: greys, the route in the accent, the next double in cream, numbered darts */
.cc-board svg { display: block; width: 100%; max-width: 440px; margin: 0 auto; height: auto; }
.cc-rim { fill: #0b0c0e; }
.cc-board [data-f] { transition: fill 0.25s; }
.cc-board .is-dark { fill: #1d2024; }
.cc-board .is-light { fill: #2b2f35; }
.cc-board .is-ring.is-dark { fill: #3a3f46; }
.cc-board .is-ring.is-light { fill: #474d55; }
.cc-board [data-f].is-on { fill: var(--accent); }
.cc-board [data-f].is-next { fill: var(--cream); }
.cc-wires { fill: none; stroke: #8d939c; stroke-opacity: 0.45; stroke-width: 0.9; pointer-events: none; }
.cc-nums text { font-family: var(--font-num); font-weight: 700; font-size: 22px; text-anchor: middle; dominant-baseline: central; fill: var(--text); transition: fill 0.25s; }
.cc-nums text.is-col { fill: var(--accent); font-weight: 800; font-size: 25px; }
.cc-pin circle { fill: var(--text); stroke: #0b0c0e; stroke-width: 3; }
.cc-pin text { font: 800 14px/1 var(--font-num); fill: #0b0c0e; text-anchor: middle; dominant-baseline: central; }


/* ---- other ways, if you miss */
.is-guide .section .cc h3.cc-h, .cc-h { margin: 0 0 12px !important; font-size: var(--fs-xs) !important; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.cc-alts, .cc-misses { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.is-guide .section .cc li { margin: 0; font-size: var(--fs-sm); line-height: 1.5; }
.cc-alts li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.cc-alts li.is-fav { border-color: var(--accent); }
.cc-alts li.is-only { color: var(--muted); }
.cc-way b { font: 700 20px/1 var(--font-num); color: var(--cream); letter-spacing: 0.02em; margin-right: 8px; }
.cc-way b:last-child { color: var(--accent); margin-right: 0; }
.cc-alts small { font-size: var(--fs-xs); color: var(--muted); text-align: right; }
.cc-alts li.is-fav small { color: var(--accent); }
.cc-misses li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.is-guide .section .cc .cc-misses p, .cc-misses p { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--text-2, var(--text)); }
.cc-misses p b { font-family: var(--font-num); font-size: 1.1em; color: var(--text); letter-spacing: 0.02em; }
.cc-miss-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: #0b0c0e; font: 800 14px/1 var(--font-num); }
.cc-misses li.is-bust { border-color: rgba(240, 182, 74, 0.5); }

.cc-jump { color: inherit !important; text-decoration: underline dotted var(--faint) !important; text-underline-offset: 4px; }
.cc-jump:hover { color: var(--accent) !important; }

/* ---- the PDF buttons in the hero and the chart */
.cc-pdf .wp-block-button__link::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M5 21h14'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M5 21h14'/%3E%3C/svg%3E") center / contain no-repeat; }

@media (max-width: 860px) {
	.cc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "form" "route" "board" "more"; }
	.cc-more { grid-template-columns: minmax(0, 1fr); }
	.cc-board svg { max-width: 360px; }
}
@media (max-width: 420px) {
	.cc { padding: 14px; gap: 16px; }
	.cc-seg-row label { padding: 0 6px; font-size: 13px; }
	.cc-tiles b { font-size: 28px; }
	.cc-left b { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
	.cc.is-swap .cc-tiles li { animation: none; }
	.cc-board [data-f], .cc-nums text { transition: none; }
}

/* ---------- print: the guide on A4, the chart first ---------- */
@media print {
	@page { size: A4; margin: 0; }
	html:root { --text: #111; --text-2: #222; --muted: #555; --faint: #888; --line: #ccc; --accent: #0a7a3e; --bg: #fff; --surface: #fff; --surface-2: #fff; --cream: #111; color-scheme: light; }
	html, body, .wp-site-blocks, .site-main { background: #fff !important; color: #111 !important; }
	.wp-site-blocks { padding: 12mm 12mm 10mm !important; }
	.is-guide .page-hero .lead, .is-guide .section .section-head p:not(.eyebrow) { color: #222 !important; }
	.site-header-part, .site-footer-part, .g-side, .g-progress, .cc, #calculator, #rechner, .toc, .cta, .wp-block-buttons, .g-board, .g-fig, .g-boards:not(.g-wide):has(.g-board), #faq + section, .sridu-guides, .callout.is-tip { display: none !important; }
	.is-guide .site-main .section { padding: 6mm 0 !important; break-inside: auto; }
	.is-guide .site-main .section.is-layout-constrained > :not(.alignfull), .is-guide .site-main .section.is-layout-constrained > .g-wide { max-width: none !important; }
	.is-guide .page-hero h1 { font-size: 24pt; color: #111; }
	.is-guide .section h2 { font-size: 16pt; color: #111; break-after: avoid; }
	.is-guide .section h3 { font-size: 12pt; margin-top: 4mm !important; break-after: avoid; }
	.is-guide .section :is(p, li):not(.eyebrow) { font-size: 10pt; line-height: 1.45; color: #222; }
	.eyebrow { color: #555 !important; }
	a { color: #111 !important; text-decoration: none !important; }
	.g-keys, .g-stats li, .g-cards li, .g-steps li, .g-vs-item, .callout, .faq details { background: #fff !important; border-color: #ccc !important; color: #111 !important; box-shadow: none !important; }
	/* the chart: three tables side by side, small and tight */
	#chart .g-boards { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 4mm !important; }
	#chart .ref { break-inside: avoid; }
	#chart .ref h3 { margin: 0 0 1mm !important; font-size: 10pt; }
	.is-guide .section .wp-block-table { border: 1px solid #ccc; background: #fff !important; overflow: visible; }
	.is-guide .section .wp-block-table table { font-size: 9pt; }
	h1, h2, h3, h4, summary { color: #111 !important; }
	body.is-guide .section .wp-block-table :is(td, th) { height: auto !important; line-height: 1.25 !important; font-size: 9pt !important; padding: 0.7mm 2mm !important; color: #111 !important; border-color: #ddd !important; background: #fff !important; }
	.wp-block-table mark { background: #fde7c2 !important; color: #111 !important; }
	.faq details { break-inside: avoid; }
	.faq details > :not(summary) { display: block !important; }
	* { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}
