/* Toggle (shortcode) */
.cr-push-toggle-block {
  display: block;
  margin: 12px 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  clear: both;
}
.cr-push-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  user-select: none;
}
.cr-push-toggle-label {
  font-weight: 500;
  color: #222;
}

/* Switch — remplace l'apparence native de la checkbox
   (partagé par les toggles push et SMS) */
input.cr-push-toggle,
input.cr-sms-toggle {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 46px;
  height: 26px;
  background: #cfd5dd;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
  margin: 0;
  flex-shrink: 0;
  border: none;
  outline: none;
  vertical-align: middle;
}
input.cr-push-toggle::before,
input.cr-sms-toggle::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.22s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
input.cr-push-toggle:checked,
input.cr-sms-toggle:checked {
  background: #79c4b5;
}
input.cr-push-toggle:checked::before,
input.cr-sms-toggle:checked::before {
  transform: translateX(20px);
}
input.cr-push-toggle:disabled,
input.cr-sms-toggle:disabled {
  opacity: 0.6;
  cursor: wait;
}
input.cr-push-toggle:focus-visible,
input.cr-sms-toggle:focus-visible {
  outline: 2px solid #79c4b5;
  outline-offset: 2px;
}
.cr-push-toggle-status {
  font-size: 13px;
  color: #f18a48;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}
.cr-push-toggle-status:empty {
  display: none;
}
.cr-push-toggle-status.cr-push-ok {
  color: #2c8a4a;
}
.cr-push-toggle-status.cr-push-error {
  color: #c62828;
  max-width: 360px;
  font-size: 12px;
  line-height: 1.4;
}
.cr-push-toggle-status.cr-push-loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #f18a48;
  border-top-color: transparent;
  border-radius: 50%;
  animation: cr-push-spin .8s linear infinite;
  flex-shrink: 0;
}
@keyframes cr-push-spin { to { transform: rotate(360deg); } }

/* Auto-prompt modal */
#cr-push-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
#cr-push-modal .cr-push-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
#cr-push-modal .cr-push-modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 20px 22px;
  max-width: 380px;
  width: calc(100% - 32px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
#cr-push-modal h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
}
#cr-push-modal p {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #333;
  line-height: 1.45;
}
#cr-push-modal .cr-push-modal-error {
  color: #c62828;
  background: #fdeaea;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
#cr-push-modal .cr-push-modal-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
#cr-push-modal button {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
  cursor: pointer;
}
#cr-push-modal .cr-push-yes {
  background: #f18a48;
  color: #fff;
}
#cr-push-modal .cr-push-later {
  background: #eef1f6;
  color: #222;
}
#cr-push-modal .cr-push-no {
  background: transparent;
  color: #666;
}
