/* Premium toggle for Bootstrap form-switch + custom-check */
.form-check.form-switch .form-check-input.custom-check {
  width: 2.8rem;
  height: 1.5rem;
  border-radius: 999px;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  --bs-form-switch-bg: none;
  background-image: none !important;
  background: linear-gradient(180deg, #ef6464 0%, #c63f3f 100%) !important;
  border: 1px solid rgba(91, 17, 17, 0.52) !important;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.18), inset 0 -2px 4px rgba(0, 0, 0, 0.34), 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.form-check.form-switch .form-check-input.custom-check::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.12rem;
  width: 1.16rem;
  height: 1.16rem;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 24%, #ffffff 0%, #eef4fb 48%, #dbe4ee 100%);
  border: 1px solid rgba(15, 23, 42, 0.16);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.72), 0 2px 4px rgba(0, 0, 0, 0.32);
  transform: translate(0, -50%);
  transition: transform .22s ease;
}

.form-check.form-switch .form-check-input.custom-check:checked {
  background: linear-gradient(180deg, #55cf84 0%, #239e56 100%) !important;
  border-color: rgba(16, 96, 49, 0.5) !important;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2), inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-check.form-switch .form-check-input.custom-check:checked::after {
  transform: translate(1.3rem, -50%);
}

.form-check.form-switch .form-check-input.custom-check:focus {
  outline: none;
  box-shadow: 0 0 0 0.16rem rgba(59, 130, 246, 0.24), inset 0 1px 2px rgba(255, 255, 255, 0.18), inset 0 -2px 4px rgba(0, 0, 0, 0.34);
}

/* Force the same new style in portal CTA toggles (email template editor). */
.form-check.form-switch.portal-cta-toggle .form-check-input.custom-check {
  width: 2.8rem !important;
  height: 1.5rem !important;
  border-radius: 999px !important;
  appearance: none;
  -webkit-appearance: none;
  --bs-form-switch-bg: none;
  background-image: none !important;
  background: linear-gradient(180deg, #ef6464 0%, #c63f3f 100%) !important;
  border: 1px solid rgba(91, 17, 17, 0.52) !important;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.18), inset 0 -2px 4px rgba(0, 0, 0, 0.34), 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.form-check.form-switch.portal-cta-toggle .form-check-input.custom-check::before {
  content: none !important;
}

.form-check.form-switch.portal-cta-toggle .form-check-input.custom-check::after {
  content: "";
  top: 50% !important;
  left: 0.12rem !important;
  width: 1.16rem !important;
  height: 1.16rem !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 32% 24%, #ffffff 0%, #eef4fb 48%, #dbe4ee 100%) !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.72), 0 2px 4px rgba(0, 0, 0, 0.32) !important;
  transform: translate(0, -50%) !important;
  transition: transform .22s ease !important;
}

.form-check.form-switch.portal-cta-toggle .form-check-input.custom-check:checked {
  background: linear-gradient(180deg, #55cf84 0%, #239e56 100%) !important;
  border-color: rgba(16, 96, 49, 0.5) !important;
}

.form-check.form-switch.portal-cta-toggle .form-check-input.custom-check:checked::after {
  transform: translate(1.3rem, -50%) !important;
}

.form-check.form-switch.portal-cta-toggle .form-check-input.custom-check:not(:checked) + .form-check-label {
  color: inherit !important;
}
