/* ============================================
   SELL YOUR CAR — appraisal request page.
   Mirrors the credit application's form language (card fieldsets, numbered
   legends, conditional sub-block) with its own class names, so the two pages
   stay visually consistent without either one's tweaks leaking into the other.
   Shared primitives (.form-row, .form-group, .form-status, .btn) come from
   style.css — only the page-specific chrome lives here.
   ============================================ */

.sell-page .sell-wrap { max-width: 780px; }

/* Hero banner — sits between the header copy and the trust row, at full
   container width rather than the narrower .sell-wrap the form uses. Kept to a
   wide 21:9 crop deliberately: it sets the scene without pushing the form
   below the fold. */
.sell-hero {
  margin: 0 0 clamp(30px, 5vw, 48px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}
.sell-hero img { display: block; width: 100%; height: auto; }

/* Trust row under the header */
.sell-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px; margin-bottom: 38px; }
.sell-trust-item { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); }
.sell-trust-item svg { color: var(--brand); }
[data-theme="dark"] .sell-trust-item svg { color: var(--brand-bright); }

/* Form shell */
.sell-form { display: flex; flex-direction: column; gap: 22px; }
.sell-fieldset {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px 28px;
  margin: 0;
}
.sell-fieldset legend {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em;
  padding: 0 8px; margin-left: -8px;
}
.sell-step-num {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 0.82rem; font-weight: 800;
}
.sell-fieldset .form-row { margin-top: 16px; }
.sell-fieldset > .form-group { margin-top: 16px; }
/* Field captions only — the "no VIN" toggle keeps its own flex layout. */
.sell-fieldset label:not(.sell-toggle) {
  display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px;
}
.sell-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.sell-fieldset .form-group input { background: var(--bg-primary); }

.sell-select {
  width: 100%; padding: 14px 16px; font-size: 0.9rem; font-family: var(--font-sans);
  background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  color: var(--text-primary); outline: none; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.sell-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.14); }

/* VIN — monospace and roomy tracking so 17 characters stay readable */
.sell-vin { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.09em; text-transform: uppercase; }
.sell-vin::placeholder { letter-spacing: normal; text-transform: none; font-family: var(--font-sans); }

.sell-hint { display: block; margin-top: 7px; font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* Non-blocking VIN checksum warning — the lead still submits. */
.sell-warn[hidden] { display: none; }
.sell-warn {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 9px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid rgba(224, 145, 47, 0.4); background: rgba(224, 145, 47, 0.09);
  font-size: 0.78rem; line-height: 1.45; color: var(--text-secondary);
}
.sell-warn svg { flex-shrink: 0; margin-top: 1px; color: #e0912f; }

/* "I don't have my VIN" toggle + the block it reveals */
.sell-toggle {
  display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 0; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; color: var(--text-primary);
}
.sell-toggle input { width: 17px; height: 17px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }

.sell-subblock {
  margin-top: 16px;
  padding: 15px 18px 6px;
  border: 1px solid rgba(var(--brand-rgb), 0.28);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  background: rgba(var(--brand-rgb), 0.05);
  animation: sellSubIn 0.25s ease;
}
.sell-subblock[hidden] { display: none; }   /* UA default, but our rules must not override it */
@keyframes sellSubIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sell-subhead { margin-bottom: 10px; }
.sell-subhead > span { display: block; font-size: 0.92rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.sell-subhead > small { display: block; margin-top: 3px; font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }

/* Invalid field highlight, cleared as soon as the visitor edits it */
.sell-form .is-invalid,
.sell-form .is-invalid:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.13); }

.sell-fineprint { margin-top: 16px; font-size: 0.74rem; color: var(--text-muted); line-height: 1.6; text-align: center; }

/* "How it works" strip under the form */
.sell-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: clamp(38px, 6vw, 60px);
}
.sell-step {
  padding: 20px 20px 22px; border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); background: var(--bg-card); text-align: center;
}
.sell-step-ico {
  display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 12px;
  border-radius: 50%; background: rgba(var(--brand-rgb), 0.1); color: var(--brand);
}
[data-theme="dark"] .sell-step-ico { color: var(--brand-bright); }
.sell-step-t { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 5px; }
.sell-step-d { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.55; }

@media (max-width: 640px) {
  .sell-row-3 { grid-template-columns: 1fr; }
  .sell-steps { grid-template-columns: 1fr; }
  .sell-fieldset { padding: 20px 18px 24px; }
}
