/* Buyer tools: price map, provider profile enrichment, compare, multi-country fleet finder, ratings.
   Same look as style.css (hairline cards, pills, Inter). Loaded after style.css. */
:root {
  /* price map: one-hue sequential blue (kept apart from the green coverage ramp, so price never reads as "coverage") */
  --pr-1: #cde2fb; --pr-2: #9ec5f4; --pr-3: #6da7ec; --pr-4: #3987e5; --pr-5: #256abf; --pr-6: #184f95;
}
.muted-i { color: var(--muted); font-size: 12.5px; }
.muted.small, p.small { font-size: 12.5px; margin: 8px 0 0; }
.empty { color: var(--ink-2); background: var(--surface-3); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; margin: 6px 0; font-size: 13.5px; }
.lbl-sm { color: var(--muted); font-size: 12px; margin-right: 6px; }
a.src { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.na { color: var(--muted); }
.text-btn.sm { font-size: 12.5px; padding: 2px 6px; }
.badge.ok::before { content: "✓ "; }

/* ---------- price map ---------- */
#tab-prices.active { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; }
.price-controls { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.price-controls select { min-width: 0; padding: 6px 12px; font-size: 13.5px; }
#pricemap { display: block; width: 100%; height: calc(100vh - 230px); min-height: 520px; background: var(--sea); cursor: grab; }
#pricemap .country { stroke: var(--land-stroke); stroke-width: 0.7; vector-effect: non-scaling-stroke; }
#pricemap .country.out { fill: var(--land); }
#pricemap .country.in { cursor: pointer; }
#pricemap .country.in:hover, #pricemap .micro:hover { stroke: var(--ink); stroke-width: 1.4; }
#pricemap .country.selected, #pricemap .micro.selected { stroke: var(--ink); stroke-width: 2; }
#pricemap .micro { stroke: var(--surface); stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
#pricemap .lbl { font-weight: 600; font-size: 11px; pointer-events: none; text-anchor: middle; dominant-baseline: central; }
#price-panel { height: calc(100vh - 230px + 2px); }
.legend .pr-ticks span { width: auto; min-width: 30px; flex: 1; }
.legend .ramp div { flex: 1; }
.legend .keys .sw.sq { width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; }
.hatch-sw { background: var(--seq-0); background-image: repeating-linear-gradient(45deg, #fff 0 1.5px, transparent 1.5px 5px); }
.prank li { grid-template-columns: 24px 1fr 110px 50px; }
.rng { position: relative; height: 10px; }
.rng .rl { position: absolute; top: 4px; height: 2px; background: var(--pr-3); border-radius: 1px; }
.rng .rm { position: absolute; top: 0; width: 2px; height: 10px; margin-left: -1px; background: var(--pr-6); border-radius: 1px; }
details.method { margin-top: 16px; font-size: 12.5px; color: var(--ink-2); }
details.method summary { cursor: pointer; font-weight: 500; font-size: 13px; }
ul.offers { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
li.offer { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.of-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.of-prov { font-weight: 600; }
.of-price { margin-left: auto; white-space: nowrap; }
.of-price b { font-size: 15px; }
.of-veh { margin-top: 2px; }
.of-terms { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.of-inc { margin-top: 6px; align-items: center; }
.of-inc .chip { font-size: 11.5px; padding: 1px 7px; }
.of-src { margin-top: 6px; }

/* ---------- extra services: availability symbols (symbol + word, never colour alone) ---------- */
.av { display: inline-grid; place-items: center; width: 20px; height: 20px; font-size: 13px; line-height: 1; color: var(--ink-2); }
.av.included { color: var(--accent); }
.av.optional { color: var(--ink); }
.av.on_request, .av.not_offered, .av.none { color: var(--muted); }
a.av-link { text-decoration: none; border-radius: 6px; display: inline-block; }
a.av-link:hover { background: var(--surface-2); }
.av-w { font-size: 13px; }
.av-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.av-legend > span { display: inline-flex; align-items: center; gap: 2px; }
table.ex-matrix { border-collapse: collapse; font-size: 13px; }
table.ex-matrix th, table.ex-matrix td { padding: 3px 6px; text-align: center; border-bottom: 1px solid var(--grid); }
table.ex-matrix tbody th { text-align: left; font-weight: 400; color: var(--ink); white-space: nowrap; padding-right: 14px; }
table.ex-matrix thead th { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.chip.ex.included { background: #e7f3ea; color: #23633f; }
.chip.ex.optional { background: var(--surface-2); color: var(--ink); }

/* ---------- coverage status cells ---------- */
.st-strip { display: flex; flex-wrap: wrap; gap: 3px; }
.st-cell { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 3px; border-radius: 5px; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-cell.verified { background: var(--seq-6); color: #fff; }
.st-cell.partner { background: var(--seq-3); color: #10331f; }
.st-cell.listed { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--seq-5); }
.st-cell.none { background: var(--surface-2); color: var(--muted); }
.st-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.st-legend .st-cell { min-width: 14px; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }

/* ---------- provider profile ---------- */
.prof-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.prof-grid.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prof-grid > .card, .prof-side > .card { margin: 0; }
.prof-side { display: flex; flex-direction: column; gap: 16px; }
.prof-grid .badge { margin: 4px 0 2px; display: inline-block; }
dl.facts.wide { grid-template-columns: 120px 1fr; }
ul.ratings, ul.awards, ul.plain { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
ul.ratings li { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: start; }
.r-score b { font-size: 17px; }
.r-score { color: var(--ink-2); font-size: 12px; }
ul.awards li { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; }
.yr { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pc-status { margin: 2px 0 4px; }
.pc-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.offers-row td { background: var(--surface-3); }

/* ---------- compare ---------- */
.cmp-head { padding: 16px 20px; }
.cmp-pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cmp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cmp-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13.5px; font-weight: 500; }
.cmp-chip button { border: 0; background: #fff; width: 20px; height: 20px; border-radius: 50%; line-height: 1; padding: 0; color: var(--ink-2); }
table.cmp { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 640px; }
table.cmp th, table.cmp td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--grid); }
table.cmp thead th { font-size: 15px; font-weight: 600; position: sticky; top: 0; background: var(--surface); }
table.cmp tbody th { font-weight: 400; color: var(--ink-2); width: 190px; }
table.cmp tbody td { width: calc((100% - 190px) / 4); }
table.cmp tr.sec th { padding-top: 18px; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--axis); }
table.cmp .st-cell { min-width: 24px; font-size: 10px; }

/* ---------- multi-country fleet ---------- */
.fleet-pick { padding: 18px 20px; }
.fp-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.fp-actions { display: flex; align-items: center; gap: 8px; }
.fp-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 20px; }
.fp-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.fp-c { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.fp-c:hover { background: var(--surface-2); }
.fp-c[aria-pressed="true"] { background: #161616; border-color: #161616; color: #fff; }
.fleet-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 16px 20px; margin-bottom: 10px; }
.fl-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.fl-cover { text-align: right; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.fl-cover b { font-size: 20px; color: var(--ink); }
.fl-cover span { display: block; font-size: 12px; color: var(--muted); }
.fl-miss { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.fl-ip { font-size: 13px; margin-top: 8px; }
.fl-ex { margin-top: 8px; align-items: center; }
.fl-actions { display: flex; gap: 8px; margin-top: 12px; }
.fl-actions .pill[aria-pressed="true"] { background: var(--surface-2); }

/* ---------- ratings ---------- */
table.rt-matrix { border-collapse: collapse; font-size: 13px; }
table.rt-matrix th, table.rt-matrix td { padding: 6px 10px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
table.rt-matrix thead th { font-size: 12px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
table.rt-matrix tbody th { font-weight: 500; white-space: nowrap; }
a.rt { display: flex; flex-direction: column; gap: 2px; text-decoration: none; min-width: 74px; }
a.rt + a.rt { margin-top: 6px; }
a.rt b, .rt-all b { font-size: 14px; }
.rt-bar { display: block; width: 60px; height: 4px; background: var(--grid); border-radius: 2px; overflow: hidden; }
.rt-bar i { display: block; height: 100%; background: var(--accent); }
.rt-n { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rt-all { background: var(--surface-3); }

@media (max-width: 1180px) {
  #tab-prices.active { grid-template-columns: 1fr; }
  #price-panel { height: auto; min-height: 0; }
  .prof-grid, .prof-grid.even { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  #pricemap { height: 60vh; min-height: 380px; }
  .price-controls .seg { max-width: 100%; overflow-x: auto; }
  .fl-top { flex-direction: column; }
  .fl-cover { text-align: left; }
}
