/* The map and everything over it: ridings, neighbouring land, hover pop-up,
   search box and the riding window. */
.page {
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  padding: 16px;
}
.map-box {
  position: relative;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: var(--water);
  box-shadow: var(--shadow);
}
#map { display: block; width: 100%; height: 100%; cursor: grab; }
#map:active { cursor: grabbing; }

.context-land {
  fill: var(--land-context);
  stroke: var(--context-edge);
  stroke-width: 0.6px;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  pointer-events: none;
}

.riding {
  fill: var(--crimson);
  stroke: var(--maroon);
  stroke-width: 2.5px;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  cursor: pointer;
}
.riding:hover { fill: var(--maroon-deep); }
.riding:focus { outline: none; }
.riding:focus-visible { stroke: #000; stroke-width: 4px; }

.tip {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  background: var(--card);
  border-radius: 6px;
  padding: 9px 13px 10px;
  box-shadow: 0 3px 12px rgb(0 0 0 / 0.2);
  max-width: 260px;
  display: grid;
  gap: 2px;
  line-height: 1.25;
}
.tip-name { font-size: 16px; font-weight: 700; }

.notice {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 4;
  padding: 14px 18px;
  border-radius: 6px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.notice code { font-size: 15px; }

/* The window that opens over the map when a riding is clicked. The heading and text are the site's. */
.info {
  box-sizing: border-box;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 28px 28px 24px;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.35);
}
.info::backdrop { background: rgb(0 0 0 / 0.5); }
.info > :last-child { margin-bottom: 0; }
/* A plain ×, not the site's yellow button that every <button> gets; `.info` outranks its button:hover. */
.info .info-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: none;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}
.info .info-close:hover { background: var(--paper); color: #000; }
.info .info-close:focus-visible { outline: 3px solid var(--crimson); }
.info-name { margin-right: 40px; }
.info-text { white-space: pre-line; }
.info-photos { display: grid; gap: 12px; }
.info-photos img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* The search box, centred along the top of the map. The site's input styles only reach inputs inside
   a form, so this one is styled here. */
.search {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 5;
  width: min(560px, calc(100% - 28px));
  margin-inline: auto;
}
.search input {
  box-sizing: border-box;
  width: 100%;
  padding: 16px 24px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  border: 2px solid transparent;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.22);
}
.search input:focus { outline: none; border-color: var(--crimson); }
.search input::placeholder { font-weight: 400; }
.search ul {
  margin: 6px 0 0;
  padding: 4px;
  list-style: none;
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.25);
}
.search li { padding: 12px 18px; border-radius: 6px; font-size: 18px; cursor: pointer; }
.search li:hover, .search li[aria-selected="true"] { background: var(--paper); color: var(--crimson); font-weight: 700; }

/* Zoom in and out, bottom right. The site's yellow button, made square. */
.zoom-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: grid;
  gap: 8px;
}
.zoom-controls button {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
}
