/* The live map: the whole window, in the app's look. Panels float over the map
   on glass, as StudioGlass does in the app. */
.map-page { height: 100dvh; overflow: hidden; }

.livemap { position: fixed; inset: 0; overflow: hidden; }
#map { position: absolute; inset: 0; background: var(--map-sea); }

.glass {
  background: rgba(19, 28, 43, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.map-bar, .map-pills, .map-notice, .live-credit { z-index: 3; }
.map-card, .map-filter { z-index: 4; }

.map-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.map-bar > * { pointer-events: auto; }

.map-title { padding: 6px 14px 8px 6px; min-width: 0; }
.map-head { display: flex; align-items: center; gap: 2px; }
.map-title .brand { gap: 8px; font-size: 15px; letter-spacing: 2.5px; }
.map-title .brand img { width: 24px; height: 24px; }
.map-back {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  color: var(--ink);
}
.map-back:hover { background: var(--raised); text-decoration: none; }
.map-back .material-icons-round { font-size: 22px; }
.map-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.map-title p {
  margin: 0 0 0 8px;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.map-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  font: 500 14px/1 var(--prose);
  cursor: pointer;
}
.map-button .material-icons-round { font-size: 20px; }
.map-count {
  min-width: 20px;
  padding: 3px 6px;
  border-radius: 10px;
  background: var(--primary);
  color: #06090f;
  font: 700 12px/1 var(--mono);
  text-align: center;
}

.map-pills {
  position: absolute;
  top: 88px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: none;
}
.map-pills button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--primary);
  border-radius: 16px;
  background: rgba(19, 28, 43, 0.92);
  color: var(--ink);
  font: 400 13px/1 var(--prose);
  cursor: pointer;
  pointer-events: auto;
}
.map-pills .material-icons-round { font-size: 15px; color: var(--muted); }

.map-notice {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, calc(100% - 32px));
  margin: 0;
  padding: 14px 18px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.live-credit {
  position: absolute;
  left: 12px;
  bottom: 34px;
  max-width: min(640px, calc(100% - 24px));
  margin: 0;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(6, 9, 15, 0.72);
  text-align: left;
  font: 400 12px/1.4 var(--prose);
  color: var(--muted);
  pointer-events: none;
}
.live-credit a { color: inherit; text-decoration: underline; pointer-events: auto; }
.grecaptcha-badge { visibility: hidden; }

.map-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.map-icon:hover { background: var(--raised); color: var(--ink); }

/* A picked plane, or a finding. */
.map-card {
  position: absolute;
  top: 88px;
  left: 12px;
  width: 340px;
  max-height: calc(100% - 162px);
  overflow-y: auto;
  padding: 14px;
}
.map-pills:not([hidden]) ~ .map-card { top: 128px; max-height: calc(100% - 202px); }
.map-card[hidden], .map-filter[hidden] { display: none; }
.card-head { display: flex; align-items: flex-start; gap: 8px; }
.card-head > div { flex: 1; min-width: 0; }
.card-head h2 { margin: 0; font: 500 17px/1.3 var(--prose); overflow-wrap: anywhere; }
.card-call {
  margin: 0;
  font: 700 18px/1.3 var(--mono);
  letter-spacing: 0.02em;
}
.card-sub { margin: 2px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.card-state {
  margin: 8px 0 0;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.card-state.live { color: var(--success); }

.card-photo { display: block; margin-top: 10px; }
.card-photo img { display: block; max-width: 100%; max-height: 150px; border-radius: 10px; }
.card-photo-credit { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.card-reads {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 12px 0 0;
}
.card-reads div { min-width: 0; }
.card-reads dt { font: 500 12px/1.3 var(--mono); letter-spacing: 0.06em; color: var(--faint); }
.card-reads dd { margin: 2px 0 0; font: 500 15px/1.3 var(--mono); white-space: nowrap; }
.card-line { margin: 10px 0 0; font-size: 14px; line-height: 1.4; }
.card-label { display: block; font: 500 12px/1.4 var(--mono); letter-spacing: 0.06em; color: var(--faint); }
.card-codes { margin: 10px 0 0; font: 500 12px/1.4 var(--mono); color: var(--faint); overflow-wrap: anywhere; }
.card-credit { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: var(--faint); }
/* The filter, as the app's sheet has it. */
.map-filter {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: 340px;
  overflow-y: auto;
  padding: 14px;
}
.map-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.map-filter-head h2 { margin: 0; font: 500 16px/1.3 var(--prose); }
.filter-group { margin-top: 16px; }
.filter-group h3 {
  margin: 0 0 8px;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.filter-sub { margin: 10px 0 6px; font-size: 13px; color: var(--faint); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pills button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: transparent;
  color: var(--ink);
  font: 400 14px/1 var(--prose);
  cursor: pointer;
}
.filter-pills button[aria-pressed="true"] {
  border-color: var(--primary);
  background: rgba(61, 155, 255, 0.16);
}

/* Under the filter button, not over it. */
.mapboxgl-ctrl-top-right { top: 62px; }
.mapboxgl-ctrl-group { background: var(--card) !important; border: 1px solid var(--border); }
.mapboxgl-ctrl-group button + button { border-top-color: var(--border) !important; }
.mapboxgl-ctrl-group .mapboxgl-ctrl-icon { filter: invert(1); }

/* A phone: panels come up from the bottom, and only one covers the map. */
@media (max-width: 720px) {
  .map-wide { display: none; }
  .map-title p { letter-spacing: 0; }
  .map-card, .map-filter, .map-pills:not([hidden]) ~ .map-card {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 62%;
    border-width: 1px 0 0;
    border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .live-credit { bottom: 30px; }
}
