/* Switch styles. The active one is set on the body from Admin, Look. */
.switch-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; margin: 0.4rem 0 0.8rem; }
.switch-choices label { display: grid; gap: 0.45rem; justify-items: start; padding: 0.7rem; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.switch-choices input { margin: 0; }
.switch-demo { display: inline-flex; align-items: center; pointer-events: none; }
.switch-demo .track { position: relative; display: block; box-sizing: border-box; }
.switch-demo .knob { position: absolute; display: block; box-sizing: border-box; }

.switch-demo[data-style="pill"] .track,
body[data-switch="pill"] button.switch .track { width: 44px; height: 26px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.switch-demo[data-style="pill"] .knob,
body[data-switch="pill"] button.switch .knob { top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: var(--fg); }
.switch-demo[data-style="pill"][data-on="1"] .knob,
body[data-switch="pill"] button.switch[aria-pressed="true"] .knob { transform: translateX(18px); }
.switch-demo[data-style="pill"][data-on="1"] .track,
body[data-switch="pill"] button.switch[aria-pressed="true"] .track { background: var(--accent); border-color: var(--accent); }

.switch-demo[data-style="ios"] .track,
body[data-switch="ios"] button.switch .track { width: 52px; height: 32px; border-radius: 999px; background: #3a3d44; border: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.switch-demo[data-style="ios"] .knob,
body[data-switch="ios"] button.switch .knob { top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .2s ease; }
.switch-demo[data-style="ios"][data-on="1"] .knob,
body[data-switch="ios"] button.switch[aria-pressed="true"] .knob { transform: translateX(20px); }
.switch-demo[data-style="ios"][data-on="1"] .track,
body[data-switch="ios"] button.switch[aria-pressed="true"] .track { background: var(--accent); }

.switch-demo[data-style="square"] .track,
body[data-switch="square"] button.switch .track { width: 46px; height: 24px; border-radius: 0; background: transparent; border: 1px solid var(--line); }
.switch-demo[data-style="square"] .knob,
body[data-switch="square"] button.switch .knob { top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 0; background: var(--fg); transition: transform .15s ease; }
.switch-demo[data-style="square"][data-on="1"] .knob,
body[data-switch="square"] button.switch[aria-pressed="true"] .knob { transform: translateX(22px); }
.switch-demo[data-style="square"][data-on="1"] .track,
body[data-switch="square"] button.switch[aria-pressed="true"] .track { background: var(--accent); border-color: var(--accent); }
.switch-demo[data-style="square"][data-on="1"] .knob,
body[data-switch="square"] button.switch[aria-pressed="true"] .knob { background: #111; }

.switch-demo[data-style="neon"] .track,
body[data-switch="neon"] button.switch .track { width: 50px; height: 26px; border-radius: 999px; background: #07080b; border: 1px solid var(--accent); box-shadow: inset 0 0 8px color-mix(in srgb, var(--accent) 35%, transparent); }
.switch-demo[data-style="neon"] .knob,
body[data-switch="neon"] button.switch .knob { top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--accent); transition: transform .18s ease; }
.switch-demo[data-style="neon"][data-on="1"] .knob,
body[data-switch="neon"] button.switch[aria-pressed="true"] .knob { transform: translateX(24px); }
.switch-demo[data-style="neon"][data-on="1"] .track,
body[data-switch="neon"] button.switch[aria-pressed="true"] .track { box-shadow: 0 0 12px var(--accent); }
/* One size for every switch. Orange on the black site and on the white site. */
button.switch {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  gap: 6px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
button.switch .track,
.switch-demo .track {
  width: 36px !important;
  height: 20px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  flex: 0 0 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  display: block !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #3a3a40 !important;
  box-shadow: none !important;
}
button.switch .knob,
.switch-demo .knob {
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #ff7a00 !important;
  box-shadow: none !important;
  transform: none !important;
  display: block !important;
}
button.switch[aria-pressed="true"] .track,
.switch-demo[data-on="1"] .track { background: #ff7a00 !important; box-shadow: none !important; }
button.switch[aria-pressed="true"] .knob,
.switch-demo[data-on="1"] .knob { transform: translateX(16px) !important; background: #111 !important; }
html[data-theme="light"] button.switch .track,
html[data-theme="light"] .switch-demo .track { background: #ececef !important; box-shadow: none !important; }
html[data-theme="light"] button.switch .knob,
html[data-theme="light"] .switch-demo .knob { background: #1a1a1e !important; }
html[data-theme="light"] button.switch[aria-pressed="true"] .track,
html[data-theme="light"] .switch-demo[data-on="1"] .track { background: #1a1a1e !important; box-shadow: none !important; }
html[data-theme="light"] button.switch[aria-pressed="true"] .knob,
html[data-theme="light"] .switch-demo[data-on="1"] .knob { background: #ff7a00 !important; }
.check input[type="checkbox"] {
  width: 36px !important;
  height: 20px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #3a3a40 !important;
  box-shadow: none !important;
}
.check input[type="checkbox"]::after {
  width: 14px !important;
  height: 14px !important;
  top: 3px !important;
  left: 3px !important;
  border-radius: 999px !important;
  background: #ff7a00 !important;
}
.check input[type="checkbox"]:checked { background: #ff7a00 !important; border-color: #ff7a00 !important; box-shadow: none !important; }
.check input[type="checkbox"]:checked::after { transform: translateX(16px) !important; background: #111 !important; }
html[data-theme="light"] .check input[type="checkbox"] { background: #ececef !important; box-shadow: none !important; }
html[data-theme="light"] .check input[type="checkbox"]::after { background: #1a1a1e !important; }
html[data-theme="light"] .check input[type="checkbox"]:checked { background: #1a1a1e !important; box-shadow: none !important; }
html[data-theme="light"] .check input[type="checkbox"]:checked::after { background: #ff7a00 !important; }

header.top .top-switches,
header.top .top-switches form {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}
header.top button.switch,
header.top button.mode-switch {
  display: inline-flex !important;
  align-items: center !important;
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  overflow: visible !important;
  padding: 0 !important;
  vertical-align: middle !important;
}
header.top .mode-switch .switch-label {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  height: 20px !important;
  margin: 0 0 0 5px !important;
  padding: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  line-height: 20px !important;
  font-size: 0.72rem !important;
}
