/* --------------------------------
   THE DARK MODE BUTTON

   On every user-facing page, with the footer links. Its colour is the
   page's own --link, so it needs no dark rules of its own. Named apart
   from .toggle (the clinic's microphone switch) and .appeal-toggle.

   `hidden` until theme-toggle.js has wired it, so with no JavaScript it
   isn't a button that does nothing. It keeps its space while it waits,
   so the page doesn't jump when it appears.
-------------------------------- */

.theme-toggle {
  width: auto;
  min-width: 44px;
  min-height: 44px;

  margin-top: 8px;
  padding: 8px 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 1.5px solid currentColor;
  border-radius: 999px;

  background: transparent;

  color: var(--link);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;

  cursor: pointer;

  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle[hidden] {
  visibility: hidden;
}

/* A half-filled circle. Its meaning is in the words beside it. */
.theme-toggle::before {
  content: "";

  width: 16px;
  height: 16px;

  flex: none;

  border: 2px solid currentColor;
  border-radius: 50%;

  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}
