/* ==========================================================================
   QUOTE WIZARD — hero VIN/YMM instant-offer flow.
   Scoped under .qw- to avoid colliding with global-foundation/home.css.
   Reuses --neon-lime/--blurple/--text-gray/--glass-border tokens from
   global-foundation.css so it matches the rest of the site automatically.
   ========================================================================== */

.qw {
  max-width: 560px;
  margin: 28px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
}

.qw-step { display: none; }
.qw-step.qw-active { display: block; }

.qw-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 4px;
}
.qw-sub {
  color: var(--text-gray);
  font-size: 14px;
  margin-bottom: 18px;
}

.qw-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.qw-tab {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: white;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-gray);
}
.qw-tab.qw-tab-active {
  border-color: var(--neon-lime);
  color: var(--neon-lime-text);
  background: rgba(0, 169, 79, 0.06);
}

.qw-field { margin-bottom: 14px; }
.qw-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-white);
}
.qw-field input,
.qw-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  background: white;
  color: var(--text-white);
}
.qw-field input:focus,
.qw-field select:focus {
  outline: none;
  border-color: var(--neon-lime);
}
.qw-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qw-hint { font-size: 12px; color: var(--text-gray); margin-top: 4px; }

.qw-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.qw-pill {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-gray);
}
.qw-pill.qw-pill-active {
  border-color: var(--neon-lime);
  background: var(--neon-lime);
  color: var(--text-white);
}

.qw-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-gray); }
.qw-checkbox input { margin-top: 3px; }

.qw-actions { display: flex; gap: 10px; margin-top: 18px; }
.qw-btn-back {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 12px 20px;
  font-family: var(--font-head);
  font-weight: 700;
  cursor: pointer;
  color: var(--text-gray);
}

.qw-error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #B91C1C;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.qw-error.qw-active { display: block; }

.qw-loading { text-align: center; padding: 30px 0; color: var(--text-gray); font-size: 14px; }

.qw-offer-amount {
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 800;
  color: var(--neon-lime-text);
  text-align: center;
  margin: 10px 0 4px;
}
.qw-offer-sub { text-align: center; color: var(--text-gray); font-size: 14px; margin-bottom: 20px; }

.qw-fallback {
  text-align: center;
  padding: 10px 0;
}
.qw-fallback .btn-primary { margin-top: 12px; }

/* ---------- Offer modal popup ---------- */
.qw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 20, 0.62);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}
.qw-modal-overlay.qw-active { display: flex; }

.qw-modal {
  background: #eafaf1;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  animation: qwModalIn 0.22s ease-out;
}
@keyframes qwModalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.qw-modal-head {
  background: #12333f;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  padding: 16px 48px 16px 20px;
  position: relative;
  text-align: center;
}
.qw-modal-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}

.qw-modal-body { padding: 24px 22px 26px; text-align: center; }
.qw-modal-lede { font-size: 14px; color: #35555f; margin-bottom: 2px; }
.qw-modal-vehicle {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  color: var(--neon-lime-text);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.qw-modal-amount {
  font-family: var(--font-head);
  font-size: 52px;
  font-weight: 800;
  color: #12333f;
  margin: 6px 0 2px;
}
.qw-modal-note { font-size: 13px; color: #35555f; margin-bottom: 18px; }

.qw-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.qw-modal-actions .btn-primary { width: 100%; }
.qw-btn-secondary {
  width: 100%;
  background: #fff;
  border: 1px solid var(--neon-lime);
  color: var(--neon-lime-text);
  border-radius: 50px;
  padding: 13px 20px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* ---------- Photo upload step (guided 4-angle slots) ---------- */
.qw-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.qw-slot {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 10px 10px;
  text-align: center;
  background: #fff;
}
.qw-slot-num {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--neon-lime);
  color: var(--text-white);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
}
.qw-slot-art { color: #2c3e46; padding: 4px 2px 2px; }
.qw-slot-art svg { width: 100%; height: 52px; }
.qw-slot-mirror svg { transform: scaleX(-1); }
.qw-slot-preview { position: relative; }
.qw-slot-preview img {
  width: 100%;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.qw-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.qw-slot-label { font-size: 12px; font-weight: 700; margin-top: 6px; color: var(--text-white); }
.qw-slot-hint { font-size: 10.5px; color: var(--text-gray); margin: 2px 0 8px; }
.qw-slot-btn {
  width: 100%;
  border: 1px solid var(--neon-lime);
  color: var(--neon-lime-text);
  background: rgba(0, 169, 79, 0.06);
  border-radius: 8px;
  padding: 7px 4px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.qw-photo-note { font-size: 12px; color: var(--text-gray); text-align: center; margin-bottom: 4px; }

@media (max-width: 600px) {
  .qw { padding: 20px; margin-top: 20px; }
  .qw-grid2 { grid-template-columns: 1fr; }
  .qw-modal-amount { font-size: 42px; }
  .qw-slot-grid { grid-template-columns: 1fr 1fr; }
}
