/* ============================================
   REPAIR VS REPLACE CAR CALCULATOR
   ============================================ */

.rr-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 3rem;
  align-items: start;
}

.rr-results {
  position: relative;
}

/* ---- Verdict banner ---- */

.rr-verdict-banner {
  background: var(--navy);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

.rr-verdict-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.rr-verdict-label {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.rr-verdict-savings {
  font-size: 1rem;
  font-weight: 600;
  color: var(--emerald);
}

/* ---- Compare columns ---- */

.rr-compare-card {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.5rem;
}

.rr-compare-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.rr-compare-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.rr-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--surface-alt);
}

.rr-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rr-cost-val {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.rr-cost-total {
  border-top: 1px solid var(--surface-alt);
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  font-weight: 700;
}

.rr-cost-total span { color: var(--navy); }

.rr-col-keep .rr-cost-total .rr-cost-val { color: var(--emerald); }
.rr-col-replace .rr-cost-total .rr-cost-val { color: var(--red); }

.rr-winner .rr-cost-total .rr-cost-val { color: var(--emerald) !important; }
.rr-loser .rr-cost-total .rr-cost-val { color: var(--red) !important; }

/* ---- Total cost bars ---- */

.rr-total-card {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.5rem;
}

.rr-total-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.rr-total-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rr-total-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rr-total-label {
  width: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.rr-total-track {
  flex: 1;
  height: 32px;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}

.rr-total-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.6s var(--ease-out);
}

.rr-bar-keep { background: var(--emerald); }
.rr-bar-replace { background: #3B82F6; }

.rr-total-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  min-width: 70px;
  text-align: right;
}

.rr-total-diff {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--emerald);
  padding: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
}

/* ---- Break-even ---- */

.rr-breakeven-card {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.5rem;
}

.rr-breakeven-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.rr-breakeven-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 1024px) {
  .rr-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .fc-results-sticky {
    position: static;
  }
}

@media (max-width: 768px) {
  .rr-compare-cols {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .rr-verdict-label {
    font-size: 1.25rem;
  }

  .rr-total-label {
    width: 70px;
    font-size: 0.7rem;
  }
}
