:root {
  --bg-page: #f1f1f2;
  --text-primary: #1b2a33;
  --text-secondary: #49555c;
  --border-default: #bbbfc2;
  --focus-border: #2c3f4c;
  --brand-primary: #a6192e;
  --brand-primary-hover: #881325;
  --focus-ring: #6d8795;
  --white: #ffffff;
  --control-radius: 4px;
  --control-height: 40px;
  --content-max-width: 726px;
}

* {
  box-sizing: border-box;
}

html {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 16px !important;
  padding: 16px !important;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: Arial, Helvetica, sans-serif;
  max-width: 100% !important;
}

@media (min-width: 1024px) {
  body {
    padding: 48px;
  }
}

.box {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 28px;
  line-height: 32px;
  letter-spacing: -0.5px;
  font-weight: 700;
}

select:focus {
  outline: none;
  border-color: var(--focus-border) !important;
  border-width: 2px !important;
}

.subheading {
  color: var(--text-secondary, #49555c);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 28px;
}

.subtitle {
  margin: 6px 0 16px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
}

form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 auto;
  padding: 0;
  max-width: var(--content-max-width);
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
}

.field-block:has(> input[type="checkbox"]) {
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
}

.field-block > input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 2px 0 0;
}

.field-block > input[type="checkbox"] + label {
  margin: 0;
}

.field-block > label.required {
  position: static;
  margin: 0;
  padding: 0;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

input,
textarea,
button {
  font-family: Arial, Helvetica, sans-serif;
}

.required-note {
  color: var(--text-secondary, #49555c);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
}
.stylingblock-content-wrapper .popover .popover-content {
  font-size: 12px !important;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid #49555c;
  border-radius: 0;
  background: var(--bg-page);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input[type="checkbox"]:checked {
  border-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 3H3V21H21V3ZM10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z' fill='%23A6192E'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 150% 150%;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--control-radius);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
}

.field-block > input[type="text"],
.field-block > input[type="email"],
.field-block > input[type="tel"] {
  height: var(--control-height);
  padding: 10px 14px;
}

form label {
  color: var(--text-secondary, #49555c);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
}

/* Salesforce SmartCapture form layout (Lead-Form markup) */
.layout-canvas-g {
  max-width: var(--content-max-width);
  margin: 0 auto;
  background-color: transparent !important;
}

.layout-canvas-g > .section {
  margin: 0;
}

.layout-canvas-g .stylingblock-content-wrapper {
  width: 100%;
}

.layout-canvas-g .camarker-inner {
  padding: 0;
}

form[id^="smartcapture-block-"] {
  gap: 0;
}

form[id^="smartcapture-block-"] .smartcapture-controls {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 24px !important;
}

form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  ),
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select) {
  position: relative;
  gap: 0;
}

form[id^="smartcapture-block-"] .sc-formfield-label {
  margin: 0;
  padding: 0;
}

form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  )
  .sc-formfield-label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select)
  .sc-formfield-label {
  position: absolute;
  left: 12px;
  top: calc((var(--control-height) / 2) + 1px);
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

form[id^="smartcapture-block-"] .sc-formfield-label label,
form[id^="smartcapture-block-"] .sc-formfield-input > label {
  margin: 0;
  padding: 0;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  )
  .sc-formfield-label
  label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select)
  .sc-formfield-label
  label {
  display: inline-block;
  padding: 0 4px;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 20px;
  transition:
    top 120ms ease,
    transform 120ms ease,
    color 120ms ease;
}

form[id^="smartcapture-block-"] .sc-formfield-input {
  width: 100%;
}

form[id^="smartcapture-block-"] input[type="text"],
form[id^="smartcapture-block-"] input[type="email"],
form[id^="smartcapture-block-"] input[type="number"],
form[id^="smartcapture-block-"] select {
  width: 100% !important;
  height: var(--control-height) !important;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--control-radius);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
}

form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  )
  input[type="text"],
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  )
  input[type="email"],
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  )
  input[type="number"],
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select)
  input[type="text"],
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select)
  input[type="email"],
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select)
  input[type="number"],
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select)
  select {
  padding: 12px 14px 8px;
}

form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select)
  select {
  padding: 10px 36px 6px 14px;
}

form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  ):focus-within
  .sc-formfield-label,
form[id^="smartcapture-block-"]
  .smartcapture-controls.has-value:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  )
  .sc-formfield-label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  ):has(> .sc-formfield-input > input[required]:valid)
  .sc-formfield-label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  ):has(> .sc-formfield-input > input:-webkit-autofill)
  .sc-formfield-label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select):focus-within
  .sc-formfield-label,
form[id^="smartcapture-block-"]
  .smartcapture-controls.has-value:has(> .sc-formfield-input > select)
  .sc-formfield-label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select):has(
    > .sc-formfield-input > select[required]:valid
  )
  .sc-formfield-label {
  top: 0;
  transform: translateY(-50%);
  font-size: 12px !important;
  color: #49555c !important;
}

