/* The quote form's styles: the single stylesheet for every lead form on
   the site (/solar-quote-builder/ and the 3 campaign landing pages), loaded
   by each of those pages alongside its own page stylesheet. Uses the design
   tokens (--color-*, --font-body, --radius) that every page's stylesheet
   defines identically in :root. Markup: src/partials/quote-form.html.
   Behaviour: /assets/quote-form.js. */

/* ============ Forms (quote) ============ */
.quote-form-section { padding: 56px 0 64px; background: var(--color-bg-alt); }
.form-intro { text-align: center; font-size: 1rem; }
.form-progress { height: 6px; background: var(--color-border); border-radius: 999px; overflow: hidden; margin: 22px 0 8px; }
.form-progress-bar { height: 100%; width: 11.11%; background: linear-gradient(90deg, #F58A5E, var(--color-orange)); transition: width .3s ease; }
.form-step-label { text-align: center; font-size: 1rem; font-weight: 600; color: var(--color-blue-grey-soft); margin-bottom: 24px; }

#quoteForm { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: 0 4px 24px rgba(35,49,58,.07); }
.form-step legend { font-weight: 600; font-size: 1.05rem; padding: 0; margin-bottom: 18px; color: var(--color-blue-grey); }
.form-step { border: none; padding: 0; margin: 0; }

label { display: block; font-weight: 600; font-size: 1rem; margin: 18px 0 7px; color: var(--color-blue-grey); }
label:first-child { margin-top: 0; }

/* 16px minimum on every field is deliberate: below that, iOS Safari auto-zooms
   on focus and then snaps back, which is what causes the page to "jump" while
   typing. Keeping every field exactly at 16px avoids that entirely. */
input[type="text"], input[type="number"], input[type="tel"], input[type="email"], textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--color-border); border-radius: 8px;
  font-family: var(--font-body); font-size: 16px; color: var(--color-blue-grey);
  -webkit-appearance: none; appearance: none; min-height: 48px;
}
textarea { min-height: 80px; }
/* Deliberately not the brand orange: the first field of every quote-builder
   step auto-focuses on load, and orange doubles as this form's error color
   (.field-error), so an orange focus ring reads as "this is wrong" before
   the visitor has typed anything. */
input:focus, textarea:focus { outline: 2px solid var(--color-blue-grey); outline-offset: 1px; }
textarea { resize: vertical; }
.field-note { font-size: 1rem; color: var(--color-blue-grey-soft); font-style: italic; margin-top: 7px; }
.privacy-note { font-size: 1rem; color: var(--color-blue-grey-soft); margin-top: 18px; }

.radio-label { font-weight: 600; font-size: 1rem; margin: 20px 0 8px; color: var(--color-blue-grey); }
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-group label {
  display: flex; align-items: center; gap: 12px; font-weight: 400; font-size: 1rem;
  border: 1.5px solid var(--color-border); border-radius: 8px; padding: 13px 14px; margin: 0; cursor: pointer;
  min-height: 48px; transition: border-color .15s ease, background .15s ease;
}
.radio-group input { accent-color: var(--color-orange); width: 18px; height: 18px; flex-shrink: 0; }
.radio-group label:has(input:checked) { border-color: var(--color-orange); background: #FFF3EE; }

/* Validation error state -- the field the "Next"/"Send" button jumps to when a
   required answer is missing */
.field-error { border-color: #D64545 !important; }
.radio-group.field-error { border-radius: 8px; box-shadow: 0 0 0 1px #D64545; padding: 4px; margin: -4px -4px 0; }

/* Stepper (+ / -) controls for aircon, geysers, pumps, cable distance */
.stepper { margin: 22px 0; }
.stepper-control {
  display: flex; align-items: center; gap: 0; border: 1.5px solid var(--color-border);
  border-radius: 999px; overflow: hidden; width: fit-content;
}
.stepper-btn {
  width: 56px; height: 56px; border: none; background: var(--color-bg-alt); color: var(--color-blue-grey);
  font-size: 1.5rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.stepper-btn:hover { background: #FFF3EE; color: var(--color-orange); }
.stepper-btn:active { background: var(--color-orange); color: #fff; }
.stepper-value {
  min-width: 64px; text-align: center; font-weight: 600; font-size: 1.05rem; color: var(--color-blue-grey);
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
}
.stepper-suffix { font-size: 1rem; font-weight: 600; color: var(--color-blue-grey-soft); }

.form-nav { display: flex; gap: 10px; margin-top: 28px; }
.form-nav .btn { flex: 1; padding: 13px 20px; font-size: 1rem; }
.form-status { margin-top: 16px; font-weight: 600; color: var(--color-blue-grey); font-size: 1rem; }

@media (max-width: 560px) {
  #quoteForm { padding: 18px; }
  .quote-form-section { padding: 40px 0 48px; }
  .form-nav { flex-direction: column; }
  .form-nav .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .form-progress-bar { transition: none; }
}

/* ============ Success / error result states -- replaces the whole active form UI ============ */
.form-result { text-align: center; padding: 32px 8px; }
.form-result-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 600; color: #fff;
}
.form-result-icon-success { background: #0a944d; }
.form-result-icon-error { background: #D64545; }
.form-result h3 { margin-bottom: .5em; }
.form-result p { max-width: 44ch; margin-left: auto; margin-right: auto; }
.form-result-contact { font-weight: 600; margin-top: -.5em; }
.form-result-contact a { color: var(--color-blue-grey); }
.form-result #tryAgainBtn { margin-top: 12px; }

/* Panel-addition step: inline error text, the
   "we check model numbers" warning, the photo picker and its preview. */
.field-error-text { font-size: 1rem; color: #D64545; margin-top: 7px; }
.form-warning {
  font-size: 1rem; color: var(--color-blue-grey); background: #FFF3EE;
  border: 1.5px solid var(--color-orange); border-radius: 8px; padding: 12px 14px; margin: 0 0 6px;
}
input[type="file"] {
  width: 100%; padding: 12px 14px; border: 1.5px dashed var(--color-border); border-radius: 8px;
  font-family: var(--font-body); font-size: 16px; color: var(--color-blue-grey); background: #fff; min-height: 48px;
}
.photo-preview { display: block; max-width: 100%; max-height: 260px; margin-top: 12px; border-radius: 8px; border: 1.5px solid var(--color-border); }
.photo-preview[hidden] { display: none; }
/* Big, obvious tap target for the photo picker (the browser default is a
   small grey desktop-style button). */
input[type="file"]::file-selector-button {
  font-family: var(--font-body); font-size: 16px; font-weight: 600; color: #fff;
  background: var(--color-blue-grey); border: none; border-radius: 6px;
  padding: 10px 16px; min-height: 44px; margin-right: 12px; cursor: pointer;
}
