/* compare.css — styling specific to the Compare Vehicles page; style.css carries the skins and
   cycles.css the shared table and chip styles */

/* the vehicle pickers: one column each, marked with the colour its line has in the charts */
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.slots.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slots.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slot { display: flex; align-items: flex-start; gap: 6px; min-width: 0; border-left: 5px solid var(--c, var(--line)); padding-left: 8px; }
.slot[hidden] { display: none; }
.slot .vpWrap { flex: 1 1 0; min-width: 0; max-width: none; }
.controls button.dropBtn { flex: 0 0 auto; line-height: 1; padding: 8px 9px !important; margin-top: 6px; }
.controls button.dropBtn[hidden] { display: none; }
@media (max-width: 1000px) { .slots.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .slots, .slots.four { grid-template-columns: minmax(0, 1fr); } }

.controls .crow { gap: 8px 10px; }
.controls .crow .tbar { margin-left: auto; }
.controls .crow .chk.chip { color: var(--ink); white-space: nowrap; }
.controls .crow .chk input.numIn { width: 3.2em; }

/* the highlights table: a coloured bar over each vehicle, group headings, and the best cell shaded */
#cmpTable { table-layout: fixed; min-width: 620px; }
#cmpTable.four { min-width: 780px; }
#cmpTable.two { min-width: 460px; }
#cmpTable th:first-child { width: 190px; }
#cmpTable th, #cmpTable td { white-space: normal; vertical-align: top; }
#cmpTable thead th.vh { border-top: 5px solid var(--c); color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: 0;
  font-weight: 700; line-height: 1.25; padding-top: 8px; }
#cmpTable thead th.vh small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
#cmpTable tbody th { font-weight: 600; cursor: help; }
#cmpTable tr.grp th { text-align: left; padding-top: 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--amber-dark); cursor: default; border-bottom: 2px solid var(--line); }
#cmpTable td { font-variant-numeric: tabular-nums; font-weight: 600; }
#cmpTable td.txt { font-weight: 400; font-size: 13px; }
#cmpTable td .d { display: block; margin-left: 0; }
#cmpTable td.best { background: color-mix(in srgb, var(--amber) 18%, transparent); font-weight: 800; }
.bestKey { background: color-mix(in srgb, var(--amber) 18%, transparent); font-style: normal; font-weight: 700; padding: 1px 6px; border-radius: 4px; color: var(--ink); }
@media (max-width: 760px) {
  #cmpTable th:first-child { width: 120px; }
  #cmpTable th, #cmpTable td { padding: 6px 8px; font-size: 13px; }
}

/* the trip strip: one row per vehicle, a bar in its colour while driving and an outlined gap at each stop */
.stripCard { margin-top: 16px; }
.tsRow { display: grid; grid-template-columns: 11em minmax(0, 1fr) 6.5em; column-gap: 12px; align-items: center; margin-top: 12px; }
.tsName { font-weight: 700; font-size: 14px; border-left: 5px solid var(--c); padding-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsTrack { min-width: 0; }
.tsBar { display: flex; height: 20px; gap: 2px; min-width: 2px; }
.tsBar i { display: block; min-width: 0; border-radius: 3px; }
.tsDrive { background: var(--c); }
.tsStop { min-width: 3px !important; box-sizing: border-box; border: 1px dashed var(--muted); }
.tsTot { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tsWords { grid-column: 2 / 4; font-size: 12px; color: var(--muted); margin-top: 3px; }
.tsAxisRow { margin-top: 10px; }
.tsAxis { position: relative; height: 20px; border-top: 1px solid var(--line); }
.tsAxis span { position: absolute; top: 3px; transform: translateX(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; }
.tsAxis span:first-child { transform: none; }
.tsKey { display: inline-block; width: 18px; height: 10px; border-radius: 2px; vertical-align: baseline; margin-left: 4px; box-sizing: border-box; }
.tsKeyDrive { background: var(--ink); margin-left: 0; }
.tsKeyStop { border: 1px dashed var(--muted); }
@media (max-width: 620px) {
  .tsRow { grid-template-columns: minmax(0, 1fr) auto; }
  .tsName { grid-column: 1; grid-row: 1; }
  .tsTot { grid-column: 2; grid-row: 1; }
  .tsTrack, .tsAxis, .tsWords { grid-column: 1 / 3; }
  .tsTrack { margin-top: 4px; }
  .tsAxisRow > div:first-child, .tsAxisRow > div:last-child { display: none; }
}
