/* ==========================================================================
   NeighborSaver — order form styles (loaded only on /order/)
   Multi-step wizard: one question per screen, card options, ZIP multi-select,
   drag-drop uploads. Extends the design tokens in site.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shell + progress
   -------------------------------------------------------------------------- */
.order-wrap { padding: clamp(24px, 4vw, 56px) 0 clamp(48px, 6vw, 80px); }

.order-shell {
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
@media (max-width: 700px) {
  /* Edge-to-edge card on phones */
  .order-wrap { padding-top: 0; }
  .order-shell { border-radius: 0; border-left: 0; border-right: 0; }
}

.order-progress {
  padding: 18px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.order-progress .step-count {
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.progress-track {
  flex: 1; height: 4px; border-radius: 2px; background: var(--divider);
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; border-radius: 2px; background: var(--green);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.resume-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 16px 28px 0; padding: 10px 14px;
  background: var(--green-tint); border: 1px solid var(--border);
  border-radius: 10px;
}
@media (max-width: 480px) { .resume-bar { margin: 14px 20px 0; } }
.resume-bar__text { font-size: 13px; line-height: 1.4; color: var(--ink); }
.resume-bar__btn {
  flex: none; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--green); background: none; border: 0; padding: 4px 6px;
  cursor: pointer; text-decoration: underline; border-radius: 6px;
  white-space: nowrap;
}
.resume-bar__btn:hover { color: var(--green-hover); }

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */
.step { padding: 26px 28px 30px; }
@media (max-width: 480px) { .step { padding: 22px 20px 26px; } }

.step[hidden] { display: none; }

/* Slide-in animation on step entry */
@media (prefers-reduced-motion: no-preference) {
  .step.entering-fwd { animation: step-in-fwd 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
  .step.entering-back { animation: step-in-back 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
  @keyframes step-in-fwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
  @keyframes step-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
}

.step-title {
  margin: 0 0 6px;
  font-size: clamp(23px, 3vw, 28px); font-weight: 800; letter-spacing: -0.02em;
  outline: none; /* receives focus on step change for screen readers */
}
.step-sub { margin: 0 0 22px; font-size: 15px; line-height: 1.6; color: var(--body-2); }
.step-note { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* Inline validation message */
.step-error {
  display: none;
  margin: 14px 0 0;
  background: #FBEFEA; border: 1px solid #E3B7A4; border-radius: 10px;
  padding: 12px 16px; font-size: 14px; line-height: 1.5; color: #8C4A2C; font-weight: 600;
}
.step-error.show { display: block; }

/* --------------------------------------------------------------------------
   Option cards (radio groups)
   -------------------------------------------------------------------------- */
.opt-grid { display: flex; flex-direction: column; gap: 12px; border: 0; padding: 0; margin: 0; }
.opt-grid legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.opt-card { position: relative; }
.opt-card input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.opt-card label {
  display: flex; align-items: center; gap: 16px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--white);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.opt-card label:hover { border-color: #CFC8BB; }
.opt-card label:active { transform: scale(0.99); }
.opt-card input:checked + label {
  border-color: var(--green);
  background: #F7FBF8;
  box-shadow: 0 0 0 1px var(--green) inset;
}
.opt-card input:focus-visible + label {
  outline: 2px solid var(--green); outline-offset: 2px;
}

.opt-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--green-tint); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
}
.opt-body { flex: 1; min-width: 0; }
.opt-title { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.opt-desc { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.5; color: var(--body-2); }

/* Check indicator */
.opt-check {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--border-input);
  display: flex; align-items: center; justify-content: center;
  color: transparent; background: var(--white);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.opt-check svg { display: block; }
.opt-card input:checked + label .opt-check {
  background: var(--green); border-color: var(--green); color: #fff;
}

/* Size thumbnails: proportional mini-rectangles */
.size-thumb {
  flex-shrink: 0; border: 1.5px solid var(--green); border-radius: 3px;
  background: var(--green-tint);
}
.size-thumb.s-6x9 { width: 42px; height: 28px; }
.size-thumb.s-6x11 { width: 51px; height: 28px; }
.size-thumb.s-85x11 { width: 36px; height: 46px; }
.size-thumb.s-unsure {
  width: 42px; height: 32px; border-style: dashed; background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 700;
}

/* --------------------------------------------------------------------------
   Text inputs / textareas / selects
   -------------------------------------------------------------------------- */
.f-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.f-field:last-child { margin-bottom: 0; }
.f-label { font-size: 14px; font-weight: 700; color: var(--body); }
.f-label .opt-tag { font-weight: 500; color: var(--muted); }
.f-help { font-size: 13px; line-height: 1.5; color: var(--muted); }

.f-input, .f-textarea, .f-select {
  width: 100%;
  border: 1.5px solid var(--border-input); border-radius: 10px;
  padding: 13px 15px;
  font-size: 16px; /* ≥16px prevents iOS zoom-on-focus */
  font-family: inherit; color: var(--ink); background: var(--bg);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.f-textarea { resize: vertical; min-height: 96px; }
.f-input:focus, .f-textarea:focus, .f-select:focus {
  outline: 2px solid var(--green); outline-offset: 1px;
  border-color: var(--green); background: var(--white);
}
.f-input[aria-invalid="true"], .f-textarea[aria-invalid="true"] { border-color: #C0653F; }

.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .f-row { grid-template-columns: 1fr; } }

/* Segmented control (radius) */
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented .seg { position: relative; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label {
  display: block; padding: 10px 16px;
  border: 1.5px solid var(--border-input); border-radius: 999px;
  font-size: 14.5px; font-weight: 600; color: var(--body); background: var(--white);
  cursor: pointer; transition: all 0.15s ease;
}
.segmented input:checked + label {
  background: var(--green); border-color: var(--green); color: #fff;
}
.segmented input:focus-visible + label { outline: 2px solid var(--green); outline-offset: 2px; }

/* Checkbox row (list rights) */
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check-row input {
  width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0;
  accent-color: var(--green); cursor: pointer;
}
.check-row span { font-size: 14.5px; line-height: 1.55; color: var(--body); }

/* --------------------------------------------------------------------------
   ZIP combobox + chips
   -------------------------------------------------------------------------- */
.zip-picker { position: relative; }

.zip-input-wrap { position: relative; }
.zip-input-wrap .zip-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.zip-picker .f-input { padding-left: 42px; }

.zip-listbox {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 4px 10px rgba(38,34,27,0.06), 0 18px 44px rgba(38,34,27,0.16);
  max-height: 340px; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px;
}
.zip-listbox[hidden] { display: none; }

.zip-group-label {
  padding: 10px 12px 4px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.zip-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  font-size: 15px; color: var(--ink);
}
.zip-option .zo-city { color: var(--body-2); font-size: 13.5px; }
.zip-option .zo-zip { font-weight: 700; font-variant-numeric: tabular-nums; }
.zip-option:hover, .zip-option.active { background: var(--green-tint); }
.zip-option.zo-addall { font-weight: 700; color: var(--green); }
.zip-option.zo-addall .zo-plus { font-weight: 800; }
.zip-option[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.zip-option[aria-disabled="true"]:hover { background: transparent; }

.zip-empty { padding: 14px 12px; font-size: 14px; color: var(--muted); }

.zip-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.zip-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-tint); border: 1px solid #CBE2D4; border-radius: 999px;
  padding: 7px 8px 7px 14px;
  font-size: 14px; font-weight: 600; color: var(--green-hover);
}
.zip-chip .chip-city { font-weight: 500; color: #4C7A61; }
.zip-chip button {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: #CBE2D4; color: var(--green-hover); cursor: pointer;
  font-size: 14px; line-height: 1; font-weight: 700;
  transition: background-color 0.12s ease;
}
.zip-chip button:hover { background: #B7D6C4; }
.zip-chip button:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

.zip-count { margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--body-2); }
.zip-loading { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* --------------------------------------------------------------------------
   File dropzone
   -------------------------------------------------------------------------- */
/* Artwork requirements card (shown with the upload zone) */
.art-reqs {
  background: var(--green-tint); border: 1px solid #CBE2D4; border-radius: 12px;
  padding: 16px 18px; margin-bottom: 14px;
}
.art-reqs-title {
  display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--green-hover); margin-bottom: 8px;
}
.art-reqs ul { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 5px; }
.art-reqs li { font-size: 13.5px; line-height: 1.55; color: var(--body); }
.art-reqs p { margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: var(--body-2); }

.dropzone {
  border: 2px dashed var(--border-input); border-radius: 12px;
  background: var(--bg);
  padding: 26px 20px; text-align: center; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--green); background: var(--green-tint); }
.dropzone:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.dropzone .dz-icon { color: var(--green); margin-bottom: 8px; }
.dropzone .dz-title { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.dropzone .dz-sub { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.dropzone input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }

.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px;
}
.file-row .fr-icon { color: var(--green); flex-shrink: 0; }
.file-row .fr-name {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-row .fr-size { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.file-row button {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: var(--divider); color: var(--body); cursor: pointer;
  font-size: 15px; font-weight: 700;
}
.file-row button:hover { background: #E4DDD0; }

/* --------------------------------------------------------------------------
   Nav (Back / Continue)
   -------------------------------------------------------------------------- */
.step-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 26px;
}
.btn-continue {
  flex: 1; max-width: 260px; margin-left: auto;
  font-size: 16px; padding: 15px 32px;
}
@media (max-width: 540px) {
  .btn-continue { max-width: none; }
}
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 12px 8px;
  font-size: 15px; font-weight: 600; color: var(--body-2); cursor: pointer;
  font-family: inherit; border-radius: 8px;
}
.btn-back:hover { color: var(--ink); }
.btn-back:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn-back[hidden] { visibility: hidden; display: inline-flex; } /* keep layout stable */

/* --------------------------------------------------------------------------
   Review screen
   -------------------------------------------------------------------------- */
.review-group {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 14px;
}
.review-group h3 {
  margin: 0 0 10px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}
.review-group .rv-edit {
  background: none; border: 0; padding: 4px 6px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--green);
  text-transform: none; letter-spacing: 0; border-radius: 6px;
}
.review-group .rv-edit:hover { text-decoration: underline; }
.review-group .rv-edit:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.review-row { display: flex; gap: 14px; padding: 5px 0; font-size: 14.5px; line-height: 1.5; }
.review-row dt { flex: 0 0 128px; color: var(--muted); }
.review-row dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

.review-reassure {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--green-tint); border: 1px solid #CBE2D4; border-radius: 12px;
  padding: 16px 18px; margin: 18px 0 0;
  font-size: 14px; line-height: 1.55; color: var(--green-hover);
}
.review-reassure svg { flex-shrink: 0; margin-top: 1px; }

.btn-submit { width: 100%; margin-top: 18px; font-size: 17px; padding: 16px 32px; }
.btn-submit[disabled] { opacity: 0.6; cursor: default; }

.privacy-line { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.privacy-line a { color: var(--green); }

/* --------------------------------------------------------------------------
   Confirmation + fallback panels
   -------------------------------------------------------------------------- */
.confirm-panel { text-align: center; padding: 18px 8px 8px; }
.confirm-panel .cp-badge {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--green-tint); color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.confirm-panel h2 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 27px); font-weight: 800; letter-spacing: -0.02em; }
.confirm-panel p { margin: 0 auto 12px; max-width: 460px; font-size: 15.5px; line-height: 1.65; color: var(--body-2); }
.confirm-panel .cp-ref {
  display: inline-block; margin: 4px 0 10px;
  font-family: var(--mono); font-size: 14px; color: var(--body);
  background: var(--divider); border-radius: 8px; padding: 8px 14px;
}

.fallback-panel {
  background: #FDF6EC; border: 1px solid #E8D5B0; border-radius: 12px;
  padding: 20px 22px; margin-top: 18px; text-align: left;
  font-size: 14.5px; line-height: 1.6; color: #6E5A33;
}
.fallback-panel strong { color: #55461F; }
.fallback-panel .fb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Busy state on submit */
.spinner {
  display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: 8px;
  border: 2.5px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hero trust strip on the quote form page */
.hero-trust { margin: 10px 0 0; font-size: 13.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }

/* "Your quote will go to …" note on the contact step */
.contact-email-note { margin: -8px 0 18px; font-size: 14px; color: var(--body-2); overflow-wrap: anywhere; }
.contact-email-note strong { color: var(--ink); }
.contact-email-note .rv-edit {
  background: none; border: 0; padding: 2px 6px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--green);
  border-radius: 6px;
}
.contact-email-note .rv-edit:hover { text-decoration: underline; }
.contact-email-note .rv-edit:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
