/*
 * Schaatsplekjes signature ("waar kun je vandaag schaatsen").
 * Elements: hero with the bend of a 400 m track drawn over the photo (sp-hero__track), ice chance chips + legend
 * (sp-chance, sp-legend, map classes sp-area--*), report chips (sp-report), frost strip for the coming days (sp-frost),
 * place list (sp-spots), safety box with ice thickness and 112 (sp-safety), pictogram tiles (sp-picto).
 * Load after kit.css + themes/schaatsplekjes.css. Pictograms: icons/schaatsplekjes/sprite.svg (ids sp-*).
 * Every colour comes with words and a picto or pattern; the chance scale is one hue light to dark.
 */

/* ---------- Logo with mark ---------- */
.sp-logo { display: inline-flex; align-items: center; gap: .55rem; }
.sp-logo svg, .sp-logo img { width: 2.4rem; height: 2.4rem; flex: none; }

/* ---------- Pictograms ---------- */
.sp-picto { display: inline-grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--zs-surface-alt); color: var(--zs-brand-text); }
.sp-picto svg { width: 62%; height: 62%; }
.sp-picto--sm { width: 1.9rem; height: 1.9rem; }
.sp-picto--lg { width: 4rem; height: 4rem; }
.sp-picto--bare { background: none; width: 1.5rem; height: 1.5rem; }
.sp-picto--bare svg { width: 100%; height: 100%; }

/* ---------- Hero: photo + the bend of a 400 m track (two lane lines and the dashed inner line) ---------- */
.sp-hero { --zs-hero-focus: center 60%; overflow: hidden; }
/* Sits right of the text column (desktop) and above it (phone), so the lines never cross text. */
.sp-hero__track { position: absolute; z-index: -1; left: 46%; right: -30%; bottom: -62%; height: 120%; pointer-events: none;
  border: 3px solid rgb(255 255 255 / .55); border-radius: 50%; }
.sp-hero__track::before, .sp-hero__track::after { content: ""; position: absolute; border-radius: 50%; }
.sp-hero__track::before { inset: 2.2rem; border: 3px solid rgb(255 255 255 / .38); }
.sp-hero__track::after { inset: 1.1rem; border: 2px dashed rgb(255 255 255 / .3); }
.sp-hero .zs-hero__body { position: relative; }
@media (max-width: 48rem) { .sp-hero__track { left: 28%; right: -70%; top: -34%; bottom: auto; height: 62%; } }

/* ---------- Ice chance: chip, legend, map areas ----------
 * <span class="sp-chance" data-chance="none|possible|likely">waarschijnlijk ijs</span> */
.sp-chance { display: inline-flex; align-items: center; gap: .45rem; padding: .2rem .7rem .2rem .45rem; border-radius: 999px;
  font-weight: 650; font-size: .88rem; line-height: 1.3; white-space: nowrap;
  background: var(--sp-chance-none); color: var(--sp-chance-none-ink); box-shadow: inset 0 0 0 1.5px var(--sp-chance-none-edge); }
.sp-chance::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; background: currentColor; opacity: .25; }
.sp-chance[data-chance="possible"] { background: var(--sp-chance-possible); color: var(--sp-chance-possible-ink); box-shadow: inset 0 0 0 1.5px var(--sp-chance-possible-edge); }
.sp-chance[data-chance="possible"]::before { opacity: .55; }
.sp-chance[data-chance="likely"] { background: var(--sp-chance-likely); color: var(--sp-chance-likely-ink); box-shadow: inset 0 0 0 1.5px var(--sp-chance-likely-edge); }
.sp-chance[data-chance="likely"]::before { opacity: 1; }

.sp-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 0; list-style: none; font-size: .92rem; }
.sp-legend li { display: inline-flex; align-items: center; gap: .5rem; }
.sp-legend__swatch { width: 1.6rem; height: 1rem; border-radius: 4px; flex: none;
  background: var(--sp-chance-none); box-shadow: inset 0 0 0 1.5px var(--sp-chance-none-edge); }
.sp-legend__swatch[data-chance="possible"] { background: var(--sp-chance-possible); box-shadow: inset 0 0 0 1.5px var(--sp-chance-possible-edge); }
.sp-legend__swatch[data-chance="likely"] { box-shadow: inset 0 0 0 1.5px var(--sp-chance-likely-edge);
  background: repeating-linear-gradient(45deg, var(--sp-chance-likely) 0 3px, color-mix(in srgb, var(--sp-chance-likely) 78%, var(--zs-surface)) 3px 5px); }

/* Map (Leaflet/MapLibre SVG paths or circle markers): add the class to the path. "likely" gets a hatch for print and CVD
 * when the map supports SVG patterns (pattern id sp-hatch, see examples/schaatsplekjes.html). */
