/* Page style switcher in the header, shared by every look, and the empty
   scene slots. Colours come from the look's tokens. */

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
}

/* Hidden until theme.js has set data-theme: without JavaScript the buttons
   would do nothing. */
.theme-switcher {
  display: none;
}

:root[data-theme] .theme-switcher {
  display: flex;
}

.theme-switcher {
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-alt);
}

.theme-switcher button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 32px;
  min-width: 0;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  /* No fade: the pressed state is set as the page loads, and nothing may
     move with reduced motion. */
  transition: none;
}

.theme-switcher button:hover {
  background: var(--surface);
  color: var(--heading);
}

.theme-switcher button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--heading);
  box-shadow: 0 0 0 1px var(--border);
}

.theme-dot {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #0b4f6c;
}

[data-theme-choice="night"] .theme-dot {
  background: #0a1626;
  box-shadow: inset 0 0 0 2px #4fd1e8;
}

[data-theme-choice="daylight"] .theme-dot {
  background: #f4e6c4;
}

/* Phones: a 44 px touch target. The switcher takes its own row below the
   brand when it does not fit beside it. */
@media (max-width: 40rem), (pointer: coarse) {
  .theme-switcher button {
    min-height: 44px;
    padding: 0.2rem 0.6rem;
  }
}

@media (max-width: 30rem) {
  .theme-switcher {
    margin-bottom: 0.5rem;
  }
}

/* Scene slots stay empty and hidden until a look's scene uses them. */
.scene {
  display: none;
}
