/* Station detail inside the panel / sheet, and the fuel colors (V1-WEB B). Loaded with map.css. */
/* Station detail inside the panel. */
#view-detail { display: block; overflow-y: auto; padding: 8px 20px 96px; }
#view-detail[hidden] { display: none; }
.dtitle { margin: 0; font: var(--t-title1); letter-spacing: -.01em; text-align: left; overflow-wrap: anywhere; }
.dtitle:focus { outline: none; }
.dsub { margin: 0; text-align: left; color: var(--label-2); font: var(--t-body); overflow-wrap: anywhere; }
.daddr { font: var(--t-body); margin: 16px 0 0; }
/* Prices as equal tiles (one per fuel, Magna | Premium | Diesel): small fuel name in its color, big bold price, the change in red / green under it (an empty .dchg-none keeps the line so tiles align). A 3-column grid: one or two fuels keep the 3-up tile width, left-aligned. Fits 320 px: tiles are ~(320 - 32 - 16) / 3 = 90 px wide, the price shrinks with clamp() and never wraps. */
.dprices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; }
.dprice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 12px; border-radius: 16px; background: var(--panel-tile); }
.dprice-fuel { font: var(--t-footnote); font-weight: 600; color: var(--label-2); white-space: nowrap; }
.dprice-value { font: 700 clamp(1.0625rem, 5.4vw, 1.375rem)/1.2 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dprice .dchg { font: var(--t-footnote); min-height: 1.2em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dfoot { margin: 6px 4px 0; color: var(--label-2); font: var(--t-footnote); }
.devprice { margin-top: 12px; }
.devprice .tiers { list-style: none; margin: 0; padding: 0; font: var(--t-subhead); }
.devprice .tiers li { padding: 2px 0; }
.seen { margin: 6px 0 0; }
.seen summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; color: var(--label-2); font: var(--t-footnote); list-style: none; }
.seen summary::-webkit-details-marker { display: none; }
.seen summary .icon { width: 16px; height: 16px; color: var(--tint); }
.seen .dnote { margin-top: 0; }
.dnote { color: var(--label-2); font: var(--t-footnote); margin: 12px 0 0; }
.dtiles { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 16px; }
.dtile { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--panel-tile); color: var(--label); border: .5px solid color-mix(in srgb, var(--label) 8%, transparent); }
.dtile:hover { text-decoration: none; filter: brightness(1.06); }
.dtile-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.dtile-icon .icon { width: 18px; height: 18px; }
.dtile-label { font: var(--t-body); }
.dcard { list-style: none; margin: 10px 0 0; padding: 0 16px; border-radius: 16px; background: var(--panel-tile); }
.dcard li + li { border-top: .5px solid var(--separator); }
.dcard a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--label); font: var(--t-body); }
.dcard a:hover { text-decoration: none; color: var(--accent); }


