/* «Зарядні станції» (/zaryadky/, src/chargers.js). Site tokens, .card, .seg, .field, .btn, .mapbox from site.css.
   Desktop: filters and the list on the left, the map sticky on the right. Phone: filters → map → list.
   The map box has its size before anything loads: the overview, then the MapLibre map in the same box. */
.ch-head { padding-bottom: 24px; }
.ch-head__kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.ch-head__kicker .i { width: 18px; height: 18px; color: var(--ok); }
.ch-head h1 { margin-top: 8px; }

.ch {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "filters map" "count map" "list map";
  grid-template-rows: auto auto 1fr; column-gap: 28px; align-items: start; padding-bottom: 48px;
}
.ch__filters { grid-area: filters; display: grid; gap: 18px; padding: clamp(18px, 2.2vw, 24px); }
.ch__count { grid-area: count; margin: 14px 4px 0; color: var(--muted); font-size: 14px; }
.ch__regions { grid-area: list; margin-top: 10px; }
.ch__mapcol { grid-area: map; position: sticky; top: 96px; }
@media (max-width: 959px) {
  .ch { grid-template-columns: minmax(0, 1fr); grid-template-areas: "filters" "map" "count" "list"; grid-template-rows: none; }
  .ch__mapcol { position: static; margin-top: 16px; }
}
html:not(.js) .ch__filters, html:not(.js) .ch__open, html:not(.js) [data-fly] { display: none; }

/* ---------- filters ---------- */
.ch__field { min-width: 0; margin: 0; padding: 0; border: 0; }
.ch__field legend { margin-bottom: 8px; padding: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.ch__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ch__chip { position: relative; display: inline-flex; cursor: pointer; }
.ch__chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.ch__chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.ch__chip:hover input:not(:checked) + span { border-color: var(--graphite); }
.ch__chip input:checked + span { border-color: var(--graphite); background: var(--graphite); color: #fff; }
.ch__chip--gbt input:checked + span { border-color: var(--warn); background: var(--warn); }
.ch__chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.ch__q input { height: 48px; }

/* ---------- map ---------- */
.ch__map { position: relative; height: clamp(420px, calc(100vh - 170px), 760px); overflow: hidden; border-radius: var(--r-lg); background: var(--mist); }
@media (max-width: 959px) { .ch__map { height: auto; aspect-ratio: 1; } } /* the country fills a phone's width, the button under it; the live map has «на весь екран» */
.ch__svg { display: block; width: 100%; height: calc(100% - 72px); padding: 16px; } /* the button below */
.ch__land { fill: #fff; stroke: #d5d7da; stroke-width: 1; stroke-linejoin: round; }
.ch__dots { fill: none; stroke-linecap: round; stroke-width: 3.6; }
.ch__dots--gbt { stroke: #c25e00; }
.ch__dots--dc { stroke: var(--graphite); }
.ch__dots--ac { stroke: var(--focus); }
.ch__dots--unk { stroke: #a3a7ad; stroke-width: 3; }
.ch__town { fill: var(--muted); font-size: 11px; font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
@media (max-width: 640px) { .ch__town { font-size: 17px; } .ch__dots { stroke-width: 5.5; } .ch__dots--unk { stroke-width: 4.5; } .ch__svg { padding: 8px; } }
.ch__open { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); box-shadow: var(--shadow); }
.ch__map.is-loading .ch__open { opacity: 0.6; cursor: progress; }
.ch__map.is-live .ch__open, .ch__map.is-live .ch__svg { visibility: hidden; }
.ch__map > .ch__gl { position: absolute; inset: 0; } /* over .maplibregl-map { position: relative } */
.ch__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 4px 0; color: var(--muted); font-size: 13px; }
.ch__legend li { display: inline-flex; align-items: center; gap: 6px; }
.ch__legend li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #a3a7ad; }
.ch__legend .is-gbt::before { background: #c25e00; }
.ch__legend .is-dc::before { background: var(--graphite); }
.ch__legend .is-ac::before { background: var(--focus); }

/* ---------- the list ---------- */
.ch__reg { border-bottom: 1px solid var(--line); }
.ch__reg summary { display: flex; align-items: center; gap: 10px; padding: 14px 4px; list-style: none; cursor: pointer; }
.ch__reg summary::-webkit-details-marker { display: none; }
.ch__reg summary h2 { flex: 1; font-size: 17px; font-weight: 600; }
.ch__reg summary::after { content: "+"; width: 1em; font-size: 20px; line-height: 1; text-align: center; }
.ch__reg[open] summary::after { content: "–"; }
.ch__n { min-width: 2.4em; padding: 2px 8px; border-radius: 999px; background: var(--mist); font-size: 13px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.ch__list li { display: grid; justify-items: start; gap: 5px; padding: 14px 4px; border-top: 1px solid var(--line); }
.ch__list b { font-weight: 600; }
.ch__list span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.ch__list p { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ch__list i { padding: 3px 10px; border-radius: 999px; background: var(--mist); font-size: 12px; font-style: normal; font-weight: 600; white-space: nowrap; }
.ch__list i.d { background: var(--mist-2); }
.ch__list i.g { background: var(--warn-bg); color: var(--warn); }
.ch__list small { color: var(--muted); font-size: 12px; }
.ch__list a, .ch__list button { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ch__list li { grid-template-columns: auto 1fr; }
.ch__list li > :not(a):not(button) { grid-column: 1 / -1; }
.ch__list button { justify-self: start; margin-left: 12px; }
.maplibregl-popup-content .ch__list li { padding: 2px 6px 0 0; border: 0; font-family: var(--font); }

/* ---------- about, sources, PlugShare ---------- */
.ch-about { padding-bottom: 64px; }
.ch-about > h2 { font-size: clamp(24px, 2.6vw, 32px); }
.ch-about ul { display: grid; gap: 12px; max-width: 86ch; margin-top: 16px; }
.ch-about li { padding-left: 18px; border-left: 3px solid var(--line); }
.ch-about__src { max-width: 86ch; margin-top: 20px; color: var(--muted); font-size: 13px; }
.ch-about a { text-underline-offset: 3px; }
.ch-plugshare { margin-top: 32px; }
.ch-plugshare h2 { font-size: 20px; }
