/* Every electric car ranked by what 100 km cost (src/app/charging/page.ts): the list's own rows and table
   (explorer.css), the charge's figures in its columns. Tokens only. */

.rc-h { font-size: 1.5rem; line-height: 1.12; text-wrap: balance; max-width: 22em; }
.rc-head-block .ex-sub { white-space: normal; text-wrap: balance; }
.rc-head-block { grid-template-columns: minmax(0, 1fr); grid-template-areas: "h" "sub"; }

/* The way to the map of the public stations (src/app/chargers/). */
.rc-map { margin: 0; }
.rc-map a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font: 650 0.9375rem/1.3 var(--body); color: var(--ink); text-underline-offset: 3px; }
.rc-map .ic { width: 16px; height: 16px; }

/* The price of a kWh at home: its rules are app.css's (.cc-kwh), shared with an electric car's page. */
.rc-kwh { display: grid; gap: 6px; }
.rc .cc-kwh-h { margin: 0; }

.rc-head small { display: block; margin-top: 2px; font: 500 0.75rem/1.1 var(--body); color: var(--soft); }
.rc-ref-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rc-ref-id .ic { flex: none; width: 18px; height: 18px; color: var(--soft); }
.rc-ref-id b { display: block; font: 700 0.9375rem/1.2 var(--display); }
.rc-ref-id small { display: block; font: 500 0.75rem/1.3 var(--body); color: var(--soft); }

.rc-rests { display: grid; gap: 4px; max-width: 62em; margin: 0; padding: 0; list-style: none; font: 400 0.8125rem/1.45 var(--body); color: var(--soft); text-wrap: pretty; }

/* A phone: the list's card, then a line of four figures under it; the sorted figure is the card's own (its hero). */
@media (max-width: 759px) {
  .rc .ex-row { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto 44px auto; }
  .rc .ex-row > .ex-car > .ex-id { grid-row: 1 / 3; }
  .rc .ex-row > .ex-car > .ex-keep { grid-column: 4; grid-row: 2; justify-self: end; margin-inline-end: 4px; }
  .rc .ex-row > .rc-v { display: flex; flex-direction: column; justify-content: flex-start; gap: 3px; grid-row: 3; min-width: 0; padding-block: 9px 12px; padding-inline: 12px 4px; border-top: 1px solid var(--line); font: 750 0.9375rem/1.15 var(--display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
  .rc .ex-row > .rc-v + .rc-v { padding-inline-start: 8px; }
  .rc .rc-l { font: 550 0.75rem/1.2 var(--body); letter-spacing: 0; color: var(--soft); }
  .rc .rc-v .ex-none.is-said { font: 550 0.75rem/1.2 var(--body); color: var(--soft); }
  .rc .rc-hero, .rc .rc-ref-hero { text-align: end; }
  .rc .rc-hero small, .rc .rc-ref-hero small { display: block; margin-top: 3px; font: 550 0.75rem/1 var(--body); letter-spacing: 0; color: var(--soft); }
  .rc .rc-ref { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--road); box-shadow: inset 0 0 0 1px var(--line); }
  .rc .rc-ref > .ex-car { display: contents; }
  .rc .rc-ref .rc-ref-hero { display: block; font: 750 1rem/1 var(--display); white-space: nowrap; }
  .rc .rc-ref .rc-ref-hero b { font: inherit; }
}

/* With room: the list's table, whole on the page (no box of its own to scroll), the heads with what they are about. */
@media (min-width: 760px) {
  .rc-h { font-size: 2rem; }
  .rc .rc-scroll { max-height: none; min-height: 0; overflow: auto hidden; }
  .rc .ex-heads > * { position: static; height: 60px; }
  .rc .rc-head { height: auto; align-items: flex-end; padding-block: 6px; padding-inline: 8px 6px; }
  .rc .rc-head .ex-hl { display: grid; justify-items: end; text-align: end; line-height: 1.15; }
  .rc .rc-l { display: none; }
  /* The figures share the whole width, each right-aligned under its head; the car's cell keeps the list's width. */
  .rc .ex-fill { display: none; }
  .rc .ex-v, .rc .ex-ch { width: calc((100% - var(--car-w)) / 6); }
  .rc .ex-v { padding-inline-end: 20px; }
  .rc .ex-ch { padding-inline-end: 14px; }
  .rc .rc-ref > * { background: color-mix(in srgb, var(--road) 55%, var(--card)); }
  .rc .rc-ref .ex-car { padding: 12px 16px; }
  .rc .rc-ref:hover > * { background: color-mix(in srgb, var(--road) 55%, var(--card)); }
}
/* Under 1440 the car's cell gives up some of its width and the figures draw closer, so that the price is in sight from
   1024 px without sliding the table. */
@media (min-width: 760px) and (max-width: 1439px) {
  .rc .rc-scroll { --car-w: 340px; --pic: 96px; }
  .rc .ex-pic { --mm: 0.0196px; }
  .rc .ex-v .ex-none.is-said, .rc .ex-ch .ex-hl { white-space: normal; }
  .rc .ex-v { min-width: 0; padding-block: 0; padding-inline: 4px 12px; }
  .rc .ex-v .ex-none.is-said { white-space: normal; }
  .rc .ex-ch { padding-inline-end: 6px; }
}

/* A figure not given: a dash that keeps its row; its reason in words for a screen reader (D35). */
.rc .ex-none { position: relative; }
