/* Kindred Link: the World Link map (js/worldmap.js). Colours of the site: navy lines, gold for the trainers.
   The lengths inside the drawings are SVG units (20 per cell of the map); the drawings keep their
   proportions at any width, so the circles stay round. */
.wm {
  --wm-sea: #c5d8ec;
  --wm-land: #f6f3e7;
  --wm-coast: #9fb4cb;
  --wm-route: #62738f;
  --wm-route-sea: #2a63b0;
  --wm-gold: #c99a1e;
  --wm-gold-ink: #8a6708;
  --wm-ring: var(--wm-gold-ink);   /* the pulsing rings; the first map had them blue: #2a63b0 */
  position: relative;
  container-type: inline-size;
  background: var(--wm-sea);
  border-bottom: 1px solid var(--line);
}
.wm-svg { display: block; width: 100%; height: auto; }
.wm-narrow { display: none; max-width: 520px; margin: 0 auto; }
.wm-narrow + .wm-narrow { border-top: 1px solid var(--wm-coast); }
@container (max-width: 699px) {
  .wm-wide { display: none; }
  .wm-narrow { display: block; }
}
/* browsers without container queries: decide on the window instead (the side column goes away at 800px) */
@supports not (container-type: inline-size) {
  @media (max-width: 760px) {
    .wm-wide { display: none; }
    .wm-narrow { display: block; }
  }
}

.wm-sea { fill: var(--wm-sea); }
.wm-coast { fill: var(--wm-coast); stroke: var(--wm-coast); stroke-width: 3; stroke-linejoin: round; }
.wm-land { fill: var(--wm-land); }
.wm-caption { fill: #b9ae8f; font: 700 15px var(--font); letter-spacing: 7px; text-anchor: middle; }

.wm-route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wm-route-land { stroke: var(--wm-route); stroke-width: 2.6; stroke-dasharray: 0.1 5.4; }
.wm-route-sea { stroke: var(--wm-route-sea); stroke-width: 1.8; stroke-dasharray: 5 4; stroke-linecap: butt; opacity: .75; }
.wm-route-hit { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; }

.wm-place { fill: #fff; stroke: var(--navy-2); stroke-width: 2; }
.wm-town { stroke-width: 1.8; }
.wm-lake { fill: #bfd6ee; stroke: var(--wm-route-sea); stroke-width: 1.5; }
.wm-landmark { stroke: var(--wm-route); stroke-width: 1.5; }
.wm-on { stroke: var(--wm-gold-ink); }

.wm-label { fill: var(--navy); font-family: var(--font); font-weight: 600; paint-order: stroke; stroke: rgba(255, 255, 255, .8); stroke-width: 3.5; stroke-linejoin: round; }
.wm-label-lm { fill: #4a5a75; font-weight: 400; font-style: italic; }

/* trainers: a translucent gold disc and its centre, and the three pulsing rings of the first map
   (3 s, one second apart, from 0.4 to 2.2 times their radius while they fade); ring colour: --wm-ring */
.wm-disc { fill: rgba(201, 154, 30, .26); stroke: var(--wm-gold-ink); stroke-width: 1.4; }
.wm-core { fill: var(--wm-gold); stroke: #fff; stroke-width: 1.2; }
.wm-ping { fill: none; stroke: var(--wm-ring); stroke-width: 1.5; opacity: 0; animation: wm-ring 3s ease-out infinite; }
.wm-ping.wm-p2 { animation-delay: 1s; }
.wm-ping.wm-p3 { animation-delay: 2s; }
@keyframes wm-ring {
  from { transform: scale(.4); opacity: .9; }
  to { transform: scale(2.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wm-ping { animation: none; }
}

.wm-hit { fill: transparent; stroke: none; outline: none; }
.wm-spot { cursor: default; }
.wm-spot:focus-visible { stroke: var(--navy); stroke-width: 2.5; stroke-dasharray: 4 3; }

.wm-tip { position: absolute; z-index: 2; left: 0; top: 0; max-width: min(260px, calc(100% - 8px)); padding: 4px 8px; background: var(--navy); color: #fff;
  font-size: 13px; line-height: 1.3; pointer-events: none; box-shadow: 0 2px 6px rgba(20, 34, 63, .3); }
.wm-tip[hidden] { display: none; }

.wm-legend { list-style: none; margin: 0; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 2px 16px; background: var(--panel);
  border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.wm-legend li { display: flex; align-items: center; gap: 6px; }
.wm-key { width: 30px; height: 14px; flex: none; }