/* Sections inside the sheet: collapsible groups of rows, the address and the network card. */
.darea { display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin: 6px 0 0; color: var(--label-2); font: var(--t-subhead); text-align: left; }
.darea.is-link { color: var(--accent); min-height: 44px; }
.darea.is-link:hover { text-decoration: none; filter: brightness(1.1); }
.darea .icon { width: 16px; height: 16px; }
button.dtile { font: inherit; text-align: left; cursor: pointer; }
.dtile-nav { position: relative; }
.dtile-go { position: absolute; top: 14px; right: 12px; width: 18px; height: 18px; color: var(--label-2); }
/* The chart preview in the detail is a button to the Historial view. */
.dchart-open { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.dchart-open:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
/* Historial view: back / station name / close bar, large heading, larger chart with the ranges under it. */
.hbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; margin: 0 -10px; }
.hback { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px 0 6px; border: 0; background: none; color: var(--tint); font: var(--t-body); cursor: pointer; }
.hback .icon { width: 22px; height: 22px; }
.hback:focus-visible { outline: 2px solid var(--tint); outline-offset: -2px; border-radius: 8px; }
.hname { margin: 0; text-align: center; font: var(--t-footnote); font-weight: 600; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htitle { margin: 4px 0 0; font: var(--t-title1); letter-spacing: -.01em; }
.htitle:focus { outline: none; }
.dchart-full { margin-top: 12px; }
.dchart-full .dchart-body { margin-top: 0; }
.dchart-full .dranges { margin-top: 10px; }
.dsec { margin-top: 12px; border-radius: 16px; background: var(--panel-tile); }
.dsec > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; font: var(--t-headline); cursor: pointer; list-style: none; }
.dsec > summary::-webkit-details-marker { display: none; }
.dsec > summary .chev { transition: transform 150ms var(--ease); }
.dsec[open] > summary .chev { transform: rotate(180deg); }
.dlist { list-style: none; margin: 0; padding: 0 16px 6px; }
.dlist li + li { border-top: .5px solid var(--separator); }
.drow { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 0; color: var(--label); font: var(--t-subhead); }
a.drow:hover { text-decoration: none; color: var(--accent); }
.drow-l { flex: none; max-width: 45%; color: var(--label-2); }
.drow-v { flex: 1; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.drow .chev { flex: none; width: 16px; height: 16px; }
.dsec-plain { padding: 12px 16px 6px; }
.dsec-plain .dlist { padding: 0; }
.dsec-h { margin: 0 0 4px; font: var(--t-headline); }
.dsec-plain .daddr { margin: 0 0 6px; }
.dnet-name { margin: 0 0 8px; font: var(--t-body); }
.dnet .store-badges { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 0 8px; }

/* Fuel colors (2026-12-03, still an experiment; tokens in tokens.css): Magna
   green, Premium red, Diesel graphite/silver. The chips are plain blue toggles
   (blue fill when on, outlined when off); the fuel colors stay on the price
   labels (map-rows.css), the pins and the detail prices. */
.mchips .chip { min-height: 32px; padding: 0 12px; font-weight: 700; border: 1.5px solid var(--gas-accent); background: none; color: var(--gas-accent); cursor: pointer; font-family: inherit; }
.mchips .chip[aria-pressed="true"] { background: var(--gas-accent-fill); color: #fff; }
.pin.f-regular .pin-cap, .pin.f-regular .pin-tile { color: var(--fuel-regular-pin); }
.pin.f-premium .pin-cap, .pin.f-premium .pin-tile { color: var(--fuel-premium-pin); }
.pin.f-diesel .pin-cap, .pin.f-diesel .pin-tile { color: var(--fuel-diesel-pin); }
.dprice[data-fuel="regular"] .dprice-fuel { color: var(--fuel-regular-text); }
.dprice[data-fuel="premium"] .dprice-fuel { color: var(--fuel-premium-text); }
.dprice[data-fuel="diesel"] .dprice-fuel { color: var(--fuel-diesel-text); }

/* Stocks-style header: round close and share buttons, bold name with the gray brand beside it, price + change, gray caption. */
.dbar { display: flex; justify-content: space-between; align-items: center; margin: 0 -10px; }
.dcirc { position: relative; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--label); cursor: pointer; }
.dcirc::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: color-mix(in srgb, var(--label) 10%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--label) 8%, transparent); }
.dcirc:hover::before { background: color-mix(in srgb, var(--label) 16%, transparent); }
.dcirc .icon { position: relative; width: 18px; height: 18px; }
.dtitlerow { display: grid; gap: 2px; margin-top: 6px; }
.dchg { font: var(--t-headline); }
.dchg.up { color: var(--spark-up); } .dchg.down { color: var(--spark-down); }

