/* Overrides webform.element.flexbox.css from who knows where */
.webform-flexbox {
  margin: 24px 0;
  @media (min-width: 768px) {
    display: flex;
    margin: 24px -0.5em;
  }
}

.webform-submission-form {
  h2, h3, h4, h5, h6 {
    color: var(--muted);
  }
}

.form-item--error-message {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 20px;
}

.form-checkbox.required:after {
  color: var(--color-red-500);
  content: "*";
  margin-left: 30px;
  font-size: 18px;
}

.webform-submission-form .required[type="checkbox"] {
  margin-right: 12px;
}

.form-item-certification {
  margin-bottom: 22px;
}

.webform-submission-form .fieldgroup {
  border-color: var(--form-border);
  border-style: solid;
  border-width: 1px;
  border-radius: 24px;
  position: relative;
  padding: 24px;
}

.webform-submission-form label {
  display: inline-block;
  letter-spacing: 0.08px;
}

.webform-type-textfield label,
.webform-type-select label,
.form-type-email label,
.webform-type-date label,
.webform-type-tel label,
.fieldset-legend,
.webform-type-radios > label {
  margin-bottom: 0.5em;
  line-height: 20px;
}

.form-type-radio .webform-submission-form label {
  display: inline-block;
  line-height: 28px;
  vertical-align: text-bottom;
  letter-spacing: 0.27px;
}

.webform-submission-form input[type="date"],
.webform-submission-form input[type="email"],
.webform-submission-form input[type="tel"],
.webform-submission-form input[type="text"],
.webform-submission-form select,
.webform-submission-form textarea {
  background-color: var(--primary);
  border: 1px solid var(--muted);
  border-radius: 8px;
  font-size: 18px;
  color: rgba(25, 25, 25, 1);
  padding: 16px;
}

.webform-submission-form input[type="date"],
.webform-submission-form input[type="email"],
.webform-submission-form input[type="tel"],
.webform-submission-form input[type="text"],
.webform-submission-form select {
  height: 56px;
}

.webform-submission-form div[data-webform-key="provide_your_shipping_details"] fieldset {
  border: none;
}

.webform-submission-form input[type="checkbox"],
.webform-submission-form input[type="radio"] {
  accent-color: var(--muted);
  height: 24px;
  width: 24px;
}

.webform-submission-form .webform-type-radios:not(:has(input:checked)) input[type="radio"].error {
  appearance: none;
  background-color: rgb(229, 195, 195);
  border: 1px solid var(--color-red-500);
  border-radius: 50%;
}

.webform-submission-form input[type="radio"] ~ label {
  font-size: 16px;
  line-height: var(--text-base--line-height);
  vertical-align: top;
  font-weight: 600;
}

.webform-submission-form .webform-type-radios:not(:has(input:checked)) input[type="radio"].error ~ label {
  color: var(--color-red-500);
}

.webform-submission-form .form-item-intro {
  background-color: rgba(231, 242, 246, 1);
  color: rgba(11, 90, 115, 1);
  padding: 1em 1.5em;
  position: relative;
  border-radius: 1em;
  margin-bottom: 1.5em;

  p:last-of-type {
    margin-bottom: 0;
  }
}

.webform-submission-form .message-item {
  border-radius: 12px;
  padding: .5em 1em;
  margin-bottom: 22px;
  font-size: var(--text-base);
  @media (min-width: 768px) {
    border-radius: 8px;
  }

  .message-body {
    font-size: var(--text-base);
  }
}

.webform-submission-form .button {
  background-color: var(--primary);
  border: 1px solid var(--primary-foreground);
  box-shadow: 4px 4px 0 0 var(--primary-foreground);
  color: var(--primary-foreground);
  font-weight: 600;
}

.webform-submission-form .button:hover {
  background-color: var(--muted-foreground);
}

.webform-submission-form .button:disabled {
  filter: opacity(0.5);
}

fieldset.webform-composite-hidden-title {
  margin: 1.5em auto;
  padding: 1.5em;
}

.webform-submission-form .webform-element-more {
  margin: 0.6em 0;
}

.webform-submission-form .webform-element-description {
  line-height: var(--text-lg--line-height);
  margin-top: 0;
}

