/* Shared admin theme control. Fixed cells prevent inherited heading styles
   from shifting the sun, track or moon out of the control. */
.admin-theme-toggle.ios-theme-switch {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 20px 44px 20px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 114px;
  min-width: 114px;
  height: 44px;
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid #d8bb8457;
  border-radius: 10px;
  background: #211f19;
  color: #d8bb84;
  cursor: pointer;
  flex: 0 0 auto;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-icon,
.admin-theme-toggle.ios-theme-switch .theme-switch-track {
  box-sizing: border-box;
  min-height: 0;
  margin: 0;
  padding: 0;
  line-height: 1;
  letter-spacing: 0;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: inherit;
  opacity: .58;
  transform: none;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-track {
  position: relative;
  display: block;
  width: 44px;
  height: 28px;
  flex-basis: 44px;
  border-radius: 7px;
  background: #34312a;
  box-shadow: inset 0 0 0 1px #ffffff24;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-track i {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 3px #0003;
  transform: translate(16px, -50%);
  transition: transform .16s ease;
}

.admin-theme-toggle.ios-theme-switch.is-light {
  border-color: #cdbfa6;
  background: #fffdf8;
  color: #77521c;
}

.admin-theme-toggle.ios-theme-switch.is-light .theme-switch-track {
  background: #ba8b37;
  box-shadow: inset 0 0 0 1px #70490d2e;
}

.admin-theme-toggle.ios-theme-switch.is-light .theme-switch-track i {
  transform: translate(0, -50%);
}

.admin-theme-toggle.ios-theme-switch.is-light .theme-switch-icon:first-child,
.admin-theme-toggle.ios-theme-switch.is-dark .theme-switch-icon:last-child {
  opacity: 1;
  transform: none;
}

.admin-theme-toggle.ios-theme-switch:focus-visible {
  outline: 3px solid #b9914f;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .admin-theme-toggle.ios-theme-switch .theme-switch-track i { transition: none; }
}
