/* Theme-aware toggle — ON + OFF both follow --green / brand */
.bz-switch {
  --bz-switch-on: var(--green, #810100);
  --bz-switch-off-track: color-mix(in srgb, var(--green, #810100) 14%, #e8e8e8);
  --bz-switch-off-ring: color-mix(in srgb, var(--green, #810100) 32%, #c4c4c4);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.bz-switch__text {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: 1.35;
  min-width: 0;
}
.bz-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}
.bz-switch__track {
  background-color: var(--bz-switch-off-track);
  border-radius: 100px;
  padding: 1px;
  margin: 0;
  cursor: pointer;
  transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) 0s, background-color 0.2s ease;
  align-items: center;
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 51px;
  height: 29px;
  box-shadow:
    rgba(0, 0, 0, 0.18) 0px 0px 4px inset,
    var(--bz-switch-off-ring) 0px 0px 0px 2px inset,
    rgba(0, 0, 0, 0.06) 0px 1px 0px 0px;
}
.bz-switch__track::after {
  content: "";
  display: flex;
  top: 2.3px;
  left: 2px;
  width: 26px;
  height: 26px;
  background-color: #fff;
  border-radius: 200px;
  position: absolute;
  box-shadow:
    color-mix(in srgb, var(--bz-switch-on) 22%, transparent) 0px 0px 0px 1px,
    rgba(0, 0, 0, 0.22) 0px 4px 8px;
  transition:
    left 300ms cubic-bezier(0.4, 0, 0.2, 1) 0s,
    background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0s;
  will-change: left, background-color;
}
.bz-switch input[type="checkbox"]:checked + .bz-switch__track {
  background-color: var(--bz-switch-on);
  box-shadow:
    rgba(0, 0, 0, 0.28) 0px 0px 5px inset,
    var(--bz-switch-on) 0px 0px 0px 2px inset,
    var(--bz-switch-on) 0px 0px 0px 24px inset,
    rgba(255, 255, 255, 0.2) 0px 1px 0px 0px;
}
.bz-switch input[type="checkbox"]:checked + .bz-switch__track::after {
  left: 24px;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 4px 8px;
}
.bz-switch input[type="checkbox"]:focus-visible + .bz-switch__track {
  outline: 2px solid var(--bz-switch-on);
  outline-offset: 2px;
}
.bz-switch input[type="checkbox"]:disabled + .bz-switch__track {
  opacity: 0.45;
  cursor: not-allowed;
}
.bz-switch:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.85;
}
.bz-switch--block {
  display: flex;
  width: 100%;
}
.bz-switch--sm .bz-switch__track {
  width: 44px;
  height: 26px;
}
.bz-switch--sm .bz-switch__track::after {
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
}
.bz-switch--sm input[type="checkbox"]:checked + .bz-switch__track::after {
  left: 20px;
}
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .bz-switch {
    --bz-switch-off-track: #f0e4e4;
    --bz-switch-off-ring: #c9a3a3;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bz-switch__track,
  .bz-switch__track::after {
    transition: none;
  }
}
