/* ============================================================================
   map-credits.css — the map credits behind an ⓘ (js/map-credits.js), on
   /map, /radar and Explore. MapLibre's compact attribution control, restyled:
   collapsed it is a small round ⓘ in the controls' material; open it is a
   compact panel of the current credit lines (links kept) with a ×.
   /map and /radar wear the map chrome's dark glass (--mc-* on .map-body, the
   same in both site themes); Explore follows the site theme.
   ========================================================================== */
.mapcredits {
  --cr-bg: var(--mc-bg, var(--surface-raised, #fff));
  --cr-ink: var(--mc-ink, var(--text, #16202c));
  --cr-line: var(--mc-line, var(--line, rgba(10, 22, 40, 0.12)));
}
:root[data-theme='dark'] .mapcredits {
  --cr-bg: var(--mc-bg, var(--surface-raised, #122334));
  --cr-ink: var(--mc-ink, var(--text, #eaf1f6));
}
.maplibregl-ctrl.maplibregl-ctrl-attrib.mapcredits {
  background: var(--cr-bg); color: var(--cr-ink);
  border: 1px solid var(--cr-line);
  -webkit-backdrop-filter: var(--mc-blur, none); backdrop-filter: var(--mc-blur, none);
}
/* collapsed: a 32 px round ⓘ */
.maplibregl-ctrl-attrib.mapcredits.maplibregl-compact:not(.maplibregl-compact-show) {
  width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 16px; box-sizing: border-box;
}
.maplibregl-ctrl-attrib.mapcredits.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-button {
  top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 12px;
}
/* open: a compact panel, never wider than the viewport's gutters */
.maplibregl-ctrl-attrib.mapcredits.maplibregl-compact-show {
  max-width: min(320px, calc(100vw - 24px)); border-radius: 12px;
  padding: 8px 56px 8px 10px; font: 500 11px/1.45 var(--font-sans, system-ui, sans-serif);
}
.mapcredits .maplibregl-ctrl-attrib-inner { white-space: normal; }
.mapcredits .maplibregl-ctrl-attrib-inner a { color: inherit; text-decoration: underline; }
.mapcredits__x {
  position: absolute; top: 2px; right: 28px; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  color: var(--cr-ink); font: 600 16px/24px var(--font-sans, system-ui, sans-serif);
}
.mapcredits__x:hover { background: rgba(127, 127, 127, 0.18); }
.mapcredits__x:focus-visible,
.mapcredits .maplibregl-ctrl-attrib-button:focus-visible {
  outline: 2px solid var(--mc-focus, var(--accent-text, #0e7a66)); outline-offset: 1px;
}
/* Explore in the dark theme: MapLibre's ⓘ glyph is dark ink — invert it on
   the dark panel (the map pages already invert it on their glass). */
:root[data-theme='dark'] body:not(.map-body) .mapcredits .maplibregl-ctrl-attrib-button { filter: invert(1); }
