/* Clear visual hierarchy and control states for the public coach-search form. */
.index-landing .flow-card--goal {
  position: relative;
}

/* Keep the guidance line optically centered between the heading and the field. */
.index-landing .flow-card--goal .flow-card__header {
  margin-bottom: 12px;
}

.index-landing .flow-card--goal .flow-card__body {
  gap: 12px;
}

.index-landing .flow-card--goal .feedback-message {
  min-height: 0;
}

/* Give the collaboration controls the same breathing room before the card
   separator that the taller filter controls get optically. */
.index-landing #guidedStepFormatBody {
  padding-bottom: 10px;
}

.index-landing .flow-card--goal #client_goal {
  padding: 14px 16px;
  text-align: left;
  background: rgba(247, 251, 248, 0.96);
  border: 1.5px solid rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.38);
  box-shadow: 0 5px 14px rgba(32, 48, 41, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.index-landing .flow-card--goal #client_goal::placeholder {
  color: rgba(32, 48, 41, 0.58);
  text-align: left;
}

.index-landing .flow-card--goal #client_goal:hover {
  border-color: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.56);
}

.index-landing .flow-card--goal #client_goal:focus {
  outline: none;
  background: #fff;
  border-color: var(--app-color-primary, #365945);
  box-shadow: 0 0 0 4px rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.13),
    0 8px 18px rgba(32, 48, 41, 0.08);
}

.index-landing .guided-search__advanced-toggle {
  margin-top: 4px;
  border-radius: 12px;
  background: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.035);
}

.index-landing .guided-search__advanced-toggle:hover {
  background: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.075);
}

/* Separators belong only between the three advanced filter groups. */
.index-landing .flow-card--goal,
.index-landing .guided-search__advanced-toggle,
.index-landing .flow-card--budget {
  border-bottom: 0;
}

/* Selection pills: the selected state must be unmistakable at a glance. */
.index-landing .flow-card {
  --filter-pill-bg: #fff;
  --filter-pill-bg-hover: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.07);
  --filter-pill-bg-selected: var(--app-color-primary, #365945);
  --filter-pill-border: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.25);
  --filter-pill-border-hover: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.48);
  --filter-pill-border-selected: var(--app-color-primary, #365945);
  --filter-pill-text: rgba(32, 48, 41, 0.94);
  --filter-pill-text-selected: #fff;
}

.index-landing .flow-card .button-group button {
  border-width: 1.5px;
  font-weight: 600;
}

.index-landing .flow-card .button-group button.active {
  background: var(--filter-pill-bg-selected) !important;
  border-color: var(--filter-pill-border-selected) !important;
  color: var(--filter-pill-text-selected) !important;
  box-shadow: 0 4px 10px rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.2);
}

/* Text fields and their inline actions form one clear interaction unit. */
.index-landing .flow-card .location-input-shell,
.index-landing .flow-card .availability-input-shell {
  min-height: 46px;
  border-width: 1.5px;
  border-color: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.34);
  background: rgba(247, 251, 248, 0.88);
}

.index-landing .flow-card .location-input-shell:hover,
.index-landing .flow-card .availability-input-shell:hover {
  border-color: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.52);
}

.index-landing .flow-card .location-input-shell:focus-within,
.index-landing .flow-card .availability-input-shell:focus-within {
  border-color: var(--app-color-primary, #365945);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.12);
}

.index-landing .input-shell .field-input::placeholder {
  color: var(--app-color-primary, #365945);
  font-weight: 400;
  opacity: 0.82;
}

.index-landing .flow-card .location-input-shell[data-state="required"] .field-input::placeholder,
.index-landing .flow-card .availability-input-shell .field-input::placeholder {
  color: var(--app-color-primary, #365945);
  font-weight: 400;
  opacity: 0.82;
}

.index-landing .flow-card .location-input-shell:has(.field-input:placeholder-shown):not([data-state="error"]),
.index-landing .flow-card .availability-input-shell:has(.field-input:placeholder-shown) {
  border-color: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.52);
  background: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.025);
  box-shadow: 0 0 0 3px rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.08);
}