.fieldset-wrapper .webform-element-description {
  /* color: green; */
  font-size: var(--text-lg);
  padding-right: 2em;
}

.webform-progress-tracker .progress-title[role="link"] {
  color: var(--muted);
}

.webform-progress-tracker .progress-step.is-active .progress-marker::before,
.webform-progress-tracker .progress-step.is-active:hover .progress-marker::before {
  background-color: var(--muted);
}

.webform-progress-tracker .progress-step.is-complete:hover .progress-marker[role="link"]::before {
  background: white;
}

.webform-progress-tracker .progress-title[role="link"]:hover,
.webform-progress-tracker .progress-title[role="link"]:focus {
  color: unset;
}

.webform-submission-form .form-item ::placeholder {
  color: rgba(134, 135, 138, 1);
}

:is(.form-item:focus-within,.fieldgroup:focus-within) .fieldset-legend {
  color: var(--foreground);
}

:is(.form-item:focus-within,.fieldgroup:focus-within)>input,
:is(.form-item:focus-within,.fieldgroup:focus-within)>select,
:is(.form-item:focus-within,.fieldgroup:focus-within)>div>textarea {
  border-color: var(--border);
}

.required .required-item::after {
  color: var(--color-red-500);
  content: "*";
  display: inline-block;
  margin-inline: 0.15em;
  margin-left: 0;
  margin-right: calc(var(--spacing)*1);
}

fieldset:not(.webform-type-fieldset) .fieldset-wrapper {
  padding: 0;
}

.webform-type-checkbox.fieldgroup .description {
  max-width: calc(98% - 40px);
  margin: 0;
  padding-top: 0;
}

.nested-term-parent-wrapper.disabled {
  filter: grayscale(1);
  opacity: 0.5;
}

.nested-term-parent-wrapper:has(.nested-term-select-parent-checkbox:checked),
.nested-term-parent-wrapper:has(.nested-term-select-parent-radio:checked) {
  border-color: rgba(125, 65, 116, 1);
  border-width: 2px;
  padding-bottom: 14px;
}

.webform-submission-form .progress-tracker {
  margin: 8px 0 32px;

  @media (min-width: 768px) {
    margin-top: 44px;
  }
}

.webform-progress-tracker.progress-tracker .progress-marker::after {
  background-color: rgba(204, 196, 182, 1);
  height: 2px;
  top: 15px;
}

.webform-progress-tracker.progress-tracker .progress-step .progress-text {
  color: rgba(123, 117, 106, 1);
  font-size: var(--text-sm);
  display: block;

  @media (min-width: 768px) {
    font-size: var(--text-base);
  }
}

.webform-progress-tracker.progress-tracker .progress-step .progress-marker::before {
  background: white;
  border: 2px solid rgba(204, 196, 182, 1);
  color: rgba(123, 117, 106, 1);
  height: 32px;
  padding-bottom: 0;
  width: 32px;
  font-size: 18px;
}

.webform-progress-tracker.progress-tracker .progress-step:hover .progress-marker::before {
  background-color: rgba(211, 211, 211, 1);
}

.webform-progress-tracker.progress-tracker .progress-step.is-complete .progress-marker::before {
  background: white;
  border: 2px solid rgba(76, 40, 71, 1);
  color: rgba(76, 40, 71, 1);
}

.webform-progress-tracker.progress-tracker .progress-step.is-active .progress-marker::before {
  background-color: rgba(76, 40, 71, 1);
  border: none;
  color: white;
}

.webform-progress-tracker.progress-tracker .progress-step.is-complete .progress-market::after {
  background-color: rgba(76, 40, 71, 1);
}

.webform-progress-tracker.progress-tracker .progress-step.is-complete .progress-text {
  color: rgba(88, 46, 81, 1);
}

.webform-progress-tracker.progress-tracker .progress-step.is-active .progress-text {
  color: rgba(76, 40, 71, 1);
  font-weight: 600;
}

.webform-preview .webform-container-type-details {
  border-color: var(--form-border);
  border-radius: 16px;
  border-style: solid;
  border-width: 1px;
  margin-bottom: 2em;
  padding: 1em 6em 1em 1em;
  position: relative;
}