.sp-area--none { fill: var(--sp-chance-none); stroke: var(--sp-chance-none-edge); fill-opacity: .55; stroke-width: 1; }
.sp-area--possible { fill: var(--sp-chance-possible); stroke: var(--sp-chance-possible-edge); fill-opacity: .7; stroke-width: 1.5; }
.sp-area--likely { fill: var(--sp-chance-likely); stroke: var(--sp-chance-likely-edge); fill-opacity: .8; stroke-width: 2; }

/* ---------- Reports: <span class="sp-report" data-report="skating|ice|unsafe"><svg>…</svg> er wordt geschaatst</span> ---------- */
.sp-report { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; font-size: .9rem; line-height: 1.3;
  padding: .2rem .7rem .2rem .45rem; border-radius: var(--zs-radius-sm); color: var(--sp-ice); background: var(--zs-surface-alt); }
.sp-report svg { width: 1.25rem; height: 1.25rem; flex: none; }
.sp-report[data-report="skating"] { color: var(--zs-highlight-ink); background: var(--zs-highlight); }
.sp-report[data-report="unsafe"] { color: var(--sp-unsafe); background: var(--sp-unsafe-bg); }
.sp-report time { font-weight: 400; color: inherit; opacity: .85; }

/* ---------- Frost strip: the coming days, night minimum as a bar below zero ----------
 * <ol class="sp-frost" style="--scale: 10"> <li style="--min: -6"> day | bar | temp | chance chip */
.sp-frost { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; margin: 0; padding: 0; list-style: none; }
.sp-frost li { display: grid; grid-template-rows: auto 6.5rem auto auto; justify-items: center; gap: .35rem; padding: .7rem .3rem .8rem;
  background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius-sm); text-align: center; min-width: 0; }
.sp-frost__day { font-weight: 650; font-size: .9rem; }
.sp-frost__bar { position: relative; width: .9rem; height: 100%; border-radius: 999px; background: var(--zs-surface-alt); overflow: hidden; }
.sp-frost__bar::after { content: ""; position: absolute; left: 0; right: 0; top: 0; border-radius: 999px; background: var(--sp-frost);
  height: calc(max(0, -1 * var(--min, 0)) / var(--scale, 10) * 100%); }
.sp-frost__temp { font: 700 1.15rem/1 var(--zs-font-display); font-variant-numeric: tabular-nums; }
.sp-frost .sp-chance { font-size: .72rem; padding: .1rem .45rem .1rem .3rem; gap: .25rem; }
.sp-frost .sp-chance::before { width: .55rem; height: .55rem; }
.sp-frost__note { margin: .75rem 0 0; font-size: .85rem; color: var(--zs-muted); }
@media (max-width: 40rem) {
  .sp-frost { grid-template-columns: none; gap: .35rem; }
  .sp-frost li { grid-template-rows: none; grid-template-columns: 3.2rem minmax(0, 1fr) 3rem auto; align-items: center; justify-items: start; padding: .55rem .75rem; text-align: left; }
  .sp-frost__bar { width: 100%; height: .6rem; }
  .sp-frost__bar::after { top: 0; bottom: 0; height: auto; width: calc(max(0, -1 * var(--min, 0)) / var(--scale, 10) * 100%); }
}

/* ---------- Places: list of spots with type picto, chance and the latest report ---------- */
.sp-spots { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.sp-spot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem .9rem; align-items: center; padding: .9rem 1rem;
  background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); }
.sp-spot h3 { font-size: 1.15rem; margin: 0; }
.sp-spot h3 a { color: inherit; text-decoration: none; }
.sp-spot h3 a:hover { text-decoration: underline; }
.sp-spot__meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; font-size: .88rem; color: var(--zs-muted); }
.sp-spot .sp-picto { grid-row: span 2; }
@media (min-width: 48rem) { .sp-spot { grid-template-columns: auto minmax(0, 1fr) auto; } .sp-spot__meta { grid-column: 3; grid-row: 1 / span 2; justify-content: flex-end; } }

/* ---------- Safety box: ice thickness rule + 112, always on a place page ---------- */
.sp-safety { display: grid; gap: 1rem 1.5rem; padding: 1.25rem; border-radius: var(--zs-radius); background: var(--zs-surface);
  border: 1px solid var(--zs-line); border-left: 6px solid var(--sp-unsafe); }
.sp-safety h2 { font-size: 1.35rem; margin: 0; }
.sp-safety ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .75rem; }
.sp-safety li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: start; }
.sp-safety li p { margin: 0; }
.sp-safety .sp-picto { color: var(--sp-unsafe); background: var(--sp-unsafe-bg); }
@media (min-width: 48rem) { .sp-safety { grid-template-columns: 14rem minmax(0, 1fr); } }

/* ---------- Steps / how it works ---------- */
.sp-steps { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.sp-steps li { display: grid; gap: .5rem; align-content: start; }
.sp-steps h3 { font-size: 1.2rem; margin: .25rem 0 0; }
.sp-steps p { margin: 0; color: var(--zs-muted); }
