/* CG_ACCOUNT_CHOICE_CHECKBOX_FIX_V1 */

/*
  Scoped fix only for:
  - Newsletter: #is_subscribed
  - Support-team login: #assistance_allowed_checkbox
  - Remember me: #remember-me-box input[name="persistent_remember_me"]
*/

html body.customer-account-create form#form-validate .field.choice.newsletter,
html body.customer-account-create form.form-create-account .field.choice.newsletter,
html body.customer-account-create form#form-validate .field.choice.cg-assistance-choice-fixed,
html body.customer-account-create form.form-create-account .field.choice.cg-assistance-choice-fixed,
html body.customer-account-create form#form-validate #remember-me-box.field.choice.persistent,
html body.customer-account-create form.form-create-account #remember-me-box.field.choice.persistent {
  align-items: start !important;
  background:
    linear-gradient(135deg, rgba(45, 51, 127, .045), rgba(212, 175, 55, .10)) !important;
  border: 1px solid rgba(45, 51, 127, .13) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(31, 35, 71, .055) !important;
  box-sizing: border-box !important;
  clear: both !important;
  display: grid !important;
  float: none !important;
  gap: 10px 12px !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: 28px minmax(0, 1fr) !important;
  margin: 0 0 18px !important;
  max-width: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding: 16px 18px !important;
  position: relative !important;
  transform: none !important;
  width: 100% !important;
}

/* Real input: accessible/clickable overlay over the visible fake box. */
html body.customer-account-create form#form-validate #is_subscribed,
html body.customer-account-create form.form-create-account #is_subscribed,
html body.customer-account-create form#form-validate #assistance_allowed_checkbox,
html body.customer-account-create form.form-create-account #assistance_allowed_checkbox,
html body.customer-account-create form#form-validate #remember-me-box input[name="persistent_remember_me"],
html body.customer-account-create form.form-create-account #remember-me-box input[name="persistent_remember_me"] {
  -webkit-appearance: checkbox !important;
  appearance: checkbox !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  clip: auto !important;
  -webkit-clip-path: none !important;
  clip-path: none !important;
  cursor: pointer !important;
  display: block !important;
  float: none !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  height: 24px !important;
  left: 18px !important;
  margin: 0 !important;
  max-height: 24px !important;
  max-width: 24px !important;
  min-height: 24px !important;
  min-width: 24px !important;
  opacity: 0 !important;
  outline: none !important;
  overflow: visible !important;
  padding: 0 !important;
  pointer-events: auto !important;
  position: absolute !important;
  right: auto !important;
  top: 16px !important;
  transform: none !important;
  visibility: visible !important;
  white-space: normal !important;
  width: 24px !important;
  z-index: 5 !important;
}

/* Visible label row. */
html body.customer-account-create form#form-validate label[for="is_subscribed"],
html body.customer-account-create form.form-create-account label[for="is_subscribed"],
html body.customer-account-create form#form-validate label[for="assistance_allowed_checkbox"],
html body.customer-account-create form.form-create-account label[for="assistance_allowed_checkbox"],
html body.customer-account-create form#form-validate #remember-me-box input[name="persistent_remember_me"] + label.label,
html body.customer-account-create form.form-create-account #remember-me-box input[name="persistent_remember_me"] + label.label {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  clear: none !important;
  color: #2d337f !important;
  cursor: pointer !important;
  display: block !important;
  float: none !important;
  font-family: var(--cg-font, "Inter", "Helvetica Neue", sans-serif) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  height: auto !important;
  letter-spacing: 0 !important;
  line-height: 1.45 !important;
  margin: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  opacity: 1 !important;
  overflow: visible !important;
  padding: 0 !important;
  position: static !important;
  text-align: left !important;
  text-transform: none !important;
  transform: none !important;
  user-select: none !important;
  vertical-align: top !important;
  white-space: normal !important;
  width: 100% !important;
}

/* Override broad .field.choice .label::before. */
html body.customer-account-create form#form-validate label[for="is_subscribed"]::before,
html body.customer-account-create form.form-create-account label[for="is_subscribed"]::before,
html body.customer-account-create form#form-validate label[for="assistance_allowed_checkbox"]::before,
html body.customer-account-create form.form-create-account label[for="assistance_allowed_checkbox"]::before,
html body.customer-account-create form#form-validate #remember-me-box input[name="persistent_remember_me"] + label.label::before,
html body.customer-account-create form.form-create-account #remember-me-box input[name="persistent_remember_me"] + label.label::before {
  background: #fff !important;
  border: 2px solid #2d337f !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05) inset !important;
  box-sizing: border-box !important;
  content: "" !important;
  display: block !important;
  float: none !important;
  height: 22px !important;
  left: 18px !important;
  margin: 0 !important;
  min-height: 22px !important;
  min-width: 22px !important;
  opacity: 1 !important;
  padding: 0 !important;
  position: absolute !important;
  top: 17px !important;
  transform: none !important;
  width: 22px !important;
  z-index: 2 !important;
}

/* Checked state. */
html body.customer-account-create form#form-validate #is_subscribed:checked + label[for="is_subscribed"]::before,
html body.customer-account-create form.form-create-account #is_subscribed:checked + label[for="is_subscribed"]::before,
html body.customer-account-create form#form-validate #assistance_allowed_checkbox:checked + label[for="assistance_allowed_checkbox"]::before,
html body.customer-account-create form.form-create-account #assistance_allowed_checkbox:checked + label[for="assistance_allowed_checkbox"]::before,
html body.customer-account-create form#form-validate #remember-me-box input[name="persistent_remember_me"]:checked + label.label::before,
html body.customer-account-create form.form-create-account #remember-me-box input[name="persistent_remember_me"]:checked + label.label::before {
  background:
    #b89b65
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 10.5 8 14.5 16 6'/%3E%3C/svg%3E")
    center / 72% 72%
    no-repeat !important;
  border-color: #b89b65 !important;
}