.webform-preview .webform-container-type-details summary {
  color: var(--muted);
  display: block;
  font-size: var(--text-3xl);
  margin-bottom: 0.5em;
}

.webform-preview .webform-container-type-details .webform-wizard-page-edit {
  position: absolute;
  right: 1em;
  top: 1em;
}

.webform-submission-form .check-for-yes .fieldset-wrapper:has(input[value="Yes"]:checked)::after,
.webform-submission-form .check-for-no .fieldset-wrapper:has(input[value="No"]:checked)::after {
  background: rgba(29, 134, 51, 1);
  border-radius: 50%;
  color: white;
  content: "✓";
  position: absolute;
  top: 26px;
  right: 30px;
  text-align: center;
  width: 24px;
}

.webform-submission-form .webform-options-display-side-by-side > div {
  margin-right: 40px;
}

.webform-submission-form .webform-actions {
  display: flex;
  justify-content: end;

  .button {
    min-width: 150px;
    height: 56px;
    @media (max-width: 767px) {
      width: 100%;
    }
  }
}

.webform-submission-form .enrollment-warning {
  background: rgba(212, 13, 48, 1);
  color: white;
  padding-left: 3em;
  position: relative;
}

.webform-submission-form .enrollment-warning::before {
  content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="32" height="32" fill="white" aria-hidden="true"><path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"></path></svg>');
  left: 0.5em;
  position: absolute;
  top: calc(50% - 20px);
  vertical-align: middle;
}

.webform-submission-data details summary {
  font-family: var(--font-family-heading);
  font-size: 32px;
  color: var(--accent);
}

/* Page Specific Corrections */

.confirm-eligibility-view {
  .webform-submission-form .fieldgroup,
  .webform-submission-form .webform-type-checkbox.fieldgroup {
    padding: 1.5em;
    margin: 1.5em auto;
  }
  .webform-element-description {
    font-size: var(--text-lg);
    padding: 0 2em 16px 0;
  }
  .webform-type-checkbox label {
    position: absolute;
    left: 56px;
    top: 24px;
    right: 40px;
    bottom: 16px;
    text-indent: -999em;
    cursor: text;
  }
  a {
    position: relative;
    z-index: 10;
  }
  .webform-type-checkbox .webform-element-description {
    padding: 0;
  }
}

.product-compact-column-2 {
  h2, h3, h4, h5, h6 {
   color: var(--foreground);
  }
}
.personalize-package-view {
  .term--products {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    color: var(--foreground);
  }
}

.shipping-details-view {
  .stacked-radio-options .form-radio {
    min-width: 24px;
  }
  input[type="radio"] ~ label {
    text-wrap: auto;
    font-weight: 400;
  }

  .fieldgroup.form-type-checkbox {
    flex-wrap: wrap;
    border-radius: 0;
    margin-bottom: 24px;
    label {
      position: absolute;
      left: 40px;
      top: 0;
      right: 0;
      bottom: 0;
      text-indent: -999em;
      cursor: text;
    }
    a {
      position: relative;
      z-index: 10;
    }
    .description p {
      font-size: 18px;
      color: var(--muted);
    }
    .form-item--error-message {
      margin: 0 0 0 44px;
    }
  }
  .small-description p {
    color: rgba(93, 94, 96, 1);
    font-size: 12px;
  }
  .fieldgroup.form-item-caregiver .form-item {
    display: flex;
    flex-direction: column;
    label {
      margin-bottom: 0;
    }
    input {
      order: 2;
    }
    .description {
      order: 1;
      margin-bottom: 6px;
    }
    .error {
      order: 4;
    }
  }
  .digital-signature-fieldgroup {
    label {
      margin: 0;
    }
    .description {
      margin-bottom: 6px;
    }
  } 
}

.form-item label:has(+ .description + input) {
  margin-bottom: 0;
}

.form-item label + .description:has(+ input) {
  margin-bottom: 6px;
}

.webform-submission-form .form-item:has(label + .description + input) + .error.form-item--error-message {
  margin-top: 8px;
}

.webform-submission-form .webform-flexbox > .webform-flex ~ .webform-flex {
  @media (max-width: 767px) {
    margin-top: 1.5em;
  }
}