form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  ):focus-within
  .sc-formfield-label
  label,
form[id^="smartcapture-block-"]
  .smartcapture-controls.has-value:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  )
  .sc-formfield-label
  label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  ):has(> .sc-formfield-input > input[required]:valid)
  .sc-formfield-label
  label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(
    > .sc-formfield-input > input:not([type="checkbox"]):not([type="radio"])
  ):has(> .sc-formfield-input > input:-webkit-autofill)
  .sc-formfield-label
  label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select):focus-within
  .sc-formfield-label
  label,
form[id^="smartcapture-block-"]
  .smartcapture-controls.has-value:has(> .sc-formfield-input > select)
  .sc-formfield-label
  label,
form[id^="smartcapture-block-"]
  .smartcapture-controls:has(> .sc-formfield-input > select):has(
    > .sc-formfield-input > select[required]:valid
  )
  .sc-formfield-label
  label {
  font-size: 12px !important;
  color: #49555c !important;
  line-height: 16px;
}

form[id^="smartcapture-block-"] select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.06 0L4 3.05333L0.94 0L0 0.94L4 4.94L8 0.94L7.06 0Z' fill='%231B2A33' fill-opacity='0.65'/%3E%3C/svg%3E");
  background-position: calc(100% - 12px) 50%;
  background-size: 8px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

form[id^="smartcapture-block-"] .sc-formfield-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

form[id^="smartcapture-block-"]
  .sc-formfield-input
  > label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  margin: 0;
  color: var(--text-secondary, #49555c);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
}

form[id^="smartcapture-block-"]
  .sc-formfield-input
  > label
  input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 2px 0 0;
}

form[id^="smartcapture-block-"] .smartcapture-submit-button-wrapper {
  padding-bottom: 0 !important;
}

form[id^="smartcapture-block-"] .sc-button,
form[id^="smartcapture-block-"] button[type="submit"] {
  margin-top: 6px;
  width: 111px;
  min-height: 40px;
  padding: 10px 18px;
  border: 0;
  border-radius: 0;
  background: var(--brand-primary) !important;
  color: var(--white) !important;
  font-size: 16px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

form[id^="smartcapture-block-"] .sc-button:hover,
form[id^="smartcapture-block-"] button[type="submit"]:hover {
  background: var(--brand-primary-hover) !important;
}

form[id^="smartcapture-block-"] .sc-button:focus-visible,
form[id^="smartcapture-block-"] button[type="submit"]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

form[id^="smartcapture-block-"] .has-error input,
form[id^="smartcapture-block-"] .has-error select,
form[id^="smartcapture-block-"] [aria-invalid="true"] {
  border-color: #e22121;
}

form[id^="smartcapture-block-"] .smartcapture-controls:has(.popover) label {
  color: #e22121 !important;
}

form[id^="smartcapture-block-"] .sc-formfield-input:has(> .popover) > input,
form[id^="smartcapture-block-"] .sc-formfield-input:has(> .popover) > textarea,
form[id^="smartcapture-block-"] .sc-formfield-input:has(> .popover) > select {
  border-width: 2px !important;
  border-color: #e22121 !important;
}

a {
  color: var(--text-secondary, #49555c);
  text-decoration: underline;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
}
a:hover {
  text-decoration: none;
}

textarea {
  min-height: 120px;
  padding: 10px 12px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--focus-border) !important;
  border-width: 2px !important;
  outline: none;
  box-shadow: none;
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
}

button[type="submit"] {
  margin-top: 6px;
  width: 111px;
  min-height: 40px;
  padding: 10px 18px;
  border: 0;
  border-radius: 0;
  background: var(--brand-primary);
  color: var(--white);
  font-size: 16px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: var(--brand-primary-hover);
}

button[type="submit"]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 800px) {
  body {
    padding: 14px;
  }

  h1 {
    font-size: 24px;
    line-height: 28px;
  }

  .subtitle,
  .field-block > label.required,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    font-size: 18px;
  }

  .field-block > input[type="text"],
  .field-block > input[type="email"],
  .field-block > input[type="tel"] {
    height: 38px;
  }

  form[id^="smartcapture-block-"] input[type="text"],
  form[id^="smartcapture-block-"] input[type="email"],
  form[id^="smartcapture-block-"] input[type="number"],
  form[id^="smartcapture-block-"] select,
  form[id^="smartcapture-block-"] .sc-formfield-label label,
  form[id^="smartcapture-block-"] .sc-formfield-input > label {
    font-size: 14px;
  }

  form[id^="smartcapture-block-"] input[type="text"],
  form[id^="smartcapture-block-"] input[type="email"],
  form[id^="smartcapture-block-"] input[type="number"],
  form[id^="smartcapture-block-"] select {
    height: 38px;
  }

  form[id^="smartcapture-block-"] .sc-button,
  form[id^="smartcapture-block-"] button[type="submit"] {
    width: 100%;
    min-height: 40px;
  }

  button[type="submit"] {
    width: 100%;
    min-height: 40px;
  }
}
