/* Coverage map styles, shared by /coverage/ and /regulations/directory/.
   Everything sits under .cov-map so it cannot clash with the host page. */
.cov-map {
  --cm-blue: #0F1D32;
  --cm-ink: #0F1D32;
  --cm-body: #3A4356;
  --cm-muted: #6B6556;
  --cm-line: #E8E4DA;
  --cm-soft: #F2F0EA;
  font-family: "Inter", -apple-system, sans-serif;
  line-height: 1.6;
}
.cov-map *, .cov-map *::before, .cov-map *::after { box-sizing: border-box; }

.cov-map .toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 1.5rem 0 0.75rem; }
.cov-map .seg { display: inline-flex; background: var(--cm-soft); border: 1px solid var(--cm-line); border-radius: 999px; padding: 3px; }
.cov-map .seg button { font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--cm-body); background: none; border: 0; border-radius: 999px; padding: 0.4rem 0.95rem; margin: 0; cursor: pointer; }
.cov-map .seg button[aria-pressed="true"] { background: var(--cm-blue); color: #fff; }
.cov-map .legend { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cov-map .legend button { font: inherit; font-size: 0.78rem; color: #334155; background: #fff; border: 1px solid var(--cm-line); border-radius: 999px; padding: 0.3rem 0.7rem 0.3rem 0.55rem; margin: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.cov-map .legend button[aria-pressed="false"] { opacity: 0.4; }
.cov-map .legend .dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; background: color-mix(in srgb, currentColor 35%, transparent); }
.cov-map .legend .n { color: var(--cm-muted); font-variant-numeric: tabular-nums; }
.cov-map .legend[hidden], .cov-map .legend:empty { display: none; }

.cov-map .map-frame { position: relative; border-radius: 14px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #f3f7fc 75%); border: 1px solid var(--cm-line); box-shadow: 0 12px 32px -14px rgba(15, 29, 50, 0.18); touch-action: pan-y; }
.cov-map #map { display: block; width: 100%; cursor: grab; }
.cov-map #map.dragging { cursor: grabbing; }
.cov-map .zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.cov-map .zoom button { width: 34px; height: 34px; padding: 0; margin: 0; border-radius: 8px; border: 1px solid var(--cm-line); background: rgba(255, 255, 255, 0.95); color: var(--cm-ink); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.cov-map .zoom button:hover { border-color: var(--cm-blue); }
.cov-map .hint { position: absolute; left: 12px; bottom: 10px; font-size: 0.72rem; color: var(--cm-muted); pointer-events: none; }
.cov-map .loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--cm-muted); font-size: 0.9rem; }

.cov-map .tip { position: absolute; z-index: 5; min-width: 180px; max-width: 260px; background: #fff; color: var(--cm-ink); border-radius: 10px; padding: 0.6rem 0.75rem; box-shadow: 0 10px 30px rgba(15, 29, 50, 0.18); border: 1px solid var(--cm-line); font-size: 0.82rem; line-height: 1.45; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); }
.cov-map .tip.pinned { pointer-events: auto; }
.cov-map .tip[hidden] { display: none; }
.cov-map .tip strong { display: block; font-size: 0.92rem; line-height: 1.3; }
.cov-map .tip .where { color: var(--cm-muted); }
.cov-map .tip .badge { display: inline-block; margin-top: 0.35rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1rem 0.45rem; border-radius: 4px; color: #fff; }
.cov-map .tip .more { font-size: 0.75rem; color: var(--cm-muted); margin-top: 0.3rem; }
.cov-map .tip a { display: block; margin-top: 0.4rem; color: var(--cm-blue); font-weight: 600; text-decoration: none; }

.cov-map .map-more { display: inline-block; margin-top: 0.6rem; font-size: 0.85rem; font-weight: 600; color: var(--cm-blue); text-decoration: none; }
.cov-map .map-more:hover { text-decoration: underline; }

/* The place card: the script moves it below the map so it never covers it. */
.cov-map > .tip { position: relative; transform: none; max-width: none; min-height: 3rem; margin-top: 0.6rem; padding: 0.7rem 2.5rem 0.7rem 0.9rem; pointer-events: auto; box-shadow: none; }
.cov-map > .tip.empty { display: flex; align-items: center; color: var(--cm-muted); background: var(--cm-soft); border-style: dashed; }
.cov-map .tip-close { position: absolute; top: 0.35rem; right: 0.4rem; width: 32px; height: 32px; padding: 0; margin: 0; border: 0; border-radius: 6px; background: none; color: var(--cm-muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.cov-map .tip-close:hover { background: var(--cm-soft); color: var(--cm-ink); }

/* Hover label: the place name only, next to the pointer. */
.cov-map .cov-label { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); background: rgba(15, 29, 50, 0.88); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.cov-map .cov-label[hidden] { display: none; }

@media (max-width: 640px) {
  .cov-map .map-frame { border-radius: 10px; }
  /* Key on one line that scrolls sideways, so the map stays near the top. */
  .cov-map .toolbar { margin: 1rem 0 0.6rem; gap: 0.5rem; }
  .cov-map .legend { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cov-map .legend::-webkit-scrollbar { display: none; }
  .cov-map .legend button { flex-shrink: 0; }
  .cov-map .hint { left: 8px; bottom: 6px; font-size: 0.68rem; background: rgba(255, 255, 255, 0.85); padding: 0.1rem 0.4rem; border-radius: 4px; }
  .cov-map .zoom { right: 8px; top: 8px; gap: 4px; }
  .cov-map .zoom button { width: 28px; height: 28px; font-size: 0.95rem; }
}
