/* Keep native checkbox semantics, validation and form submission intact.
   Both public pages and the editorial backoffice use this shared control. */
html body input[type="checkbox"] {
  --switch-active: var(--primary-dark, var(--control-primary));
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  position: relative !important;
  display: inline-block;
  flex: 0 0 48px;
  width: 48px !important;
  min-width: 48px;
  max-width: 48px;
  height: 28px !important;
  min-height: 28px;
  padding: 0 !important;
  margin: 2px 0;
  inset: auto;
  clip: auto !important;
  clip-path: none;
  opacity: 1 !important;
  overflow: visible;
  pointer-events: auto;
  vertical-align: middle;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-pill);
  background: var(--control-track);
  box-shadow: none;
  cursor: pointer;
  transition: background-color .18s, border-color .18s;
}
html body input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--control-white);
  box-shadow: 0 1px 3px var(--control-shadow);
  transform: translateX(0);
  transition: transform .18s;
}
html body input[type="checkbox"]:checked,
html body input[type="checkbox"]:indeterminate {
  border-color: var(--switch-active);
  background: var(--switch-active);
}
html body input[type="checkbox"]:checked::after { transform: translateX(20px); }
html body input[type="checkbox"]:indeterminate::after {
  width: 14px;
  height: 4px;
  top: 11px;
  left: 16px;
  border-radius: var(--radius-xxs);
  transform: none;
}
html body input[type="checkbox"]:hover:not(:disabled) { border-color: var(--switch-active); }
html body input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--switch-active);
  outline-offset: 4px;
  box-shadow: none;
}
html body input[type="checkbox"]:disabled { opacity: .5 !important; cursor: not-allowed; }
html body input[type="checkbox"][aria-invalid="true"] { border-color: var(--danger, var(--control-danger)); }
/* Retire the old decorative checkbox and duplicate backoffice switch track. */
html body :is(.consent_box, .bo-custom-check, .bo-switch__track) { display: none; }
html body .consent_label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 44px;
  letter-spacing: 0;
}
html body .consent_text { flex: 1; min-width: 0; font-weight: 400; line-height: 1.55; }
html body .consent_text a { font-weight: 500; }
html body :is(.bo-check-list label, .bo-switch, .bo-mine, .bo-table__select label) { min-height: 44px; }
html body .bo-table__select label { display: flex; align-items: center; }
html body .bo-table__select { width: 76px; max-width: 76px !important; }
/* Notification preferences previously used hidden inputs and selectable chips. */
html body .mpti_schedule_push_options,
html body .mpti_schedule_push_types { display: flex; flex-wrap: wrap; gap: 12px; }
html body .mpti_schedule_push_options label,
html body .mpti_schedule_push_types label {
  flex: 1 1 190px;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--control-on-dark-border);
  border-radius: var(--radius-md);
}
html body .mpti_schedule_push_options label:has(:checked),
html body .mpti_schedule_push_types label:has(:checked) { background: var(--control-on-dark-surface); border-color: var(--control-on-dark-border-active); }
html body :is(.mpti_schedule_push_options, .mpti_schedule_push_types, .mpti_schedule_push_chips, .mpti_schedule_push_all) input[type="checkbox"] + span {
  min-height: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--control-white);
  box-shadow: none;
  line-height: 1.5;
}
html body .mpti_schedule_push_options small { color: var(--control-on-dark-text); }
html body .mpti_schedule_push_types span::before { display: none; }
html body .mpti_schedule_push_chips label,
html body .mpti_schedule_push_all { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; }
html body .mpti_schedule_push_consent { grid-template-columns: 48px minmax(0, 1fr); align-items: start; color: var(--control-on-dark-text); }
html body .mpti_schedule_push input[type="checkbox"] { --switch-active: var(--control-on-dark-active); }
html body .mpti_schedule_push input[type="checkbox"]:checked::after { background: var(--control-on-dark-thumb); }
html body input[type="checkbox"][hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  html body input[type="checkbox"], html body input[type="checkbox"]::after { transition: none; }
}
@media (forced-colors: active) {
  html body input[type="checkbox"] { forced-color-adjust: none; background: Canvas; border-color: ButtonText; }
  html body input[type="checkbox"]::after { background: ButtonText; }
  html body input[type="checkbox"]:checked { background: Highlight; border-color: Highlight; }
  html body input[type="checkbox"]:checked::after { background: HighlightText; }
}
