/* Shared PAR public theme control: identical geometry and icons on home/team pages. */
button#theme-toggle.par-theme-toggle {
  --par-theme-control-bg: #fff;
  --par-theme-control-border: #e9e2d4;
  --par-theme-control-ink: #2c2c2c;
  --par-theme-control-hover-border: #beaf87;
  --par-theme-control-hover-ink: #7a6a45;
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--par-theme-control-border) !important;
  border-radius: 9999px !important;
  background: var(--par-theme-control-bg) !important;
  color: var(--par-theme-control-ink) !important;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, border-color .2s ease,
    color .2s ease, box-shadow .2s ease, transform .2s ease;
}

html.dark button#theme-toggle.par-theme-toggle,
html[data-theme="dark"] button#theme-toggle.par-theme-toggle {
  --par-theme-control-bg: #1b1a17;
  --par-theme-control-border: #2e2b25;
  --par-theme-control-ink: #eee9df;
  --par-theme-control-hover-border: #cdbb8e;
  --par-theme-control-hover-ink: #d8c89f;
}

@media (hover: hover) and (pointer: fine) {
  button#theme-toggle.par-theme-toggle:hover {
    border-color: var(--par-theme-control-hover-border) !important;
    color: var(--par-theme-control-hover-ink) !important;
  }
}

button#theme-toggle.par-theme-toggle:focus {
  box-shadow: 0 0 0 2px var(--par-theme-control-hover-ink);
}

button#theme-toggle.par-theme-toggle:focus-visible {
  outline: 2px solid currentColor !important;
  outline-offset: 3px !important;
}

button#theme-toggle.par-theme-toggle .par-theme-toggle__icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  pointer-events: none;
}

button#theme-toggle.par-theme-toggle .par-theme-toggle__to-light {
  display: none;
}

html.dark button#theme-toggle.par-theme-toggle .par-theme-toggle__to-light,
html[data-theme="dark"] button#theme-toggle.par-theme-toggle .par-theme-toggle__to-light {
  display: block;
}

html.dark button#theme-toggle.par-theme-toggle .par-theme-toggle__to-dark,
html[data-theme="dark"] button#theme-toggle.par-theme-toggle .par-theme-toggle__to-dark {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  button#theme-toggle.par-theme-toggle {
    transition: none;
  }
}