.index-landing .input-shell .apply-btn {
  min-height: 34px;
  border-color: var(--app-color-primary, #365945);
  background: var(--app-color-primary, #365945);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.18);
}

.index-landing .input-shell .apply-btn:not(:disabled):hover,
.index-landing .input-shell .apply-btn:not(:disabled):focus-visible {
  border-color: var(--app-color-primary-hover, #2d4a39);
  background: var(--app-color-primary-hover, #2d4a39);
  color: #fff;
}

.index-landing .input-shell .apply-btn:disabled {
  border-color: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.18);
  background: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.09);
  color: rgba(42, 70, 54, 0.5);
  box-shadow: none;
  opacity: 1;
}

/* Keep the composer at the same offset before and after the first chip appears. */
.index-landing #availabilityControls.availability-rule-builder.is-composer-open {
  margin-top: 0;
}

/* Round handles read as draggable controls; the filled rail shows progress. */
.index-landing #radiusSlider,
.index-landing #budgetSlider {
  margin-top: 12px;
  margin-bottom: 12px;
}

.index-landing #radiusSlider.noUi-horizontal,
.index-landing #budgetSlider.noUi-horizontal {
  height: 8px !important;
  border: 0;
  border-radius: 999px;
  background: rgba(var(--app-color-primary-rgb, 54, 89, 69), 0.14);
  box-shadow: inset 0 1px 2px rgba(32, 48, 41, 0.1);
}

.index-landing #radiusSlider .noUi-connect,
.index-landing #budgetSlider .noUi-connect {
  border-radius: 999px;
  background: var(--app-color-primary, #365945) !important;
}

.index-landing #radiusSlider .noUi-handle,
.index-landing #budgetSlider .noUi-handle {
  width: 26px !important;
  height: 26px !important;
  right: -13px !important;
  top: -9px !important;
  border: 3px solid var(--app-color-primary, #365945) !important;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 9px rgba(32, 48, 41, 0.22);
  cursor: grab;
}

.index-landing #radiusSlider .noUi-handle:active,
.index-landing #budgetSlider .noUi-handle:active {
  cursor: grabbing;
  background: rgba(232, 241, 235, 1);
}

.index-landing #radiusSlider .noUi-handle::before,
.index-landing #radiusSlider .noUi-handle::after,
.index-landing #budgetSlider .noUi-handle::before,
.index-landing #budgetSlider .noUi-handle::after {
  display: none;
}

.index-landing #radiusWrapper > label {
  font-weight: 700;
}

@media (max-width: 560px) {
  /* Keep the availability header in the same grid for every summary value.
     Otherwise the first pill switches it back to the floated mobile layout. */
  .index-landing .flow-card--availability
    .flow-card__header--accordion[data-mobile-static-header]
    .flow-card__summary-row {
    display: flex;
    float: none;
    grid-column: 2;
    grid-row: 1;
    max-width: min(42vw, 12rem);
    margin: 1px 0 0;
    padding: 0;
  }

  .index-landing .guided-search__advanced-toggle {
    flex-wrap: wrap;
    row-gap: 3px;
    margin-top: 0;
    padding-block: 8px;
  }

  /* The full-width mobile meta line needs a normal gap before its first control. */
  .index-landing .flow-card--availability #availabilityControls.availability-rule-builder.is-composer-open,
  .index-landing .flow-card--budget .budget-block {
    margin-top: 0;
  }

  .index-landing #guidedStepFormatBody > .flow-block,
  .index-landing #guidedStepAvailabilityBody > .flow-block,
  .index-landing #guidedStepBudgetBody > .budget-block {
    margin-top: 8px;
  }

  .index-landing .guided-search__advanced-summary {
    flex-basis: 100%;
    order: 5;
    font-size: 0.84rem;
  }

  .index-landing .guided-search__advanced-icon {
    order: 4;
  }

  .index-landing .flow-card--goal #client_goal {
    padding: 12px 14px;
  }

  .index-landing .flow-card--goal #client_goal::placeholder {
    font-size: 0.95rem;
  }

  .index-landing .flow-card--goal #client_goal:focus::placeholder {
    color: transparent;
    opacity: 0;
    -webkit-text-fill-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-landing .flow-card--goal #client_goal,
  .index-landing .guided-search__advanced-toggle,
  .index-landing .flow-card .button-group button,
  .index-landing .flow-card .location-input-shell,
  .index-landing .flow-card .availability-input-shell {
    transition: none;
  }
}
