/* Local or hosted: a toggle between two panels, and on the hosted one a
   slideshow of the dashboard. Without the script both panels show, one
   after the other, each under its own name.
   @decision(DL-013) */

.mode-tabs {
  display: inline-flex;
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.mode-tabs[hidden] { display: none; }
.mode-tabs button {
  padding: 0.4rem 1rem;
  border: 0;
  background: transparent;
  color: var(--soft);
  font: 500 0.9375rem/1.4 var(--sans);
  cursor: pointer;
}
.mode-tabs button + button { border-left: 1px solid var(--rule-2); }
.mode-tabs button:hover { color: var(--ink); }
.mode-tabs button[aria-selected="true"] { background: var(--sunk); color: var(--ink); }
.mode-tabs button:focus-visible { outline-offset: -2px; }

.mode + .mode { margin-top: 3rem; }
.modes-live .mode + .mode { margin-top: 0; }
.modes-live .mode[hidden] { display: none; }
.mode-name { font-weight: 600; margin-bottom: 0.5rem; }
.modes-live .mode-name { display: none; }
.mode .side .note { margin-bottom: 0.25rem; }

.highlights {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem 2.5rem;
}
.highlights h3 code { font-size: 0.95em; }
.highlights p { margin-top: 0.35rem; color: var(--soft); max-width: 28rem; }
@media (min-width: 720px) {
  .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #mode-hosted .highlights { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The slideshow: every slide stacked in one cell, so the stage keeps the
   height of the tallest and nothing below it moves. */
.shots { margin: 2.5rem 0 0; }
.shot-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.9rem;
}
.shot-nav[hidden] { display: none; }
.shot-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.shot-tabs button {
  padding: 0.25rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--soft);
  font: 500 0.9375rem/1.4 var(--sans);
  cursor: pointer;
}
.shot-tabs button:hover { color: var(--ink); }
.shot-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--olive); }
/* The pause button reuses the hero's .motion look, in the flow. */
.shot-motion { position: static; display: block; }
.shot-motion[hidden] { display: none; }

.shot-stage { display: grid; }
.shot { min-width: 0; }
.shots-live .shot { grid-area: 1 / 1; }
.shot + .shot { margin-top: 2.5rem; }
.shots-live .shot + .shot { margin-top: 0; }
.shots-live .shot {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.shots-live .shot.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease;
}
@media (prefers-reduced-motion: reduce) {
  .shots-live .shot, .shots-live .shot.is-on { transition: none; }
}
.shot > a, .shot picture { display: block; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule-2);
  background: var(--raised);
}
.shot .on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot .on-light { display: none; }
  :root:not([data-theme="light"]) .shot .on-dark { display: block; }
}
:root[data-theme="dark"] .shot .on-light { display: none; }
:root[data-theme="dark"] .shot .on-dark { display: block; }

.shot-cap, .shots-cap {
  margin-top: 0.9rem;
  font-size: var(--t-md);
  line-height: 1.55;
  color: var(--soft);
  max-width: 36rem;
}
.shot-cap b { color: var(--ink); font-weight: 600; }
.shots-cap { margin-top: 0.25rem; color: var(--faint); }

/* Phones get the dashboard's phone layout, at about a phone's own size. */
@media (max-width: 639px) {
  .shot-tabs { gap: 0.25rem 1rem; }
  .shot img { max-width: 290px; }
}
