/* Panel list rows, modeled on Apple's Stocks (V1-WEB-DESIGN "Panel rows"):
   bold name over a gray line on the left; on the right a price over a pill
   (gas: the change of the last 30 days, with a sparkline between; several
   fuels: the prices stacked; EV: the speed pill). No logos. Loaded with map.css. */
:root { --dc-bg: #D6E6FA; --dc-fg: #0B4A9E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dc-bg: rgba(64, 156, 255, .22); --dc-fg: #8EC5FF; } }
:root[data-theme="dark"] { --dc-bg: rgba(64, 156, 255, .22); --dc-fg: #8EC5FF; }

/* The hairline separator starts at the text, like Stocks. */
.js #results { display: block; list-style: none; margin: 0; padding: 0; }
.js #results > li { background: linear-gradient(var(--separator), var(--separator)) 16px 100% / calc(100% - 16px) .5px no-repeat; }
.mrow { width: 100%; min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-radius: 0; background: none; color: var(--label); text-align: left; font: inherit; cursor: pointer; }
.mrow:hover, .mrow[aria-current="true"] { background: var(--fill); }
.mrow-tile { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--mtile-bg); color: var(--accent); }
.mrow-tile .icon { width: 20px; height: 20px; }
.mrow-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.mrow-title { font: var(--t-headline); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-sub, .mrow-meta { font: var(--t-subhead); color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-meta { font: var(--t-footnote); }
.mrow-meta.stale::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--gas); vertical-align: middle; }
.mrow-spark { flex: none; width: 56px; height: 28px; }
.spark { display: block; width: 100%; height: 100%; overflow: visible; }
.spark.up { color: var(--spark-up); } .spark.down { color: var(--spark-down); }
.spark-base { stroke: var(--label-3); stroke-width: 1; stroke-dasharray: 2 2; }
.spark-line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.mrow-trail { flex: none; min-width: 60px; display: grid; justify-items: end; gap: 4px; }
.mrow-price { font: var(--t-headline); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg { min-width: 60px; padding: 2px 8px; border-radius: 6px; color: #fff; font: var(--t-subhead); font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.chg.up { background: var(--chg-up); } .chg.down { background: var(--chg-down); }

/* Stacked-pill colors are swapped on purpose (dark UI uses the deep light-theme fills with white text, light UI the bright dark-theme fills with black text); pins, detail prices and chips keep --fuel-*. */
:root { --fuel-pill-regular: #30D158; --fuel-pill-premium: #FF453A; --fuel-pill-diesel: #C7C7CC; --fuel-pill-regular-on: #000; --fuel-pill-premium-on: #000; --fuel-pill-diesel-on: #000; --fuel-pill-diesel-ring: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fuel-pill-regular: #1F7A36; --fuel-pill-premium: #D70015; --fuel-pill-diesel: #3A3A3C; --fuel-pill-regular-on: #fff; --fuel-pill-premium-on: #fff; --fuel-pill-diesel-on: #fff; --fuel-pill-diesel-ring: inset 0 0 0 1px color-mix(in srgb, var(--label) 28%, transparent); } }
:root[data-theme="dark"] { --fuel-pill-regular: #1F7A36; --fuel-pill-premium: #D70015; --fuel-pill-diesel: #3A3A3C; --fuel-pill-regular-on: #fff; --fuel-pill-premium-on: #fff; --fuel-pill-diesel-on: #fff; --fuel-pill-diesel-ring: inset 0 0 0 1px color-mix(in srgb, var(--label) 28%, transparent); }
/* Several fuels: one pill each, filled with the fuel color (single-fuel mode is never tinted, so a red Premium never reads as "price went up"). */
.fstack { display: grid; justify-items: end; gap: 3px; font: var(--t-subhead); font-weight: 600; font-variant-numeric: tabular-nums; }
.fp { min-width: 60px; padding: 0 8px; line-height: 19px; border-radius: 6px; text-align: center; white-space: nowrap; }
.fp-regular { background: var(--fuel-pill-regular); color: var(--fuel-pill-regular-on); }
.fp-premium { background: var(--fuel-pill-premium); color: var(--fuel-pill-premium-on); }
.fp-diesel { background: var(--fuel-pill-diesel); color: var(--fuel-pill-diesel-on); box-shadow: var(--fuel-pill-diesel-ring, none); }
/* Fixed row height for stacked prices: 3 pills (19 px) + 2 gaps (3 px) = 63 px + 7 px padding top and bottom = 77 px; rows with fewer prices keep it and center the stack. */
.mrow.mrow-stack { height: 77px; min-height: 77px; padding-top: 7px; padding-bottom: 7px; }

/* EV speed pill: DC fast solid blue, DC lighter blue, AC neutral gray. */
.speed { padding: 2px 8px; border-radius: 6px; font: var(--t-caption); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.speed.fast { background: var(--ev-accent-fill); color: #fff; }
.speed.dc { background: var(--dc-bg); color: var(--dc-fg); }
.speed.ac { background: var(--fill); color: color-mix(in srgb, var(--label) 75%, transparent); }

@media (max-width: 359.98px) { .mrow { gap: 8px; padding: 12px; } .mrow-tile { width: 32px; height: 32px; border-radius: 9px; } .mrow-tile .icon { width: 18px; height: 18px; } .fp, .chg, .mrow-trail { min-width: 56px; } .mrow-spark { width: 44px; } .js #results > li { background-position: 12px 100%; background-size: calc(100% - 12px) .5px; } }
