/* Progressive intake wizard layout — DS owns component visuals */

.peek-params-value:has(.peek-params-chip-list),
.hs-data-value:has(.peek-params-chip-list) {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.peek-params-chip-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hs-space-2, 8px);
  max-width: 100%;
}

html {
  height: 100%;
}

html,
body {
  overflow-x: hidden;
}

body.hs-touchpoint--public-form,
body.hs-touchpoint--app-embedded {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding: 0;
}

body.hs-touchpoint--public-form .page-shell,
body.hs-touchpoint--app-embedded .page-shell,
body.hs-touchpoint--app-embedded .page-shell--app-embedded {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: calc(var(--hs-layout-40, 160px) + 560px);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  margin-inline: auto;
}

.property-form,
#property-form,
#property-form.form-card {
  padding-bottom: 0;
  margin-bottom: 0;
  overflow-x: visible;
  overflow-y: visible;
}

#form-footer {
  position: relative;
  z-index: 30;
  pointer-events: auto;
  isolation: isolate;
  margin-top: var(--hs-space-4);
  margin-bottom: 0;
  padding:
    var(--hs-space-4)
    var(--hs-space-5)
    max(env(safe-area-inset-bottom, 0px), var(--hs-space-3));
  background: var(--hs-form-surface, #ffffff);
  border-top: 1px solid var(--hs-form-border-strong, #d8d4cc);
  border-radius: 0;
  overflow: visible;
}

#form-footer .footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--hs-space-3);
  pointer-events: auto;
  margin: 0;
  padding: 0;
  padding-top: 0;
  background: transparent;
}

#form-footer .form-submit-status {
  margin-top: var(--hs-space-2);
  padding-inline: 0;
}

#form-footer .footer-actions button {
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
}

#form-footer.is-welcome-mode .footer-actions {
  justify-content: flex-end;
}

.ui-topbar {
  min-height: var(--hs-space-9, 36px);
  margin-bottom: var(--hs-space-3, 12px);
}

.wizard-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  inline-size: 100%;
  width: 100%;
  min-height: 0;
  overflow: visible;
}

#property-form.form-card {
  flex: 1 1 auto;
  min-height: 0;
}

#ui-step-context.ui-step-context {
  --hs-step-arrow-outset: calc(var(--hs-space-12, 48px) + var(--space-4, 16px));

  display: grid;
  grid-template-columns: var(--hs-space-12, 48px) minmax(0, 1fr) var(--hs-space-12, 48px);
  align-items: center;
  column-gap: var(--space-4, 16px);
  width: calc(100% + (2 * var(--hs-step-arrow-outset)));
  max-width: none;
  margin-inline: calc(-1 * var(--hs-step-arrow-outset));
}

#ui-step-context-prev {
  grid-column: 1;
  grid-row: 1;
}

#ui-step-context-list {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  padding: var(--hs-space-1, 4px);
  padding-inline: var(--hs-space-1, 4px);
  scroll-padding-inline: var(--hs-space-1, 4px);
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--hs-form-radius-pill, 999px);
  background: var(--hs-form-subtle, var(--color-bg-subtle, #f7f7f5));
}

#ui-step-context-next {
  grid-column: 3;
  grid-row: 1;
}

#ui-step-context-prev,
#ui-step-context-next {
  z-index: 2;
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  transform: none;
  align-self: center;
  flex: initial;
}

.ui-step-context-arrow-button:has([class~="hs-icon"])::before {
  content: none;
  display: none;
}

.hs-question-card__index,
.field-title-index,
.field-index,
.question-index {
  display: none !important;
}

.field-card--consent .field-header {
  display: none;
}

.form-validation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hs-space-3);
  margin-bottom: var(--hs-space-3);
  padding: var(--hs-space-3);
  border: 1px solid color-mix(in srgb, var(--hs-color-danger, #dc2626) 24%, transparent);
  border-radius: var(--hs-radius-md, 12px);
  background: var(--color-danger-soft, var(--hs-color-danger-soft, #fef2f2));
  color: var(--hs-color-danger, #dc2626);
}

.form-validation-banner[hidden] {
  display: none !important;
}

.form-validation-banner__message {
  margin: 0;
  font-size: var(--hs-text-sm, 0.875rem);
  line-height: var(--hs-leading-normal, 1.4);
}

.step-section-intro {
  display: grid;
  gap: var(--hs-space-2, 8px);
  margin-bottom: var(--hs-space-4, 16px);
}

.step-section-intro__title {
  margin: 0;
  font-size: var(--hs-type-heading-sm-size, var(--hs-text-22, 1.375rem));
  line-height: var(--hs-leading-tight, 1.2);
}

.step-section-intro__description {
  margin: 0;
  color: var(--hs-color-muted, #7a746c);
  font-size: var(--hs-text-md, 1rem);
  line-height: var(--hs-leading-normal, 1.45);
}

.field-legend,
.field-hint {
  margin: 0;
  font-size: var(--hs-text-sm, 0.875rem);
  line-height: var(--hs-leading-normal, 1.45);
}

.field-legend {
  font-weight: var(--hs-weight-strong, 700);
}

.field-hint {
  color: var(--hs-color-muted, #7a746c);
}

.hs-inline-check {
  display: flex;
  align-items: flex-start;
  gap: var(--hs-space-2, 8px);
  margin-top: var(--hs-space-3, 12px);
}

.hs-inline-check__label {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--hs-space-2, 8px);
  cursor: pointer;
}

.hs-inline-check__text {
  font-size: var(--hs-text-md, 1rem);
  line-height: var(--hs-leading-normal, 1.45);
}

.hs-question-card .footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hs-space-3, 12px);
  margin-top: var(--hs-space-4, 16px);
}

.page-shell .form-card .hs-question-card {
  margin-bottom: 0;
}

.page-shell .form-card .hs-question-card + .hs-question-card,
.page-shell .form-card .step-section-intro + .hs-question-card {
  margin-top: var(--hs-space-4, 16px);
}

@media (max-width: 799px) {
  .page-shell {
    --hs-form-inline-gutter: var(--space-3, 12px);
  }

  .ui-topbar {
    min-height: var(--hs-space-8, 32px);
    margin-bottom: var(--hs-space-2, 8px);
    padding-inline: var(--hs-form-inline-gutter);
  }

  .ui-wizard-header {
    padding-inline: var(--hs-form-inline-gutter);
  }

  .form-surface {
    padding-inline: var(--hs-form-inline-gutter);
  }

  #form-footer {
    padding-inline: var(--hs-form-inline-gutter);
  }

  #ui-step-context.ui-step-context {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  #ui-step-context-list {
    grid-column: 1;
    padding: var(--hs-space-1, 4px);
    padding-inline: var(--hs-space-1, 4px);
    scroll-padding-inline: var(--hs-form-inline-gutter);
    border-radius: var(--hs-form-radius-pill, 999px);
    background: var(--hs-form-subtle, var(--color-bg-subtle, #f7f7f5));
  }

  #ui-step-context-prev,
  #ui-step-context-next {
    display: none !important;
  }

  #form-footer .footer-actions {
    width: 100%;
    justify-content: stretch;
    align-items: stretch;
  }

  #form-footer .footer-actions > * {
    flex: 1 1 0;
  }

  #form-footer.is-welcome-mode .footer-actions > *:not(.is-hidden) {
    flex: 1 1 0;
  }

  .field-title {
    font-size: var(--hs-type-heading-xs-size, var(--hs-text-18));
    line-height: var(--hs-leading-tight);
  }
}
