/* css/pin-drop.css — P3-02. Capture mode, the entry/exit markers, the
   bottomright toggle control, and the instruction banner.

   Decisions:
   - Tokens ONLY from styles.css.
   - Capture-mode click suspension is pure CSS: js/pin-drop.js toggles
     .atlas-map--capture on the map container and these rules switch off
     pointer-events on every interactive pane for exactly that long. No
     handler juggling, so a crash mid-capture can never leave pin clicks
     dead — removing one class restores everything.
   - TRAP covered here: the just-placed entry pin must stay draggable while
     still armed for the exit tap, so .atlas-droppin re-enables
     pointer-events inside the disabled pins pane (children may opt back in
     under pointer-events:none parents).
   - Entry/exit markers are labelled pills (IN / OUT), nothing like the round
     site dots — distinct from each other by colour (teal in, amber out). */

/* ── Capture mode: crosshair + suspended pin clicks ──────────────────────── */

.atlas-map--capture,
.atlas-map--capture .leaflet-interactive,
.atlas-map--capture .leaflet-container {
  cursor: crosshair !important;
}

.atlas-map--capture .leaflet-atlas-pins-pane,
.atlas-map--capture .leaflet-atlas-subpins-pane,
.atlas-map--capture .leaflet-atlas-tracks-pane,
.atlas-map--capture .leaflet-atlas-legal-pane {
  pointer-events: none !important;
}

/* …but the drop pins themselves stay live so they can be nudged mid-capture. */
.atlas-map--capture .atlas-droppin {
  pointer-events: auto !important;
  cursor: grab;
}

/* ── Entry / exit markers ────────────────────────────────────────────────── */

.atlas-droppin {
  width: 44px;              /* full-size tap target, project rule */
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: grab;
}
.atlas-droppin:active { cursor: grabbing; }

.atlas-droppin__pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 9px;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(10, 16, 19, 0.55), 0 1px 4px rgba(0, 0, 0, 0.45);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: transform 120ms ease;
}

/* Entry = getting IN the water: hike/land teal, dark text for contrast. */
.atlas-droppin--entry .atlas-droppin__pill {
  background: var(--accent);
  color: #0b2320;
}

/* Exit = getting OUT: warn amber, dark text. Reads instantly apart. */
.atlas-droppin--exit .atlas-droppin__pill {
  background: var(--warn);
  color: #2b1d00;
}

.atlas-droppin:hover .atlas-droppin__pill,
.atlas-droppin:focus-visible .atlas-droppin__pill {
  transform: scale(1.12);
}
.atlas-droppin:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -6px;
  border-radius: var(--radius);
}

/* ── Capture toggle control (bottomright) ────────────────────────────────── */

.atlas-pindrop-ctrl { border: 0; }

.atlas-pindrop-ctrl__btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  font-family: var(--font);
  cursor: pointer;
}
.atlas-pindrop-ctrl__glyph { font-size: 22px; line-height: 1; }

.atlas-pindrop-ctrl__btn:hover { background: var(--line); }
.atlas-pindrop-ctrl__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Armed: the button itself shows capture is live. */
.atlas-pindrop-ctrl__btn[aria-pressed='true'] {
  background: var(--accent);
  color: #0b2320;
  border-color: var(--accent);
}

/* ── Instruction banner ──────────────────────────────────────────────────── */

.atlas-pindrop-banner {
  position: absolute;
  top: var(--pad);
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;             /* above panes, below app chrome (--z-chrome 1000) */
  max-width: calc(100% - 2 * var(--pad));
  padding: 0.5rem 0.9rem;
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  display: none;
}
.atlas-pindrop-banner.is-live { display: block; }

@media (prefers-reduced-motion: reduce) {
  .atlas-droppin__pill { transition: none; }
}
