/* What the pages about days, files and issues share, the Monitor's and the Explorer's: severities,
   issues, filters, the bars of modes, a map with its cards beside it. What every page shares is in
   geo.css. */
main.wide {
  max-width: none;
}

.filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 0.75rem;
}

.sev {
  display: inline-block;
  min-width: 4.2rem;
  text-align: center;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.sev.info {
  background: var(--tint-strong);
  color: var(--ink);
}

.sev.warning {
  background: color-mix(in oklab, var(--warn), transparent 84%);
  color: var(--warn);
}

.sev.error {
  background: color-mix(in oklab, var(--bad), transparent 84%);
  color: var(--bad);
}

.issue {
  border-left: 3px solid var(--line-strong);
  padding: 0.25rem 0.6rem;
  margin: 0.4rem 0;
  cursor: pointer;
}

.issue.warning {
  border-left-color: var(--warn);
}

.issue.error {
  border-left-color: var(--bad);
}

/* Removed issues stay readable, but step back behind the open ones. */
.issue.removed,
tr.removed {
  opacity: 0.6;
}

.issue.removed {
  cursor: default;
}

pre.json {
  font-size: 0.8rem;
  background: var(--ground);
  padding: 0.5rem;
  border-radius: 6px;
  overflow-x: auto;
}

/* A sentence that says what the page cannot show, and why. */
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

/* x-for leaves no whitespace between items, so each is its own box to wrap at. */
.legend-item {
  display: inline-block;
  margin-right: 0.6rem;
  white-space: nowrap;
}

a[href*='day.html#/'] {
  white-space: nowrap;
}

.bar {
  display: flex;
  height: 0.6rem;
  border-radius: 3px;
  overflow: hidden;
  min-width: 8rem;
  background: var(--tint-strong);
}

/* A day as it went: each stretch placed at its time of day, with nothing where nothing is known. */
.bar.placed {
  display: block;
  position: relative;
}

.bar.placed span {
  position: absolute;
  top: 0;
  bottom: 0;
}

label.check {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--ink);
}

label.check.muted {
  color: var(--muted);
}

label.inline {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.2rem 0.75rem;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
}

.grid2 input,
.grid2 select {
  width: 100%;
}

/* Every digit as wide as the next, so the parts stay put while they change. */
.time-field {
  width: 6.5em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

table.matrix td.agree {
  font-weight: 600;
  color: var(--good);
}

/* ── a map as part of a page, with its cards beside it ──────────────────── */

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26rem;
  gap: 1rem;
  align-items: start;
}

@media (width <= 70rem) {
  .map-layout {
    grid-template-columns: 1fr;
  }
}

.map-block {
  height: 72vh;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.map-aside {
  max-height: 72vh;
  overflow-y: auto;
}

/* Leaflet keeps a tooltip on one line, and an issue message makes that line very long.
   Tooltips sit in a pane with no width, so without max-content they would wrap at every word. */
.leaflet-tooltip {
  width: max-content;
  max-width: 300px;
  white-space: normal;
}

details.panel > summary {
  cursor: pointer;
}

details.panel[open] > summary {
  margin-bottom: 0.5rem;
}

.layers label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--ink);
}

.day-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.day-head > h2 {
  margin: 0;
}

/* Over a cross of the day's points, which takes a click before the track beneath it. */
.leaflet-container.on-cross {
  cursor: pointer;
}

.point-popup .leaflet-popup-content {
  font-size: 0.9rem;
}

.point-popup .leaflet-popup-content p {
  margin: 0 0 0.5rem;
}

.point-popup .leaflet-popup-content p:last-child {
  margin: 0;
}
