/* PROTOTYPE — overpass/plain.css: the map's options and the plain map (overpass/plain.js; Marc, 16 Nov 2026): Photo or
   Map, Squares or Outlines, the Layers menu, the key on the map, and the town names and rings made readable on light
   ground. */

/* the options, at the map's top right: dark pills like the views pill, whatever the ground */
/* the second row, at the right: the views pill keeps the first row (it reaches past the map's middle at 1440 px) */
.mapopts { position: absolute; right: var(--inset); top: calc(var(--inset) + 46px); z-index: 4; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 6px; max-width: calc(58% - var(--inset)); }
.mapopts .seg { display: flex; background: rgba(10, 27, 51, .86); padding: 3px; border-radius: var(--r-pill); }
.mapopts .seg button, .mapopts .lyr-btn { font-weight: 600; font-size: var(--fs-key); color: var(--pale); background: none; border: 0; border-radius: var(--r-pill); padding: 5px 11px; cursor: pointer; white-space: nowrap; transition: background var(--t-quick), color var(--t-quick); }
.mapopts .seg button[aria-pressed="true"] { background: var(--cloudtop); color: var(--ink); }
.mapopts .lyr-btn { background: rgba(10, 27, 51, .86); padding: 8px 13px; }
.mapopts .lyr-btn[aria-expanded="true"] { background: var(--cloudtop); color: var(--ink); }
/* a layer on: a small violet mark after the word, so it is seen with the menu shut */
.mapopts .lyr-btn.lyr-on::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #9d74ff; vertical-align: 1px; }
.mapopts .lyr { position: absolute; right: 0; top: calc(100% + 6px); width: 18.5rem; max-width: calc(100vw - 32px); display: grid; gap: 10px; background: rgba(10, 27, 51, .95); color: var(--pale); padding: 12px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.mapopts .lyr[hidden] { display: none; }
.mapopts .lyr label { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: start; cursor: pointer; }
.mapopts .lyr input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #9d74ff; }
/* Layers, "Place names and rings" off (Marc, 16 Nov 2026: "all markers off"): only the water and the welly are left */
.mapcol.no-labels #ovNames, .mapcol.no-labels #ovRings { display: none; }
.mapopts .lyr b { display: block; font-size: var(--fs-ui); font-weight: 650; color: #fff; }
.mapopts .lyr i { display: block; font-style: normal; font-size: var(--fs-key); line-height: 1.35; color: var(--pale-2); }
.mapopts .lyr-note { margin: 0; font-size: var(--fs-key); line-height: 1.4; color: var(--doubt-ink); }
.mapopts .lyr-note:empty { display: none; }

/* the key on the map, bottom left: white on the plain map, the instrument's navy over the photos */
.plain-key { position: absolute; left: var(--inset); bottom: 36px; z-index: 4; max-width: 15.5rem; background: rgba(255, 255, 255, .95); color: #1d2a38; padding: 9px 11px 8px; box-shadow: 0 2px 10px rgba(7, 20, 43, .18); }
.plain-key[hidden] { display: none; }
.plain-key.pk-photo { background: rgba(10, 27, 51, .9); color: var(--pale); box-shadow: none; }
.plain-key .pk-t { cursor: pointer; margin: 0; font-size: var(--fs-key); font-weight: 650; line-height: 1.3; }
.plain-key details[open] .pk-t { margin-bottom: 8px; }
.plain-key details { max-height: min(360px, 45svh); overflow-y: auto; }
.plain-key .pk-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.plain-key li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: center; font-size: var(--fs-key); line-height: 1.25; font-variant-numeric: tabular-nums; }
.plain-key .pk-sw { display: block; width: 16px; height: 12px; border-radius: 2px; }
.plain-key .pk-line { height: 0; border-top: 2px solid currentColor; border-radius: 0; }
.plain-key .pk-dash { border-top-style: dashed; }
.plain-key .pk-stip { background: radial-gradient(circle, #5d6b7c 1.1px, transparent 1.4px) 0 0 / 5px 5px, rgba(150, 163, 178, .35); }
.plain-key .pk-hatch { background: repeating-linear-gradient(-45deg, #F5A524 0 2px, transparent 2px 5px); outline: 1px solid #F5A524; outline-offset: -1px; }
.plain-key .pk-wait { grid-column: 1 / -1; color: inherit; opacity: .8; }
.plain-key .pk-n { margin: 6px 0 0; font-size: var(--fs-small); line-height: 1.35; }

/* A horizontal scale leaves more of the map visible when the key is expanded. */
@media (min-width: 761px) {
  .plain-key { max-width: 320px; }
  .plain-key .pk-bins { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 5px; }
  .plain-key .pk-bins .pk-bin { grid-template-columns: 1fr; gap: 3px; text-align: center; font-size: .66rem; }
  .plain-key .pk-bins .pk-bin .pk-sw { width: 100%; }
  .plain-key .pk-bins li:not(.pk-bin) { grid-column: 1 / -1; }
}
/* on light ground: the town names and the rings in dark ink with a white halo */
.mapcol.plain .nm { color: #33414f; text-shadow: 0 0 2px #fff, 0 0 4px #fff, 0 0 6px #fff; }
.mapcol.plain .rg-name { color: #9b1458; text-shadow: 0 0 3px #fff, 0 0 6px #fff; }
.mapcol.plain .rg-fig { color: #3a4757; text-shadow: 0 0 2px #fff, 0 0 4px #fff; }
.mapcol.plain .rg-lines circle { stroke: #b0186a; }
.mapcol.plain .rg-lines path { stroke: rgba(155, 20, 88, .55); }

@media (pointer: coarse) { .mapopts .seg button { padding: 9px 12px; } .mapopts .lyr-btn { padding: 11px 14px; } }
/* a phone: the options under the views pill at the right; the key smaller, above the credit */
@media (max-width: 760px) {
  .mapopts { right: 8px; top: 56px; max-width: calc(100% - 64px); }
  .mapopts .seg button, .mapopts .lyr-btn { font-size: .8rem; }
  .plain-key { left: 8px; bottom: 30px; max-width: 12.5rem; padding: 7px 9px; }
  .plain-key li, .plain-key .pk-t { font-size: .74rem; }
  /* the six steps in one row across the map's foot, each word under its colour; any other row runs the full width */
  .plain-key:has(.pk-bins) { right: 8px; max-width: none; }
  .plain-key .pk-bins { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 3px; row-gap: 5px; }
  .plain-key .pk-bins .pk-bin { grid-template-columns: 1fr; gap: 2px; text-align: center; font-size: .66rem; }
  .plain-key .pk-bins .pk-bin .pk-sw { width: 100%; height: 10px; }
  .plain-key .pk-bins li:not(.pk-bin) { grid-column: 1 / -1; }
}

/* The wider desktop map has room for both control groups in one row. */
@media (min-width: 1400px) and (pointer: fine) {
  .mapopts { top: var(--inset); }
}
