/* Data-driven 3D (ADR 0063): mobile first, map on top and the panel below; side by side from
   900 px. Light and dark from showcases.css. */
.data3d {
  margin: 0;
}

.layout {
  display: grid;
  grid-template-areas: "map" "controls";
}

.controls {
  grid-area: controls;
  padding: 12px 16px 24px;
}

.intro {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.notice {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-left: 4px solid var(--petrol-dark);
  background: var(--surface);
  font-size: 14px;
}

.group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.group h2 {
  flex-basis: 100%;
}

.chip {
  min-height: 40px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--petrol-dark);
  border-color: var(--petrol-dark);
  color: var(--on-accent);
}

.small {
  margin: 12px 0 4px;
  font-size: 14px;
}

.legend {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.legend li {
  min-height: 24px;
}

.swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: -3px;
  border: 1px solid var(--line);
}

.kind {
  margin: 6px 0;
  font-size: 13px;
  color: var(--muted);
}

.kind[data-kind="synthetic"] {
  color: var(--text);
  font-weight: 600;
}

.picked {
  margin: 8px 0;
  font-size: 14px;
}

.picked p {
  margin: 0 0 4px;
  font-weight: 600;
}

.picked dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  margin: 0;
}

.picked dd {
  margin: 0;
}

.table-wrap {
  margin: 12px 0;
  font-size: 13px;
}

.table-wrap summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.table-wrap table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 12px;
}

.table-wrap caption {
  text-align: left;
  color: var(--muted);
  padding: 4px 0;
}

.table-wrap th,
.table-wrap td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-wrap a,
.source a {
  color: var(--petrol-dark);
}

.hint {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.status {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.source {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 24px;
}

.map-wrap {
  grid-area: map;
  position: relative;
  height: 64vh;
  min-height: 340px;
}

.map {
  position: absolute;
  inset: 0;
}

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 64px);
  margin: 0;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgb(0 0 40 / 85%);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}

@media (min-width: 900px) {
  .data3d {
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .layout {
    flex: 1;
    min-height: 0;
    grid-template-columns: 380px 1fr;
    grid-template-areas: "controls map";
  }

  .controls {
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }

  .map-wrap {
    height: auto;
    min-height: 0;
  }
}
