/* ═══════════ RESULTS PAGE — FULL WIDTH REDESIGN ═══════════ */

/* ── Vehicle Hero (full bleed) ── */
.vehicle-hero {
  width: 100%;
  background: linear-gradient(135deg, #2D3436 0%, #6C5CE7 50%, #00CEC9 100%);
  color: white;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.vehicle-hero::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  top: -100px; right: -50px;
}
.vehicle-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.vehicle-hero-info { z-index: 1; }
.vehicle-hero .hero-plate {
  font-size: 2.2rem;
  font-weight: 900;
  background: #FFD60A;
  color: #000;
  display: inline-block;
  padding: 6px 28px;
  border-radius: 6px;
  letter-spacing: 5px;
  border: 3px solid #000;
  margin-bottom: 16px;
}
.vehicle-hero .hero-name {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 4px;
}
.vehicle-hero .hero-subtitle {
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: 20px;
}
.vehicle-hero .hero-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.vehicle-hero .hero-pill {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-pill.good { background: rgba(0,184,148,0.25); color: #55efc4; }
.hero-pill.bad { background: rgba(255,107,107,0.25); color: #fab1a0; }
.hero-pill.warn { background: rgba(253,203,110,0.25); color: #ffeaa7; }
.hero-pill.info { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }

.vehicle-hero-image {
  width: 280px;
  height: 195px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.vehicle-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-hero-image .placeholder { font-size: 4rem; opacity: 0.4; }

/* ── Score Dashboard (full bleed) ── */
.score-dashboard {
  width: 100%;
  background: #F8F7FF;
  padding: 32px 0;
}
.score-dashboard-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: center;
}

/* Health Score Gauge */
.health-gauge { text-align: center; }
.health-gauge .gauge-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 12px;
}
.health-gauge .gauge-wrap svg { position: absolute; top: 0; left: 0; }
.health-gauge .gauge-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.health-gauge .gauge-score { font-size: 2.8rem; font-weight: 900; line-height: 1; }
.health-gauge .gauge-out-of { font-size: 1rem; font-weight: 700; color: var(--text-light); }
.health-gauge .gauge-label { font-size: 0.82rem; font-weight: 700; color: var(--text-light); margin-top: 2px; }
.health-gauge .gauge-quip {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.3;
  font-style: italic;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}

/* Mini stat cards */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.mini-stat {
  background: white;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(108,92,231,0.06);
  transition: transform 0.2s;
}
.mini-stat:hover { transform: translateY(-3px); }
.mini-stat .ms-icon { font-size: 1.5rem; margin-bottom: 6px; }
.mini-stat .ms-value { font-size: 1.5rem; font-weight: 900; }
.mini-stat .ms-label { font-size: 0.68rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* ── MOT Due Alert (full bleed) ── */
.mot-alert {
  width: 100%;
  padding: 20px 0;
}
.mot-alert-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}
.mot-alert-box {
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: white;
}
.mot-alert-box.urgent {
  background: linear-gradient(135deg, #FF6B6B, #ee5a24);
  box-shadow: 0 6px 25px rgba(255,107,107,0.35);
  animation: pulseGlow 2s ease-in-out infinite;
}
.mot-alert-box.ok {
  background: linear-gradient(135deg, #00B894, #55efc4);
  box-shadow: 0 4px 20px rgba(0,184,148,0.2);
}
.mot-alert-box .alert-icon { font-size: 2.5rem; flex-shrink: 0; }
.mot-alert-box h2 { font-size: 1.2rem; font-weight: 900; }
.mot-alert-box p { font-size: 0.88rem; opacity: 0.9; margin-top: 2px; }

/* ── Content sections (contained) ── */
.results-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px;
}
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.results-full { grid-column: 1 / -1; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 3px;
}
.timeline-node {
  position: relative;
  margin-bottom: 16px;
  cursor: pointer;
}
.timeline-node::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary);
  z-index: 1;
}
.timeline-node.pass::before { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-node.fail::before { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }

.timeline-card {
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.2s;
  border-left: 4px solid transparent;
}
.timeline-node.pass .timeline-card { border-left-color: var(--success); }
.timeline-node.fail .timeline-card { border-left-color: var(--danger); }
.timeline-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateX(4px); }

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.timeline-date { font-size: 0.9rem; font-weight: 800; color: var(--text); }
.timeline-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 20px;
}
.timeline-badge.pass { background: rgba(0,184,148,0.12); color: var(--success); }
.timeline-badge.fail { background: rgba(255,107,107,0.12); color: var(--danger); }

.timeline-meta { font-size: 0.78rem; color: var(--text-light); margin-bottom: 6px; }
.timeline-defects { display: none; margin-top: 10px; }
.timeline-node.open .timeline-defects { display: block; }
.timeline-defect-hint {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 6px;
}
.timeline-clean {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
  margin-top: 4px;
}

.tl-defect {
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
}
.tl-defect.ADVISORY { background: #fff8e1; border-left: 3px solid var(--warning); color: #6d4c00; }
.tl-defect.DANGEROUS { background: #fce4ec; border-left: 3px solid #c62828; color: #b71c1c; font-weight: 600; }
.tl-defect.MAJOR, .tl-defect.FAIL { background: #ffebee; border-left: 3px solid var(--danger); color: #b71c1c; }
.tl-defect.MINOR { background: #fff3e0; border-left: 3px solid #fb8c00; color: #7a3d00; }
.tl-defect-type { font-weight: 800; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.4px; margin-right: 4px; }

/* ── Mileage SVG Chart ── */
.mileage-chart-wrap {
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.mileage-chart-wrap h3 { font-size: 0.88rem; font-weight: 800; color: var(--text-light); margin-bottom: 12px; }
.mileage-chart-wrap svg { width: 100%; height: auto; }
.mileage-dot { cursor: pointer; transition: r 0.2s; }
.mileage-dot:hover { r: 6; }

/* ── Fuel Hero Map ── */
.fuel-hero-map {
  width: 100%;
  height: 50vh;
  min-height: 350px;
  max-height: 550px;
  position: relative;
}
.fuel-hero-map .fuel-map-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 32px;
  background: linear-gradient(transparent, rgba(45,52,54,0.85));
  color: white;
  z-index: 400;
  pointer-events: none;
}
.fuel-hero-map .fmo-title { font-size: 1.6rem; font-weight: 900; }
.fuel-hero-map .fmo-sub { font-size: 0.9rem; opacity: 0.8; }

/* ── Fuel Price Bars ── */
.fuel-bars { padding: 0 32px; max-width: 1400px; margin: 0 auto; }
.fuel-bar-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(108,92,231,0.06);
  cursor: pointer;
  transition: all 0.2s;
}
.fuel-bar-item:hover { background: rgba(108,92,231,0.03); padding-left: 8px; border-radius: 8px; }
.fuel-bar-item:last-child { border-bottom: none; }

.fuel-bar-rank {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 900; color: white;
  background: var(--primary);
}
.fuel-bar-rank.first { background: var(--success); }

.fuel-bar-info h4 { font-size: 0.92rem; font-weight: 800; margin-bottom: 2px; }
.fuel-bar-info p { font-size: 0.75rem; color: var(--text-light); }

.fuel-bar-track {
  margin-top: 6px;
  height: 8px;
  border-radius: 4px;
  background: #eee;
  overflow: hidden;
}
.fuel-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}
.fuel-bar-fill.cheapest { background: linear-gradient(90deg, var(--success), #55efc4); }
.fuel-bar-fill.normal { background: linear-gradient(90deg, var(--primary), #a29bfe); }

.fuel-bar-price {
  text-align: right;
  min-width: 80px;
}
.fuel-bar-price .fbp-val { font-size: 1.4rem; font-weight: 900; }
.fuel-bar-price .fbp-val.cheapest { color: var(--success); }
.fuel-bar-price .fbp-label { font-size: 0.62rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; }

.fuel-savings {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 32px;
  text-align: center;
}
.fuel-savings-box {
  background: linear-gradient(135deg, rgba(0,184,148,0.08), rgba(85,239,196,0.08));
  border: 2px solid rgba(0,184,148,0.15);
  border-radius: 14px;
  padding: 16px 24px;
  display: inline-block;
}
.fuel-savings-box .fs-big { font-size: 1.3rem; font-weight: 900; color: var(--success); }
.fuel-savings-box .fs-text { font-size: 0.82rem; color: var(--text-light); margin-top: 2px; }

/* ── MOT Stations in results body ── */
.garages-section { margin-top: 8px; }
.garages-section h3 {
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.garage-card {
  background: white;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: all 0.2s;
  cursor: pointer;
}
.garage-card:hover { transform: translateX(4px); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.garage-info h4 { font-size: 0.88rem; font-weight: 800; }
.garage-info h4 a { color: inherit; text-decoration: none; }
.garage-info h4 a:hover { color: var(--primary); }
.garage-info p { font-size: 0.72rem; color: var(--text-light); line-height: 1.4; }
.garage-info .ggl { font-size: 0.7rem; font-weight: 700; color: var(--primary); text-decoration: none; display: inline-block; margin-top: 3px; }
.garage-info .ggl:hover { text-decoration: underline; }
.garage-dist { text-align: center; flex-shrink: 0; }
.garage-dist .gd-val { font-size: 1.1rem; font-weight: 900; color: var(--primary); }
.garage-dist .gd-unit { font-size: 0.6rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; }

.garages-map {
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 2px solid rgba(108,92,231,0.08);
}

/* ── Cross-sell banner ── */
.cross-sell {
  max-width: 1400px;
  margin: 8px auto 0;
  padding: 0 32px 32px;
}
.cross-sell-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 16px;
  padding: 28px 32px;
  text-align: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}
.cross-sell-box:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(108,92,231,0.35); }
.cross-sell-box .cs-emoji { font-size: 2.2rem; margin-bottom: 8px; }
.cross-sell-box h3 { font-size: 1.15rem; font-weight: 900; }
.cross-sell-box p { font-size: 0.85rem; opacity: 0.85; margin-top: 2px; }

/* ── Fuel Finder Sidebar+Map Layout ── */
.fuel-finder-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: calc(100vh - 48px);
  overflow: hidden;
}
.fuel-sidebar {
  background: #1a1a2e;
  color: white;
  overflow-y: auto;
  padding: 0;
}
.fuel-sidebar-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.fuel-sidebar-header h2 { font-size: 1.2rem; font-weight: 900; }
.fuel-sidebar-header p { font-size: 0.82rem; opacity: 0.6; margin-top: 2px; }

.fuel-insights {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.fuel-insight-card {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.fuel-insight-card h4 { font-size: 0.78rem; font-weight: 800; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.fuel-insight-card .fi-range { display: flex; justify-content: space-between; align-items: baseline; }
.fuel-insight-card .fi-low { font-size: 1.2rem; font-weight: 900; color: var(--success); }
.fuel-insight-card .fi-high { font-size: 1.2rem; font-weight: 900; color: var(--danger); }
.fuel-insight-card .fi-dash { color: rgba(255,255,255,0.3); }
.fuel-insight-card .fi-avg { font-size: 0.78rem; color: rgba(255,255,255,0.5); text-align: right; }
.fuel-insight-card .fi-text { font-size: 0.78rem; color: rgba(255,255,255,0.7); line-height: 1.4; }
.fuel-insight-card .fi-highlight { color: var(--success); font-weight: 800; }

.fuel-sort-tabs {
  display: flex;
  padding: 10px 20px;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.fuel-sort-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  border: none;
  transition: all 0.2s;
}
.fuel-sort-tab.active { background: var(--primary); color: white; }
.fuel-sort-tab:hover { background: rgba(255,255,255,0.1); color: white; }

.fuel-station-cards { padding: 10px 0; }
.fuel-stn-card {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  cursor: pointer;
  transition: background 0.2s;
}
.fuel-stn-card:hover { background: rgba(255,255,255,0.04); }
.fuel-stn-card .stn-price { min-width: 70px; }
.fuel-stn-card .stn-price-val { font-size: 1.3rem; font-weight: 900; color: white; }
.fuel-stn-card .stn-price-val.cheapest { color: var(--success); }
.fuel-stn-card .stn-price-diff { font-size: 0.7rem; font-weight: 700; }
.fuel-stn-card .stn-price-diff.cheaper { color: var(--success); }
.fuel-stn-card .stn-cheapest-badge {
  font-size: 0.6rem; font-weight: 800; color: var(--success);
  text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px;
}
.fuel-stn-card .stn-info h4 { font-size: 0.85rem; font-weight: 800; color: white; margin-bottom: 2px; }
.fuel-stn-card .stn-info p { font-size: 0.7rem; color: rgba(255,255,255,0.5); }
.fuel-stn-card .stn-info .stn-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.fuel-stn-card .stn-info .stn-tag {
  font-size: 0.6rem; font-weight: 700; padding: 2px 7px; border-radius: 4px;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6);
}
.fuel-stn-card .stn-info .stn-fresh { font-size: 0.65rem; color: var(--success); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.fuel-stn-card .stn-dist { text-align: right; min-width: 50px; }
.fuel-stn-card .stn-dist-val { font-size: 0.85rem; font-weight: 800; color: rgba(255,255,255,0.8); }
.fuel-stn-card .stn-dist-unit { font-size: 0.6rem; color: rgba(255,255,255,0.4); }

.fuel-main-map { height: 100%; min-height: 500px; }

/* Home icon on map */
.home-pin {
  background: #e74c3c;
  color: white;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .fuel-finder-layout { grid-template-columns: 1fr; height: auto; }
  .fuel-sidebar { max-height: none; }
  .fuel-main-map { height: 50vh; min-height: 300px; }
  .vehicle-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .vehicle-hero-image { display: none; }
  .vehicle-hero .hero-pills { justify-content: center; }
  .score-dashboard-inner { grid-template-columns: 1fr; text-align: center; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  .fuel-hero-map { height: 40vh; min-height: 280px; }
}
@media (max-width: 600px) {
  .vehicle-hero-inner { padding: 24px 16px; }
  .vehicle-hero .hero-plate { font-size: 1.6rem; padding: 4px 18px; }
  .vehicle-hero .hero-name { font-size: 1.3rem; }
  .score-dashboard-inner { padding: 0 16px; }
  .results-body { padding: 20px 16px; }
  .fuel-bars { padding: 0 16px; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .fuel-hero-map .fmo-title { font-size: 1.2rem; }
}