/* Focus state. */
html body.customer-account-create form#form-validate #is_subscribed:focus-visible + label[for="is_subscribed"]::before,
html body.customer-account-create form.form-create-account #is_subscribed:focus-visible + label[for="is_subscribed"]::before,
html body.customer-account-create form#form-validate #assistance_allowed_checkbox:focus-visible + label[for="assistance_allowed_checkbox"]::before,
html body.customer-account-create form.form-create-account #assistance_allowed_checkbox:focus-visible + label[for="assistance_allowed_checkbox"]::before,
html body.customer-account-create form#form-validate #remember-me-box input[name="persistent_remember_me"]:focus-visible + label.label::before,
html body.customer-account-create form.form-create-account #remember-me-box input[name="persistent_remember_me"]:focus-visible + label.label::before {
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, .25),
    0 1px 3px rgba(0, 0, 0, .05) inset !important;
}

/* Kill any old after-checkmark from generic checkbox CSS. */
html body.customer-account-create form#form-validate label[for="is_subscribed"]::after,
html body.customer-account-create form.form-create-account label[for="is_subscribed"]::after,
html body.customer-account-create form#form-validate label[for="assistance_allowed_checkbox"]::after,
html body.customer-account-create form.form-create-account label[for="assistance_allowed_checkbox"]::after,
html body.customer-account-create form#form-validate #remember-me-box input[name="persistent_remember_me"] + label.label::after,
html body.customer-account-create form.form-create-account #remember-me-box input[name="persistent_remember_me"] + label.label::after {
  content: none !important;
  display: none !important;
}

/* Notes under assistance and remember me. */
html body.customer-account-create form#form-validate .field.choice.cg-assistance-choice-fixed .note,
html body.customer-account-create form.form-create-account .field.choice.cg-assistance-choice-fixed .note,
html body.customer-account-create form#form-validate #remember-me-box.field.choice.persistent .note,
html body.customer-account-create form.form-create-account #remember-me-box.field.choice.persistent .note {
  background: rgba(255, 255, 255, .82) !important;
  border: 1px solid rgba(45, 51, 127, .10) !important;
  border-left: 4px solid #b89b65 !important;
  border-radius: 14px !important;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, .05) inset,
    0 4px 12px rgba(0, 0, 0, .06) !important;
  box-sizing: border-box !important;
  color: rgba(31, 35, 71, .78) !important;
  display: block !important;
  float: none !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  grid-column: 2 !important;
  line-height: 1.55 !important;
  margin: 8px 0 0 !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 11px 14px !important;
  position: static !important;
  transform: none !important;
  width: 100% !important;
}

/* Validation stays attached to the specific row. */
html body.customer-account-create form#form-validate .field.choice.newsletter .mage-error,
html body.customer-account-create form.form-create-account .field.choice.newsletter .mage-error,
html body.customer-account-create form#form-validate .field.choice.cg-assistance-choice-fixed .mage-error,
html body.customer-account-create form.form-create-account .field.choice.cg-assistance-choice-fixed .mage-error,
html body.customer-account-create form#form-validate #remember-me-box .mage-error,
html body.customer-account-create form.form-create-account #remember-me-box .mage-error {
  color: #b3261e !important;
  display: block !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  grid-column: 2 !important;
  line-height: 1.45 !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  position: static !important;
  white-space: normal !important;
}

/* Hidden support-team login field should stay hidden. */
html body.customer-account-create form#form-validate input[name="assistance_allowed"][type="hidden"],
html body.customer-account-create form.form-create-account input[name="assistance_allowed"][type="hidden"] {
  display: none !important;
}

/* Mobile */
@media (max-width: 600px) {
  html body.customer-account-create form#form-validate .field.choice.newsletter,
  html body.customer-account-create form.form-create-account .field.choice.newsletter,
  html body.customer-account-create form#form-validate .field.choice.cg-assistance-choice-fixed,
  html body.customer-account-create form.form-create-account .field.choice.cg-assistance-choice-fixed,
  html body.customer-account-create form#form-validate #remember-me-box.field.choice.persistent,
  html body.customer-account-create form.form-create-account #remember-me-box.field.choice.persistent {
    border-radius: 16px !important;
    padding: 14px 15px !important;
  }

  html body.customer-account-create form#form-validate label[for="is_subscribed"]::before,
  html body.customer-account-create form.form-create-account label[for="is_subscribed"]::before,
  html body.customer-account-create form#form-validate label[for="assistance_allowed_checkbox"]::before,
  html body.customer-account-create form.form-create-account label[for="assistance_allowed_checkbox"]::before,
  html body.customer-account-create form#form-validate #remember-me-box input[name="persistent_remember_me"] + label.label::before,
  html body.customer-account-create form.form-create-account #remember-me-box input[name="persistent_remember_me"] + label.label::before {
    left: 15px !important;
    top: 15px !important;
  }

  html body.customer-account-create form#form-validate #is_subscribed,
  html body.customer-account-create form.form-create-account #is_subscribed,
  html body.customer-account-create form#form-validate #assistance_allowed_checkbox,
  html body.customer-account-create form.form-create-account #assistance_allowed_checkbox,
  html body.customer-account-create form#form-validate #remember-me-box input[name="persistent_remember_me"],
  html body.customer-account-create form.form-create-account #remember-me-box input[name="persistent_remember_me"] {
    left: 15px !important;
    top: 14px !important;
  }
}