/* Price chart with ranges (gas). */
.dchart { margin-top: 16px; }
.dchart-view:empty { display: none; }
.dranges { display: flex; gap: 2px; }
.drange { position: relative; flex: 1; min-height: 32px; padding: 0 4px; border: 0; border-radius: 8px; background: none; color: var(--label-2); font: var(--t-footnote); font-weight: 600; cursor: pointer; }
.drange::after { content: ""; position: absolute; inset: -6px 0; }
.drange[aria-pressed="true"] { background: var(--fill); color: var(--label); }
.dchart-body { margin-top: 10px; }
.dchart-svg { display: block; width: 100%; height: 104px; overflow: visible; }
.dchart-full .dchart-svg { height: 220px; }
.dchart-svg.up { color: var(--spark-up); } .dchart-svg.down { color: var(--spark-down); } .dchart-svg.flat { color: var(--label-2); }
.dchart-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.dstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.dstat { display: grid; gap: 2px; }
.dstat-l { font: var(--t-footnote); color: var(--label-2); }
.dstat-v { font: var(--t-headline); font-variant-numeric: tabular-nums; }
.dchart-note { margin: 0; padding: 12px 0; }
/* Price history list (hidden until the history tile opens it): period, price (bold), change in red / green. */
.dhist { list-style: none; margin: 14px 0 0; padding: 0 16px; border-radius: 16px; background: var(--panel-tile); font-variant-numeric: tabular-nums; }
.dhist-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 0; }
.dhist-row + .dhist-row { border-top: .5px solid var(--separator); }
.dhist-main { display: grid; gap: 1px; min-width: 0; }
.dhist-label { font: var(--t-subhead); }
.dhist-sub { color: var(--label-2); font: var(--t-footnote); }
.dhist-px { display: flex; align-items: baseline; gap: 10px; flex: none; }
.dhist-price { font: 700 1rem/1.2 var(--font); }
.dhist-px .dchg { font: var(--t-subhead); min-width: 3rem; text-align: right; }
.dchart-note + .dhist { margin-top: 0; }
.dchart-more:empty { display: none; }
/* Fuel switch above the chart: segmented control; the selected segment takes the fuel's color. */
.dfuelsw { display: flex; gap: 2px; padding: 2px; margin-bottom: 10px; border-radius: 10px; background: var(--fill); }
.dfuelsw-b { position: relative; flex: 1; min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--label-2); font: var(--t-footnote); font-weight: 600; cursor: pointer; }
.dfuelsw-b::after { content: ""; position: absolute; inset: -6px 0; }
.dfuelsw-b[aria-checked="true"] { color: var(--fuel-regular-on); background: var(--fuel-regular); }
.dfuelsw-b[aria-checked="true"][data-fuel="premium"] { color: var(--fuel-premium-on); background: var(--fuel-premium); }
.dfuelsw-b[aria-checked="true"][data-fuel="diesel"] { color: var(--fuel-diesel-on); background: var(--fuel-diesel); }
.dfuelsw-b:focus-visible { outline: 2px solid var(--tint); outline-offset: 1px; }

/* Station strip over the phone sheet while a detail is open (strip.ts): the list's stations, scrolling sideways. Phones only; --strip-h = STRIP_H. */
.dstrip { display: none; }
@media (max-width: 599.98px) {
  .js .dstrip:not([hidden]) { display: block; position: absolute; z-index: 11; top: 0; left: 0; right: 0; height: 60px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: pan-x; background: var(--bar-bg); border-bottom: .5px solid var(--separator); }
  .dstrip::-webkit-scrollbar { display: none; }
  .dstrip-list { display: flex; gap: 6px; width: max-content; margin: 0; padding: 8px 12px; list-style: none; }
  .dstrip-item { display: grid; align-content: center; gap: 1px; min-width: 112px; max-width: 168px; height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--label); text-align: left; font: inherit; cursor: pointer; }
  .dstrip-item[aria-current="true"] { background: var(--fill); }
  .dstrip-name { font: var(--t-footnote); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dstrip-line { display: flex; align-items: center; gap: 6px; height: 18px; font: var(--t-footnote); font-variant-numeric: tabular-nums; color: var(--label-2); white-space: nowrap; }
  .dstrip-chg.up { color: var(--spark-up); } .dstrip-chg.down { color: var(--spark-down); }
  .dstrip-spark { width: 34px; height: 16px; margin-left: auto; }
  .mapapp:has(.dstrip:not([hidden])) .mctl-style { top: 72px; }
  .mapapp:has(.dstrip:not([hidden])) .mctl-bottom { top: 124px; }
}
