/* ============================================================
   W4IO.me — POTA activation map
   Page-specific styles for my-activations.html.
   Colors come from the tokens in style.css; nothing is hard-coded
   here that isn't already part of the Boat Anchor palette.

   This lives in a file rather than a <style> block because the
   site's Content-Security-Policy blocks inline styles.
   ============================================================ */

/* ---------- Newest parks near home ---------- */
.newparks {
  margin: 26px 0 0;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.newparks__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  margin-bottom: 8px;
}
.newparks__head .label { margin: 0; display: inline; }
.newparks__ref {
  font-family: var(--data-face); font-size: .72rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.newparks__list { list-style: none; margin: 0; padding: 0; }
.newparks__list li {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: baseline; gap: 6px 14px;
  padding: 8px 2px; border-top: 1px solid var(--line);
}
.newparks__list li:first-child { border-top: none; }
.newparks__ref-link {
  font-family: var(--data-face); font-size: .84rem; letter-spacing: .03em;
  color: var(--meter); text-decoration: none; white-space: nowrap;
}
.newparks__ref-link:hover { color: #bfe0ec; text-decoration: underline; }
.newparks__nm {
  font-family: var(--read-face); font-size: .92rem; color: var(--text);
  line-height: 1.35;
}
.newparks__dist {
  font-family: var(--data-face); font-size: .74rem; letter-spacing: .04em;
  color: var(--muted); white-space: nowrap; text-align: right;
}
.newparks__foot {
  margin: 9px 0 0; font-family: var(--data-face); font-size: .68rem;
  letter-spacing: .04em; color: var(--muted);
}
@media (max-width: 560px) {
  .newparks__list li { grid-template-columns: auto 1fr; }
  .newparks__dist { grid-column: 1 / -1; text-align: left; }
}

/* ---------- Control bar ---------- */
.map-filter {
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px; margin: 26px 0 0;
}
.map-filter .label { margin: 0; display: inline; }
.map-filter select {
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 11px; font-family: var(--data-face); font-size: .82rem;
}
.map-filter select:focus { border-color: var(--amber-dim); outline: none; }

.map-toggles { display: flex; gap: 18px; align-items: center; }
.map-toggles label {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--data-face); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.map-toggles input { accent-color: var(--amber); }
.map-toggles svg { flex: none; }

/* Third key, added by the script only under a state filter */
.map-key-elsewhere {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--data-face); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--amber-dim);
}

.map-stats {
  margin-left: auto; font-family: var(--data-face); font-size: .78rem;
  color: var(--muted); letter-spacing: .04em;
}
.map-stats b { color: var(--amber); font-weight: 500; }

/* Refresh-from-POTA button */
.map-refresh {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 12px; cursor: pointer;
  font-family: var(--data-face); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase;
}
.map-refresh:hover { border-color: var(--amber-dim); color: var(--glow); }
.map-refresh:focus-visible { border-color: var(--amber); outline: none; }
.map-refresh:disabled { opacity: .6; cursor: default; }
.map-refresh__icon { flex: none; color: var(--amber); }
.map-refresh.is-busy .map-refresh__icon { animation: map-refresh-spin .9s linear infinite; }
@keyframes map-refresh-spin { to { transform: rotate(360deg); } }
.map-refresh__note {
  font-family: var(--data-face); font-size: .72rem; letter-spacing: .04em;
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .map-refresh.is-busy .map-refresh__icon { animation: none; }
}

/* ---------- Status banner ---------- */
.map-banner {
  display: none; margin: 14px 0 0; padding: 10px 14px;
  font-family: var(--data-face); font-size: .78rem; letter-spacing: .03em;
  line-height: 1.6;
  background: var(--panel-hi); color: var(--glow);
  border: 1px solid var(--amber-dim); border-left: 2px solid var(--amber);
  border-radius: var(--radius);
}
.map-banner.is-shown { display: block; }
.map-banner a { color: var(--glow); }

/* ---------- Map panel ---------- */
.map-panel {
  margin: 18px 0 8px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px;
}
.map-panel figcaption { margin-top: 10px; }
.map-panel figcaption a { color: var(--muted); }

#map {
  height: 72vh; min-height: 460px;
  border-radius: 2px;
  background: #0d0c0b;              /* deep water/void behind the vector map */
}

/* ---------- Leaflet chrome, retuned for the theme ---------- */
.leaflet-container { font-family: var(--data-face); background: #0d0c0b; }

.leaflet-control-zoom a {
  background: var(--panel); color: var(--text);
  border-color: var(--line);
}
.leaflet-control-zoom a:hover { background: var(--panel-hi); color: var(--glow); }
.leaflet-bar { border-color: var(--line); box-shadow: none; }
.leaflet-bar a:first-child { border-top-left-radius: 2px; border-top-right-radius: 2px; }
.leaflet-bar a:last-child { border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; }

.leaflet-control-attribution {
  background: rgba(19, 17, 16, .78); color: var(--muted);
  font-family: var(--data-face); font-size: .62rem;
}
.leaflet-control-attribution a { color: var(--muted); }

/* Popups */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--panel); color: var(--text);
  border-radius: var(--radius); box-shadow: 0 4px 18px rgba(0, 0, 0, .6);
}
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-container a.leaflet-popup-close-button:hover { color: var(--amber); }

.pk-pop { font-family: var(--read-face); font-size: .92rem; line-height: 1.5; }
.pk-pop .ref { font-family: var(--data-face); font-size: .84rem; letter-spacing: .03em; }
.pk-pop .ref a { color: var(--meter); text-decoration: none; }
.pk-pop .ref a:hover { color: #bfe0ec; text-decoration: underline; }
.pk-pop .nm { margin-top: 2px; }
.pk-pop .loc {
  color: var(--muted); font-family: var(--data-face); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .08em; margin-top: 2px;
}
.pk-pop .act-yes {
  color: var(--amber); font-family: var(--panel-face);
  text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; margin-top: 6px;
}
/* Worked, but not from the state currently being viewed */
.pk-pop .act-part {
  color: var(--amber-dim); font-family: var(--panel-face);
  text-transform: uppercase; letter-spacing: .1em; font-size: .78rem;
  margin-top: 6px; line-height: 1.4;
}
.pk-pop .act-det {
  color: var(--muted); font-family: var(--data-face); font-size: .7rem;
  letter-spacing: .05em; text-transform: uppercase; margin-top: 3px;
}
.pk-pop .act-no { color: var(--muted); font-size: .84rem; margin-top: 6px; }

/* Activated markers */
.star-icon { filter: drop-shadow(0 0 6px rgba(240, 169, 44, .45)); }

/* Worked, but not from the state being viewed */
.ring-icon { filter: drop-shadow(0 0 5px rgba(240, 169, 44, .3)); }

/* Cluster bubbles — the cool meter blue, same as the un-worked dots */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large { background-color: rgba(127, 179, 200, .18); }

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: rgba(127, 179, 200, .7); color: #10181d;
  font-family: var(--data-face); font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .map-stats { margin-left: 0; flex-basis: 100%; }
  #map { height: 62vh; min-height: 380px; }
}
