.trade-in {
  --ti-accent: #acd400;
  --ti-accent-dark: #91b300;
  --ti-ink: #f5f7f3;
  --ti-muted: #aeb7aa;
  --ti-line: #3b4439;
  --ti-surface: #1b1f1a;
  --ti-surface-raised: #232821;
  --ti-soft: #292f27;
  --ti-field: #121511;
  --ti-danger: #ff9a90;
  --ti-success: #b9e5c1;
  background: #101310;
  color: #fff;
  padding: 64px 0;
  scroll-margin-top: 88px;
}

.trade-in * { box-sizing: border-box; }
.trade-in__grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(560px, 1.12fr); gap: 64px; align-items: start; }
.trade-in__intro { position: sticky; top: 112px; padding-top: 18px; }
.trade-in__eyebrow { margin: 0 0 12px; color: var(--ti-accent); font-size: 13px; font-weight: 800; line-height: 1.3; text-transform: uppercase; }
.trade-in__title { max-width: 620px; margin: 0; color: #fff; font-size: clamp(36px, 4vw, 58px); line-height: 1.02; font-weight: 800; }
.trade-in__subtitle { margin: 20px 0 8px; color: #fff; font-size: 22px; font-weight: 700; line-height: 1.35; }
.trade-in__copy { max-width: 570px; margin: 0; color: #c9cec7; font-size: 17px; line-height: 1.7; }
.trade-in__benefits { display: grid; gap: 13px; margin: 28px 0 0; padding: 0; list-style: none; color: #f4f6f3; font-size: 15px; }
.trade-in__benefits li { display: flex; align-items: center; gap: 11px; }
.trade-in__benefits span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--ti-accent); color: #10120f; }
.trade-in__icon { display: block; width: 18px; height: 18px; }

.trade-in__card { min-width: 0; overflow: hidden; border: 1px solid #343c32; border-radius: 16px; background: var(--ti-surface); color: var(--ti-ink); box-shadow: 0 28px 70px rgba(0, 0, 0, .34); }
.trade-in__progress { padding: 22px 28px 0; }
.trade-in__progress p { margin: 0 0 9px; color: var(--ti-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.trade-in__progress-track { overflow: hidden; height: 5px; border-radius: 99px; background: #343b31; }
.trade-in__progress-track span { display: block; width: 33.333%; height: 100%; border-radius: inherit; background: var(--ti-accent); transition: width .28s ease; }
.trade-in__status { min-height: 24px; margin: 12px 28px 0; color: var(--ti-muted); font-size: 13px; line-height: 1.45; }
.trade-in__status.is-error { color: var(--ti-danger); font-weight: 700; }
.trade-in__status.is-success { color: var(--ti-success); font-weight: 700; }
.trade-in__screen { padding: 12px 28px 30px; animation: trade-in-enter .22s ease; }
.trade-in__screen[hidden], .trade-in [hidden] { display: none !important; }
.trade-in__screen h3 { margin: 0 0 8px; color: var(--ti-ink); font-size: 26px; line-height: 1.2; }
.trade-in__screen > p, .trade-in__screen > div > p { margin: 0 0 22px; color: var(--ti-muted); font-size: 15px; line-height: 1.6; }
@keyframes trade-in-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.trade-in label:not(.trade-in__photo-action):not(.trade-in__privacy) { display: block; margin: 0 0 8px; color: var(--ti-ink); font-size: 14px; font-weight: 800; }
.trade-in input:not([type="file"]):not([type="checkbox"]) { width: 100%; min-height: 52px; border: 1px solid #4a5547; border-radius: 8px; background: var(--ti-field); color: var(--ti-ink); font: inherit; font-size: 16px; outline: none; transition: border-color .16s ease, box-shadow .16s ease; }
.trade-in input:not([type="file"]):not([type="checkbox"])::placeholder { color: #7f897c; opacity: 1; }
.trade-in input:not([type="file"]):not([type="checkbox"]):focus { border-color: var(--ti-accent-dark); box-shadow: 0 0 0 3px rgba(172, 212, 0, .24); }
.trade-in__plate-control { display: grid; grid-template-columns: 46px 1fr; overflow: hidden; border: 2px solid #090a08; border-radius: 9px; background: #f4c900; }
.trade-in__plate-nl { display: grid; place-items: center; background: #1643a5; color: #fff; font-size: 13px; font-weight: 900; }
.trade-in__plate-control input { min-height: 58px !important; border: 0 !important; border-radius: 0 !important; background: #f4c900 !important; box-shadow: none !important; padding: 0 16px; color: #10110f !important; font-size: 24px !important; font-weight: 900; letter-spacing: .02em; text-align: center; text-transform: uppercase; }
.trade-in__plate-control input::placeholder { color: #514600 !important; font-size: 16px; font-weight: 750; letter-spacing: 0; }
.trade-in__field-help { margin: 8px 0 18px !important; color: var(--ti-muted) !important; font-size: 12px !important; line-height: 1.5 !important; }
.trade-in__honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; pointer-events: none !important; }

.trade-in__button { display: inline-flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 8px; padding: 13px 20px; font: inherit; font-size: 15px; font-weight: 850; cursor: pointer; transition: transform .14s ease, background .14s ease, opacity .14s ease; }
.trade-in__button:hover:not(:disabled) { transform: translateY(-1px); }
.trade-in__button:focus-visible, .trade-in button:focus-visible, .trade-in__photo-action:focus-within { outline: 3px solid rgba(172, 212, 0, .55); outline-offset: 3px; }
.trade-in__button:disabled { cursor: not-allowed; opacity: .44; }
.trade-in__button--primary { background: var(--ti-accent); color: #10120f; }
.trade-in__button--primary:hover:not(:disabled) { background: #bce600; }
.trade-in__button--secondary { border: 1px solid #505b4d; background: var(--ti-soft); color: var(--ti-ink); }
.trade-in__button.is-loading { pointer-events: none; }
.trade-in__spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(23, 25, 23, .25); border-top-color: var(--ti-ink); border-radius: 50%; animation: trade-in-spin .7s linear infinite; }
.trade-in__button.is-loading .trade-in__spinner { display: inline-block; }
@keyframes trade-in-spin { to { transform: rotate(360deg); } }

.trade-in__back { display: inline-flex; min-height: 40px; align-items: center; gap: 6px; margin: -4px 0 12px; border: 0; background: transparent; color: var(--ti-accent); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.trade-in__back .trade-in__icon { width: 16px; height: 16px; }
.trade-in__vehicle-card { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; border: 1px solid #3d473a; border-radius: 11px; padding: 17px; background: var(--ti-surface-raised); }
.trade-in__vehicle-check { display: grid; flex: 0 0 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--ti-accent); color: #10120f; }
.trade-in__vehicle-check .trade-in__icon { width: 19px; height: 19px; }
.trade-in__vehicle-details { min-width: 0; flex: 1; }
.trade-in__vehicle-heading { display: flex; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.trade-in__vehicle-heading strong { font-size: 19px; line-height: 1.3; }
.trade-in__vehicle-heading > span { flex: 0 0 auto; color: var(--ti-accent); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.trade-in__vehicle-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 15px 0 0; }
.trade-in__vehicle-specs div { min-width: 0; border-top: 1px solid var(--ti-line); padding-top: 9px; }
.trade-in__vehicle-specs dt { margin: 0 0 3px; color: var(--ti-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.trade-in__vehicle-specs dd { overflow-wrap: anywhere; margin: 0; color: var(--ti-ink); font-size: 12px; font-weight: 700; line-height: 1.35; }
.trade-in__suffix-control, .trade-in__prefix-control { display: flex; align-items: center; overflow: hidden; border: 1px solid #4a5547; border-radius: 8px; background: var(--ti-field); }
.trade-in__suffix-control:focus-within, .trade-in__prefix-control:focus-within { border-color: var(--ti-accent-dark); box-shadow: 0 0 0 3px rgba(172, 212, 0, .24); }
.trade-in__suffix-control input, .trade-in__prefix-control input { border: 0 !important; box-shadow: none !important; padding: 0 15px; }
.trade-in__suffix-control span, .trade-in__prefix-control span { padding: 0 15px; color: var(--ti-muted); font-size: 14px; font-weight: 800; }

.trade-in__screen-header { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; }
.trade-in__screen-header p { margin: 0 0 20px !important; }
.trade-in__photo-count { flex: 0 0 auto; border-radius: 99px; padding: 7px 10px; background: var(--ti-soft); color: var(--ti-accent); font-size: 12px; font-weight: 850; }
.trade-in__mobile-handoff { display: flex; width: 100%; min-height: 68px; align-items: center; gap: 12px; margin: 0 0 18px; border: 1px solid #404a3d; border-radius: 10px; padding: 10px 12px; background: var(--ti-surface-raised); color: var(--ti-ink); text-align: left; cursor: pointer; }
.trade-in__mobile-handoff > span:nth-child(2) { flex: 1; }
.trade-in__mobile-handoff strong, .trade-in__mobile-handoff small { display: block; }
.trade-in__mobile-handoff small { margin-top: 2px; color: var(--ti-muted); font-size: 11px; }
.trade-in__qr-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 9px; background: #10130f; color: var(--ti-accent); }
.trade-in__qr-icon .trade-in__icon { width: 22px; height: 22px; }
.trade-in__handoff-arrow { flex: 0 0 auto; width: 20px; height: 20px; color: var(--ti-accent); }
.trade-in__photo-grid, .trade-in__optional-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trade-in__photo-slot { position: relative; overflow: hidden; min-width: 0; border: 1px solid var(--ti-line); border-radius: 10px; padding: 10px; background: var(--ti-surface-raised); transition: border-color .18s ease, box-shadow .18s ease; }
.trade-in__photo-slot.is-complete { border-color: #77aa80; box-shadow: inset 0 0 0 1px #77aa80; }
.trade-in__photo-slot.is-uploading { border-color: var(--ti-accent-dark); }
.trade-in__photo-guide, .trade-in__photo-preview { overflow: hidden; aspect-ratio: 5/4; border-radius: 7px; background: #111410; }
.trade-in__photo-guide-image, .trade-in__photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.trade-in__photo-copy { min-height: 58px; padding: 9px 2px 7px; }
.trade-in__photo-copy strong, .trade-in__photo-copy small { display: block; }
.trade-in__photo-copy strong { font-size: 14px; }
.trade-in__photo-copy small { margin-top: 3px; color: var(--ti-muted); font-size: 11px; line-height: 1.35; }
.trade-in__photo-action { display: flex; min-height: 40px; align-items: center; justify-content: center; border: 1px solid #4a5547; border-radius: 7px; background: #11140f; color: var(--ti-ink); font-size: 12px; font-weight: 800; cursor: pointer; }
.trade-in__photo-action input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.trade-in__photo-remove { width: 100%; min-height: 34px; border: 0; background: transparent; color: var(--ti-danger); font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.trade-in__photo-progress { overflow: hidden; height: 4px; margin-top: 8px; border-radius: 99px; background: #353d32; }
.trade-in__photo-progress span { display: block; width: 42%; height: 100%; border-radius: inherit; background: var(--ti-accent); animation: trade-in-upload 1s ease-in-out infinite alternate; }
@keyframes trade-in-upload { to { transform: translateX(135%); } }
.trade-in__optional-toggle { min-height: 44px; margin: 12px 0; border: 0; background: transparent; color: var(--ti-accent); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.trade-in__optional-photos { margin-bottom: 14px; }
.trade-in__optional-icon { display: grid; aspect-ratio: 5/4; place-items: center; border: 1px dashed #596456; border-radius: 7px; background: var(--ti-soft); color: var(--ti-accent); }
.trade-in__optional-icon .trade-in__icon { width: 28px; height: 28px; }
.trade-in__photo-confirmation { display: flex; gap: 12px; align-items: center; margin: 16px 0; border: 1px solid #3d6544; border-radius: 9px; padding: 13px; background: #1d3021; color: var(--ti-success); }
.trade-in__photo-confirmation > span { display: grid; flex: 0 0 28px; height: 28px; place-items: center; border-radius: 50%; background: #4a9a5c; color: #fff; }
.trade-in__photo-confirmation p, .trade-in__photo-confirmation strong, .trade-in__photo-confirmation small { display: block; margin: 0 !important; }
.trade-in__photo-confirmation small { margin-top: 2px !important; color: #a5caaa; font-size: 11px; }

.trade-in__summary { display: grid; gap: 3px; margin: 0 0 20px; border-left: 4px solid var(--ti-accent); border-radius: 0 8px 8px 0; padding: 12px 14px; background: var(--ti-soft); }
.trade-in__summary strong { font-size: 15px; }
.trade-in__summary span { color: var(--ti-muted); font-size: 12px; }
.trade-in__field { margin-bottom: 15px; }
.trade-in__field label span { color: var(--ti-muted); font-size: 11px; font-weight: 600; }
.trade-in__field > input { padding: 0 15px; }
.trade-in__privacy { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; color: var(--ti-muted); font-size: 12px; line-height: 1.5; cursor: pointer; }
.trade-in__privacy input { flex: 0 0 19px; width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--ti-accent-dark); }

.trade-in__modal { position: fixed; z-index: 100000; inset: 0; display: grid; place-items: center; padding: 20px; }
.trade-in__modal-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 4, .78); backdrop-filter: blur(4px); }
.trade-in__modal-dialog { position: relative; width: min(100%, 480px); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid #3b4439; border-radius: 14px; padding: 28px; background: var(--ti-surface); color: var(--ti-ink); box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.trade-in__modal-dialog h3 { margin: 0 0 8px; font-size: 25px; }
.trade-in__modal-dialog > p:not(.trade-in__eyebrow) { color: var(--ti-muted); font-size: 14px; line-height: 1.55; }
.trade-in__modal-close { position: absolute; top: 9px; right: 9px; display: grid; width: 44px; height: 44px; place-items: center; border: 0; background: transparent; color: var(--ti-ink); cursor: pointer; }
.trade-in__qr { display: grid; width: 230px; min-height: 230px; place-items: center; margin: 20px auto; border: 1px solid var(--ti-line); border-radius: 10px; padding: 10px; background: #fff; }
.trade-in__qr svg, .trade-in__qr img { display: block; width: 100%; height: auto; }
.trade-in__modal-dialog ol { display: grid; gap: 8px; margin: 0 0 18px; padding-left: 24px; color: #dce1da; font-size: 13px; }
.trade-in__modal-note { border-radius: 7px; padding: 10px; background: var(--ti-soft); font-size: 12px !important; }
body.trade-in-modal-open { overflow: hidden; }

@media (max-width: 1100px) {
  .trade-in__grid { grid-template-columns: minmax(0, .78fr) minmax(500px, 1.22fr); gap: 36px; }
  .trade-in__title { font-size: 42px; }
}

@media (max-width: 900px) {
  .trade-in { padding: 48px 0; }
  .trade-in__grid { grid-template-columns: 1fr; gap: 30px; }
  .trade-in__intro { position: static; padding-top: 0; }
  .trade-in__title { max-width: 680px; font-size: 40px; }
  .trade-in__copy { max-width: 680px; }
  .trade-in__mobile-handoff { display: none; }
}

@media (max-width: 600px) {
  .trade-in { padding: 38px 0; scroll-margin-top: 70px; }
  .trade-in .container { padding-right: 16px; padding-left: 16px; }
  .trade-in__grid { gap: 24px; }
  .trade-in__eyebrow { font-size: 11px; }
  .trade-in__title { font-size: 34px; line-height: 1.06; }
  .trade-in__subtitle { margin-top: 16px; font-size: 19px; }
  .trade-in__copy { font-size: 15px; line-height: 1.6; }
  .trade-in__benefits { margin-top: 20px; gap: 10px; font-size: 13px; }
  .trade-in__card { border-radius: 12px; }
  .trade-in__progress { padding: 18px 18px 0; }
  .trade-in__status { margin-right: 18px; margin-left: 18px; }
  .trade-in__screen { padding: 10px 18px 22px; }
  .trade-in__screen h3 { font-size: 23px; }
  .trade-in__vehicle-card { gap: 11px; padding: 14px; }
  .trade-in__vehicle-heading { display: block; }
  .trade-in__vehicle-heading > span { display: block; margin-top: 4px; }
  .trade-in__vehicle-specs { grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
  .trade-in__photo-grid, .trade-in__optional-photos { gap: 9px; }
  .trade-in__photo-slot { padding: 7px; }
  .trade-in__photo-copy { min-height: 63px; padding-top: 8px; }
  .trade-in__photo-copy strong { font-size: 13px; }
  .trade-in__photo-copy small { font-size: 10px; }
  .trade-in__photo-action { min-height: 42px; }
  .trade-in__screen-header { display: block; }
  .trade-in__photo-count { display: inline-block; margin-bottom: 12px; }
  .trade-in__modal { padding: 10px; align-items: end; }
  .trade-in__modal-dialog { max-height: calc(100vh - 20px); border-radius: 16px 16px 0 0; padding: 24px 20px; }
}

@media (max-width: 768px) {
  body.trade-in-in-view .abvb-mobile-viewing-cta { opacity: 0; transform: translateY(calc(100% + 24px)); pointer-events: none; }
  body.trade-in-in-view .abvb-mobile-viewing-cta__button { pointer-events: none; }
  body.trade-in-in-view #avdb-consent-reopen { opacity: 0 !important; transform: translateY(calc(100% + 24px)) !important; pointer-events: none !important; }
  body.trade-in-in-view #avdb-consent-banner.is-minimized { opacity: 0 !important; transform: translateY(calc(100% + 24px)) !important; pointer-events: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .trade-in *, .trade-in *::before, .trade-in *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
