.dynamic-form {
  max-width: 70rem;
  margin: 0 auto;
  margin-bottom: 5rem;
}

.dynamic-form .callout {
  font-size: 1.4rem;
  padding: 1.5rem 2rem;
}

.dynamic-form__group {
  border-top: 1px solid var(--light-border-color);
  padding: 1.5rem 0;
}

.repeatable-section__content .dynamic-form__group {
  border-top: none;
  padding: 0;
  margin-top: 2rem;
}

.dynamic-form__input-container {}

.dynamic-form__required {}

.dynamic-form__field-label {
  font-size: var(--base-font-size);
  margin: 0;
}

.dynamic-form__field-description {
  margin: 0;
}

.dynamic-form__field_validation-hint {}

.dynamic-form__conditional-field-note {}

.dynamic-form textarea,
.dynamic-form input,
.dynamic-form select {
  width: 100%;
  margin-top: 0.5rem;
}

.dynamic-form__field-radio-group {
  display: block;
  margin-top: 1rem;
}
.dynamic-form__field-radio-group label {
  display: grid;
  grid-template-columns: 2rem 1fr;
  grid-column-gap: 1rem;
}

.dynamic-form__field-radio-group input[type=radio]{
  margin-top: 0;
}

/* Repeatable Sections */
.repeatable-sections {
  border: 2px solid var(--light-border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--light-bg-color);
}

.repeatable-section {
  border: 1px solid var(--light-border-color);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background-color: white;
  position: relative;
}

.repeatable-section--deleted {
  display: none;
}

.repeatable-section:last-child {
  margin-bottom: 0;
}

.repeatable-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--light-border-color);
}

.repeatable-section__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  color: var(--primary-color);
}

.repeatable-section__content {
  /* Content styling */
}

.repeatable-sections__add-button {
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid var(--light-border-color);
  margin-top: 1rem;
}

.repeatable-sections__add-button .btn {
  font-weight: 500;
}

/* Animation for new sections */
.repeatable-section {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.repeatable-section > div > h3:first-of-type { margin-top: 0rem; }
.dynamic-field { margin-bottom: 3rem; }
.dynamic-field h3 { line-height: 1.2; margin-bottom: 0.5rem; }
.dynamic-field h3 label { margin: 0; }

/* Fields flagged width: half (e.g. the KPI scorecard's Year + Month selects)
   sit side by side; two consecutive halves share one row. The inline-block
   whitespace between them provides the gutter. */
.dynamic-field--half { display: inline-block; width: 48%; vertical-align: top; }

/* Boolean fields render as a compact inline checkbox + label (no stacked
   heading), e.g. the KPI/monthly "this is regarding malts" flag. */
.checkbox-inline { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; cursor: pointer; }
.checkbox-inline .checkbox-input { width: auto; margin: 0; }

/* Pull "Add another" up tight under the repeatable entries (which carry the
   3rem field margin) and keep clear space before the next question. */
.repeatable-fields__add { margin-top: -1.5rem; margin-bottom: 3rem; }

/* Display-only content field: a section heading + intro text. */
.dynamic-form__section-heading { border-top: 2px solid var(--light-border-color); padding-top: 1.5rem; }
.dynamic-form__section-heading h3 { font-size: var(--base-font-size); font-weight: 700; line-height: 1.2; margin: 0 0 0.25rem; }
.dynamic-form__section-heading p { margin: 0; font-size: 13px; color: #555; }

.textarea-response p:first-of-type {
  margin-top: 0;
}
