/* Showcase "Industrial Metaverse" (ADR 0062). Mobile first: the map on top, the panel below; from
   900px the panel sits on the right of a full-height map. Light and dark follow the visitor. */
.metaverse {
  --space: #00000e;
  --demo: #b5865c;
  --live: #00c1b6;
  margin: 0;
}

.metaverse .top {
  position: relative;
  z-index: 2;
}

.room-badge {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--petrol);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 600;
}

.stage {
  display: flex;
  flex-direction: column;
}

.map-wrap {
  position: relative;
  height: 58vh;
  height: 58dvh;
  background: var(--space);
}

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

/* The star field of ADR 0050, fading with zoom: the embed's own space module sets class and opacity. */
.map.map-space::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #00000e url("/embed/stars.webp") center / cover no-repeat;
  opacity: var(--map-space-opacity, 1);
  pointer-events: none;
}

.panel {
  padding: 0 16px 24px;
  background: var(--surface);
  color: var(--text);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 2px;
  margin: 0 -16px 12px;
  padding: 0 8px;
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tabs [role="tab"] {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tabs [role="tab"][aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--petrol);
}

.tabs [role="tab"]:focus-visible,
.stop:focus-visible,
.ref:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: -2px;
}

.lead {
  margin: 0 0 12px;
}

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

.stops,
.refs,
.machines,
.weather {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stop,
.ref {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0 0 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stop span,
.ref span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.is-current > .stop,
.is-current > .ref {
  border-color: var(--petrol);
  box-shadow: inset 4px 0 0 var(--petrol);
}

.ref-card,
.live-card {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ref-card h3,
.live-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

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

.figure {
  margin: 0 0 8px;
  color: var(--petrol-dark);
  font-size: 18px;
  font-weight: 700;
}

.demo {
  border-style: dashed;
  border-color: var(--demo);
}

.demo-badge,
.live-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.demo-badge {
  background: var(--demo);
  color: #000028;
}

.live-badge {
  background: var(--live);
  color: #000028;
}

.machine {
  padding: 4px 0;
  font-size: 14px;
}

.machine.is-warning strong {
  color: #d72339;
}

:root[data-scheme="dark"] .machine.is-warning strong {
  color: #ff7687;
}

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

.share {
  display: block;
  font-size: 14px;
}

.share input,
.select select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.select {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--petrol-dark);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

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

/* Other people's pointers: a dot and a label, kept on their point by the page. */
.cursors {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e5a400;
  box-shadow: 0 1px 4px rgb(0 0 0 / 40%);
}

.cursor span {
  position: absolute;
  top: 12px;
  left: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #000028;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

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

.credits a,
.fine a {
  color: inherit;
}

@media (min-width: 900px) {
  .stage {
    flex-direction: row;
    height: calc(100vh - 52px);
    height: calc(100dvh - 52px);
  }

  .map-wrap {
    flex: 1 1 auto;
    height: auto;
  }

  .panel {
    flex: 0 0 400px;
    overflow-y: auto;
    border-left: 1px solid var(--line);
  }
}

/* The drop-in (?view=stories): no header and no tabs, the list beside the globe from 700px. */
.dropin .top,
.dropin .tabs {
  display: none;
}

.dropin .stage {
  height: 100vh;
  height: 100dvh;
}

.dropin .panel {
  padding-top: 12px;
}

@media (min-width: 700px) {
  .dropin .stage {
    flex-direction: row;
  }

  .dropin .map-wrap {
    flex: 1 1 auto;
    height: auto;
  }

  .dropin .panel {
    flex: 0 0 340px;
    overflow-y: auto;
    border-left: 1px solid var(--line);
  }
}

/* The map's text alternative (ADR 0031): read by screen readers, never drawn. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The drop-in shows the globe and the stories: no place card of the embed. */
.dropin .place-card {
  display: none;
}
