/* ============================================================
   TRADE-IN ESTIMATOR — page-specific styles
   (extends loan-estimator.css for form panel + result-card shell)
   ============================================================ */

/* Text input (used for model, ZIP, VIN) */
.text-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.text-input::placeholder { color: var(--ink-faint); font-weight: 500; }
.text-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}

.muted {
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--ink-faint);
}

/* ============================================================
   CONDITION STAR-BUTTON PICKER
   ============================================================ */
.cond-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.cond {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  color: var(--ink-mute);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  position: relative;
}
.cond:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 166, 35, 0.25);
  transform: translateY(-2px);
}
.cond.is-active {
  background: rgba(245, 166, 35, 0.12);
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.10);
  color: var(--ink);
}

.cond__stars {
  display: inline-flex;
  gap: 2px;
}
.cond__stars span {
  width: 11px; height: 11px;
  background: var(--accent);
  filter: drop-shadow(0 0 4px var(--accent-glow));
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/></svg>") no-repeat center / contain;
}
.cond__stars span.dim {
  background: rgba(255, 255, 255, 0.18);
  filter: none;
}
.cond__name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.cond__rarity {
  font-size: 10px;
  color: var(--ink-faint);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.cond.is-active .cond__rarity { color: var(--accent); }

/* ============================================================
   RESULT — BIG RANGE
   ============================================================ */
.t-range-big {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(38px, 5.5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.t-range-low,
.t-range-high {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hot) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(245, 166, 35, 0.30));
}
.t-range-dash {
  color: var(--ink-faint);
  font-weight: 700;
  font-size: 0.7em;
}

/* ============================================================
   VISUAL RANGE GAUGE
   ============================================================ */
.t-gauge {
  position: relative;
  z-index: 1;
  padding: 60px 8px 24px;
  margin-bottom: 14px;
}
.t-gauge__scale {
  position: relative;
  height: 8px;
  border-radius: 100px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.06) 100%);
  overflow: visible;
}
.t-gauge__band {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--low, 30%);
  right: calc(100% - var(--high, 70%));
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hot) 100%);
  border-radius: 100px;
  box-shadow: 0 0 14px var(--accent-glow);
  transition: left 0.5s var(--ease-out), right 0.5s var(--ease-out);
}

.t-gauge__marker {
  position: absolute;
  top: 50%;
  left: var(--pos, 50%);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
  transition: left 0.5s var(--ease-out);
}
.t-gauge__pin {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}
.t-gauge__label {
  position: absolute;
  bottom: 22px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 3px 7px;
  background: rgba(5, 13, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.t-gauge__marker--mike .t-gauge__pin {
  background: var(--accent);
  border-color: #fff;
  width: 18px; height: 18px;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.25), 0 4px 12px rgba(0, 0, 0, 0.5);
}
.t-gauge__marker--mike .t-gauge__label {
  color: var(--accent);
  border-color: rgba(245, 166, 35, 0.5);
  background: rgba(245, 166, 35, 0.12);
  font-weight: 800;
  bottom: 26px;
}
.t-gauge__marker--kbbp .t-gauge__pin,
.t-gauge__marker--kbbt .t-gauge__pin { background: #4a8ec2; border-color: rgba(255, 255, 255, 0.6); }
.t-gauge__marker--other .t-gauge__pin { background: #f87171; border-color: rgba(255, 255, 255, 0.5); }

/* Stagger marker labels so they don't overlap */
.t-gauge__marker--kbbt .t-gauge__label { bottom: 38px; }
.t-gauge__marker--other .t-gauge__label { bottom: 38px; }

.t-gauge__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ============================================================
   ADJUSTMENT CHIPS (live — what's moving the number)
   ============================================================ */
.adj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  min-height: 28px;
}
.adj-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  animation: chipPop 0.4s var(--ease-out);
}
.adj-chip--up {
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.32);
  color: #4ade80;
}
.adj-chip--down {
  background: rgba(248, 113, 113, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.32);
  color: #f87171;
}
.adj-chip--neutral {
  background: rgba(245, 166, 35, 0.10);
  border: 1px solid rgba(245, 166, 35, 0.30);
  color: var(--accent);
}
.adj-chip svg { width: 11px; height: 11px; }
@keyframes chipPop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

/* ============================================================
   SOURCE COMPARISON CARDS
   ============================================================ */
.source-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  margin-bottom: 22px;
}
.src {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.src:hover { border-color: rgba(255, 255, 255, 0.15); }
.src__icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.src__icon svg { width: 18px; height: 18px; }
.src__body strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
  letter-spacing: -0.005em;
}
.src__body span {
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.4;
}
.src__body em { color: var(--ink-soft); font-style: italic; }
.src__num {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.src__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 100px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4ade80;
  vertical-align: 1px;
}

/* Mike's row — highlighted */
.src--mine {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.14) 0%, rgba(245, 166, 35, 0.04) 100%);
  border-color: rgba(245, 166, 35, 0.45);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.20), 0 6px 18px rgba(0, 0, 0, 0.25);
  padding: 14px 16px;
}
.src--mine .src__icon {
  background: var(--accent);
  color: var(--bg-base);
}
.src--mine .src__num {
  color: var(--accent);
  font-size: 16px;
}

/* ============================================================
   PHOTO PREP MINI-GUIDE
   ============================================================ */
.photo-prep {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.photo-prep__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.photo-prep ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.photo-prep li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  background: rgba(245, 166, 35, 0.06);
  border: 1px dashed rgba(245, 166, 35, 0.30);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.photo-prep li svg {
  width: 22px; height: 22px;
  color: var(--accent);
}

/* ============================================================
   MOBILE BAR ADJUSTMENTS FOR RANGE FORMAT
   ============================================================ */
.mobile-bar__num .mobile-bar__unit {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .cond-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .cond-grid > :nth-child(4),
  .cond-grid > :nth-child(5) {
    grid-column: span 1;
  }
  .cond { padding: 10px 6px 8px; }
  .cond__rarity { font-size: 9.5px; }
}

@media (max-width: 600px) {
  .t-range-big { font-size: 36px; }
  .t-gauge { padding: 50px 4px 20px; }
  .t-gauge__label { font-size: 9px; padding: 2px 5px; }
  .src { grid-template-columns: 36px 1fr auto; gap: 10px; padding: 10px 12px; }
  .src__icon { width: 32px; height: 32px; font-size: 10px; }
  .src__num { font-size: 13px; }
  .photo-prep ul { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .t-gauge__band, .t-gauge__marker, .adj-chip, .cond {
    transition: none !important;
    animation: none !important;
  }
}
