/* Scoreteller (inc/spellen-scoreteller.php + assets/js/scoreteller.js). Variabelen komen uit spellen.css. */
.sd-st { margin: 0 0 2rem; }
.sd-st-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; min-height: 1.6em; margin: 0 0 .8rem; padding: .75rem 1rem; border-radius: 12px; background: #fff; border: 1px solid var(--sp-line); color: var(--sp-ink); font-weight: 600; }
.sd-st-status small { color: var(--sp-muted); font-weight: 500; }
.sd-st.is-klaar .sd-st-status { background: var(--sp-night); border-color: var(--sp-night); color: #fff; }
.sd-st.is-klaar .sd-st-status strong { color: var(--sp-gold-light); }

.sd-st-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--sp-line); border-radius: 14px; background: #fff; box-shadow: var(--sp-shadow); }
.sd-st-tabel { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; font-variant-numeric: tabular-nums; }
.sd-st-tabel th, .sd-st-tabel td { padding: 0; border: 0; border-bottom: 1px solid var(--sp-line); text-align: center; vertical-align: middle; }
.sd-st-tabel tbody tr:nth-child(even) :is(td, th) { background: #FAFBFD; }
/* Eerste kolom en kopregel blijven staan bij scrollen. */
.sd-st-tabel tr > :first-child { position: sticky; left: 0; z-index: 1; background: #fff; padding: .5rem .8rem; text-align: left; font-weight: 700; color: var(--sp-ink); min-width: 3.2rem; max-width: 11rem; border-right: 1px solid var(--sp-line); }
.sd-st-tabel tbody tr > th { font-size: .95rem; line-height: 1.25; }
.sd-st-tabel tbody tr > th small { display: block; font-weight: 500; font-size: .78rem; color: var(--sp-muted); }
.sd-st-tabel thead th { background: var(--sp-night); color: #fff; border-bottom: 0; }
.sd-st-tabel thead tr > :first-child { background: var(--sp-night); color: var(--sp-gold-light); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.sd-st-naam { position: relative; display: flex; align-items: center; }
.sd-st-naam input { width: 100%; min-width: 5.5rem; padding: .7rem 1.3rem .7rem .5rem; border: 0; background: transparent; color: #fff; font: 700 1rem var(--sp-font); text-align: center; }
.sd-st-naam input:focus { outline: 2px solid var(--sp-gold-light); outline-offset: -4px; border-radius: 8px; }
.sd-st-weg { position: absolute; right: .15rem; top: 50%; transform: translateY(-50%); width: 1.4rem; height: 1.4rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, .55); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.sd-st-weg:hover, .sd-st-weg:focus-visible { background: rgba(255, 255, 255, .15); color: #fff; }
.sd-st-plus { width: 3rem; }
.sd-st-plus button { width: 2.2rem; height: 2.2rem; margin: 0 .4rem; padding: 0; border: 0; border-radius: 50%; background: var(--sp-gold); color: var(--sp-night); font: 800 1.3rem/1 var(--sp-font); cursor: pointer; }
.sd-st-tabel td input { width: 100%; min-width: 4.5rem; padding: .75rem .3rem; border: 0; background: transparent; color: var(--sp-ink); font: 600 1.15rem var(--sp-font); text-align: center; -moz-appearance: textfield; }
.sd-st-tabel td input:focus { outline: 0; background: rgba(46, 196, 182, .12); box-shadow: inset 0 0 0 2px var(--sp-teal); }
.sd-st-tabel td { position: relative; }
.sd-st-calc { position: absolute; right: .35rem; bottom: .15rem; font-size: .72rem; color: var(--sp-muted); pointer-events: none; }
.sd-st-tabel tfoot :is(th, td) { border-bottom: 0; border-top: 2px solid var(--sp-ink); background: #fff; font-weight: 800; font-size: 1.2rem; color: var(--sp-ink); padding: .7rem .3rem; }
.sd-st-tabel tfoot td.is-top { background: var(--sp-gold-light); color: var(--sp-night); }
.sd-st-tabel tfoot td.is-top::before { content: "★ "; color: #8E6418; }

.sd-st-knoppen { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 .4rem; }
.sd-st-knop { padding: .6rem 1rem; border: 0; border-radius: 9px; background: var(--sp-coral); color: #fff; font: 700 .95rem var(--sp-font); cursor: pointer; }
.sd-st-knop:hover { background: var(--sp-coral-dark); }
.sd-st-knop[data-actie="min"], .sd-st-knop[data-actie="delen"] { background: var(--sp-night); }
.sd-st-knop.is-zacht { background: #fff; color: var(--sp-ink); box-shadow: inset 0 0 0 1px var(--sp-line); }
.sd-st-inst { margin: .4rem 0 0; }
.sd-st-inst summary { cursor: pointer; font-weight: 700; color: var(--sp-ink); padding: .3rem 0; }
.sd-st-inst-body { display: grid; gap: .8rem; max-width: 30rem; padding: 1rem; border: 1px solid var(--sp-line); border-radius: 12px; background: #fff; }
.sd-st-inst fieldset { display: grid; gap: .4rem; margin: 0; padding: 0; border: 0; }
.sd-st-veld { display: grid; gap: .3rem; font-weight: 600; color: var(--sp-ink); }
.sd-st-veld[hidden] { display: none; }
.sd-st-veld input { max-width: 9rem; padding: .5rem .7rem; border: 1px solid var(--sp-line); border-radius: 8px; font: 600 1rem var(--sp-font); }
.sd-st-klein { margin: 0; font-size: .85rem; color: var(--sp-muted); }
.sd-st-link { justify-self: start; padding: 0; border: 0; background: none; color: var(--sp-coral-dark); font: 600 .9rem var(--sp-font); text-decoration: underline; cursor: pointer; }

.sd-st-product { display: flex; align-items: center; gap: 1rem; margin: 0 0 2rem; padding: 1rem; border: 1px solid var(--sp-line); border-radius: 14px; background: #fff; box-shadow: var(--sp-shadow); }
.sd-st-product-img img { display: block; width: 84px; height: 84px; object-fit: contain; border-radius: 8px; background: var(--sp-bg); }
.sd-st-product p { margin: 0; }
.sd-st-product-kop { font-weight: 800; color: var(--sp-ink); }
.sd-st-product-sub { font-size: .9rem; margin-top: .2rem !important; }
.sd-st-andere { margin: 0 0 2rem; }
.sd-st-andere h2 { font-size: 1.25rem; margin: 0 0 .7rem; }
.sd-st-andere p:first-of-type { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.sd-st-andere p:first-of-type a { padding: .45rem .85rem; border-radius: 999px; background: #fff; border: 1px solid var(--sp-line); color: var(--sp-ink); font-weight: 600; text-decoration: none; }
.sd-st-andere p:first-of-type a:hover { border-color: var(--sp-teal); }
.sd-st-print { margin: .8rem 0 0; color: var(--sp-muted); }

@media (max-width: 600px) {
	.sd-st-tabel tr > :first-child { padding: .45rem .55rem; min-width: 2.6rem; max-width: 7.5rem; }
	.sd-st-tabel td input { min-width: 3.6rem; font-size: 1.1rem; }
	.sd-st-naam input { min-width: 4.4rem; font-size: .95rem; }
}
@media print {
	.sd-st-knoppen, .sd-st-inst, .sd-st-plus, .sd-st-weg { display: none !important; }
}

/* Telefoon: de tabel moet meteen in beeld zijn, dus geen doosfoto en een compacte banner. */
@media (max-width: 700px) {
	.sd-spellen .sd-st-pagina .sd-archive-banner.sd-zk-banner { padding: 1.1rem 1.2rem !important; margin-bottom: 1rem; min-height: 0; }
	.sd-st-pagina .sd-zk-banner .sd-sp-art { display: none; }
	.sd-st-pagina .sd-zk-banner h1 { font-size: 1.7rem; }
	.sd-st-pagina .sd-zk-banner .wp-block-term-description { font-size: .95rem; line-height: 1.45; margin: 0; }
}

/* ---------- Telefoon (2026-12-03): tabel eerst, eigen cijfertoetsenbord ---------- */
.sd-st-uitleg { margin: .6rem 0 0; }
.sd-st-uitleg summary { cursor: pointer; font-weight: 700; color: var(--sp-ink); padding: .3rem 0; }
.sd-st-uitleg p { margin: .3rem 0 0; color: var(--sp-text); }
@media (min-width: 701px) { .sd-st-uitleg { display: none; } }
.sd-st-tabel td.is-sel { background: rgba(212, 162, 58, .16) !important; box-shadow: inset 0 0 0 3px var(--sp-gold); }
.sd-st-cel { display: block; width: 100%; min-width: 3.6rem; height: 3.1rem; margin: 0; padding: 0 .2rem; border: 0; border-radius: 0; background: transparent; color: var(--sp-ink); font: 600 1.25rem var(--sp-font); text-align: center; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-appearance: none; appearance: none; }
@media (max-width: 700px) { .sd-st-cel { min-width: 0; } }

@media (max-width: 700px) {
	.sd-st-pagina .sd-zk-banner .sd-zk-kicker, .sd-st-pagina .sd-zk-banner .wp-block-term-description { display: none; }
	.sd-spellen .sd-st-pagina .sd-archive-banner.sd-zk-banner { padding: .9rem 1.1rem !important; margin-bottom: .8rem; border-radius: 14px; }
	.sd-st-pagina .sd-zk-banner h1 { font-size: 1.5rem; margin: 0; }
	.sd-st-status { padding: .6rem .8rem; font-size: .95rem; margin-bottom: .6rem; }
	/* Tabel: past bij 2–4 spelers op het scherm; kop en totaal blijven staan bij scrollen. */
	.sd-st-wrap { max-height: calc(100svh - 150px); overflow: auto; overscroll-behavior: contain; }
	/* Toetsenbord open: de tabel houdt zijn hoogte, de pagina scrolt het gekozen vakje boven het toetsenbord. */
	.sd-st-pad-open .sd-st-wrap { max-height: none; }
	.sd-st-tabel { table-layout: fixed; min-width: calc(2.6rem + var(--sd-st-n, 2) * 4.6rem + 2.8rem); }
	.sd-st-tabel thead th { position: sticky; top: 0; z-index: 2; }
	.sd-st-tabel tfoot :is(th, td) { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -6px 12px rgba(34, 34, 59, .06); }
	.sd-st-tabel thead tr > :first-child, .sd-st-tabel tfoot tr > :first-child { z-index: 3; }
	.sd-st-tabel tr > :first-child { width: 2.6rem; min-width: 0; padding: .4rem .5rem; text-align: center; }
	.sd-st-tabel tbody tr > th { font-size: .95rem; }
	.sd-st-tabel tfoot tr > :first-child { font-size: 0; }
	.sd-st-tabel tfoot tr > :first-child::after { content: "Σ"; font-size: 1.2rem; }
	.sd-st-plus { width: 2.8rem; }
	.sd-st-plus button { width: 2rem; height: 2rem; margin: 0 .3rem; }
	.sd-st-naam input { min-width: 0; padding: .75rem 1.1rem .75rem .35rem; font-size: .9rem; text-overflow: ellipsis; }
	.sd-st-weg { width: 1.9rem; height: 1.9rem; right: -.1rem; }
	.sd-st-tabel td input { min-width: 0; height: 3.1rem; padding: 0 .2rem; font-size: 1.25rem; }
	.sd-st-tabel tfoot :is(th, td) { font-size: 1.25rem; padding: .65rem .2rem; }
	/* Eindtelling (lijst): eerste kolom met de onderdelen iets breder. */
	.sd-st[data-cfg*='"modus":"lijst"'] .sd-st-tabel tr > :first-child { width: 6.4rem; text-align: left; font-size: .85rem; }
	.sd-st[data-cfg*='"modus":"lijst"'] .sd-st-tabel tfoot tr > :first-child { font-size: 1.05rem; }
	.sd-st[data-cfg*='"modus":"lijst"'] .sd-st-tabel tfoot tr > :first-child::after { content: none; }
	.sd-st[data-cfg*='"modus":"lijst"'] .sd-st-tabel { min-width: calc(6.4rem + var(--sd-st-n, 2) * 4.4rem + 2.8rem); }
	.sd-st-knoppen { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .45rem; }
	.sd-st-knop { min-height: 2.9rem; padding: .5rem .6rem; }
	/* Zwevende knoppen (chat, rad) zitten de tabel en het toetsenbord in de weg. */
	.sd-st-body .sd-chat, .sd-st-body .sd-rad-btn, .sd-st-body .sd-rad-bubbel { display: none !important; }
}
.sd-st-pad-open .sd-chat, .sd-st-pad-open .sd-rad-btn, .sd-st-pad-open .sd-rad-bubbel { display: none !important; }

/* Cijfertoetsenbord onderin. */
.sd-st-pad { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; padding: .6rem .7rem calc(.7rem + env(safe-area-inset-bottom)); background: var(--sp-night); color: #fff; box-shadow: 0 -10px 30px rgba(15, 22, 48, .35); border-radius: 18px 18px 0 0; font-family: var(--sp-font); }
.sd-st-pad[hidden] { display: none; }
.sd-st-pad-kop { display: flex; align-items: center; gap: .7rem; padding: 0 .2rem .45rem; }
.sd-st-pad-wie { flex: 1; min-width: 0; line-height: 1.2; }
.sd-st-pad-wie strong { display: block; font-size: 1.05rem; color: var(--sp-gold-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-st-pad-wie span { font-size: .85rem; color: rgba(255, 255, 255, .7); }
.sd-st-pad-waarde { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.sd-st-pad button { border: 0; border-radius: 12px; font: 700 1.5rem var(--sp-font); color: #fff; background: rgba(255, 255, 255, .1); touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.sd-st-pad button:active { background: rgba(255, 255, 255, .25); }
.sd-st-pad-klaar { padding: .45rem .8rem; font-size: .95rem !important; background: transparent !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.sd-st-pad-totaal { display: flex; gap: .4rem; overflow-x: auto; padding: 0 0 .5rem; scrollbar-width: none; }
.sd-st-pad-totaal span { flex: none; padding: .2rem .55rem; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: .8rem; color: rgba(255, 255, 255, .8); white-space: nowrap; }
.sd-st-pad-totaal span.is-nu { background: var(--sp-gold-light); color: var(--sp-night); }
.sd-st-pad-totaal b { font-variant-numeric: tabular-nums; }
.sd-st-pad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.sd-st-pad-keys button { height: 3.3rem; }
.sd-st-pad-keys .is-fn { background: rgba(255, 255, 255, .04); color: var(--sp-gold-light); }
.sd-st-pad-volgende { display: block; width: 100%; height: 3.3rem; margin-top: .45rem; background: var(--sp-coral) !important; font-size: 1.15rem !important; }
@media (max-height: 640px) { .sd-st-pad-keys button, .sd-st-pad-volgende { height: 2.8rem; } }
