/*!
 * Quick Auto Center — /book/ Summary panel and phone summary bar (story 1.W2.23).
 * From the approved prototypes: design/prototypes/part-1/proto.css (Summary) and part-2/part-2.css (Drop-off block),
 * design/flow-part-1.md sections 2 and 5. The bar container (.sumbar, .sumbar__row, .sumbar__slot) is the shell's
 * (book.css); this file draws its toggle and sheet and the desktop panel (#summary.card.sum).
 * Tokens only (var(--*) or calc() over them); no background gradient, blur, glass, emoji, Unicode glyph icons or
 * pill shape outside .tag; every target >= 44px.
 */

/* SummaryPanel — ADAPT of .card with the DS keyline (4px Royal top rule) on the DS Panel "muted" surface
   (adjustment 3): --surface-muted sets the panel apart from the white page; hairlines inside use --border-default. */
.sum{display:flex;flex-direction:column;gap:var(--space-3);background:var(--surface-muted);border-color:var(--border-default);
  border-top:var(--rule-accent) solid var(--action-primary);box-shadow:var(--shadow-sm);}
:is(.sum,.sumbar__sheet) .tag--neutral{background:var(--surface-page);}
:is(.sum,.sumbar__sheet) .linkbtn{min-width:44px;justify-content:flex-end;}
.sum__head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);}
.sum__title{margin:0;font-size:var(--type-subtitle);line-height:var(--leading-tight);color:var(--text-heading);}
.sum__title:focus{outline:none;}
.sum__title:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px;}
.sum__veh,.sum__when{display:flex;justify-content:space-between;gap:var(--space-3);padding-bottom:var(--space-1);
  border-bottom:var(--border-width) solid var(--border-default);font-size:var(--type-body-sm);}
.sum__veh{align-items:center;}
.sum__when{align-items:flex-start;}
.sum__when dl{margin:0;display:flex;flex-direction:column;gap:var(--space-1);}
.sum__when dd{margin:0;}
.sum__k{display:block;font-weight:var(--weight-bold);font-size:var(--type-eyebrow);letter-spacing:var(--tracking-eyebrow);text-transform:uppercase;color:var(--text-muted);}
.sum__v{display:block;font-weight:var(--weight-semibold);color:var(--text-heading);line-height:var(--leading-tight);overflow-wrap:anywhere;}
.sum__warn{display:flex;align-items:center;gap:var(--space-1);margin-top:calc(var(--space-1) / 2);font-size:var(--type-caption);font-weight:var(--weight-semibold);color:var(--text-heading);}
.sum__warn .ic{flex:none;color:var(--status-warning);}
.sum__empty{margin:0;font-size:var(--type-body-sm);color:var(--text-muted);}
.sum__sub{margin:0;font-weight:var(--weight-bold);font-size:var(--type-eyebrow);letter-spacing:var(--tracking-eyebrow);text-transform:uppercase;color:var(--text-muted);}
.sum__list{list-style:none;margin:0;padding:0;}
.sum__item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:var(--space-2);border-bottom:var(--border-width) solid var(--border-default);
  font-size:var(--type-body-sm);color:var(--text-heading);}
.sum__name{display:flex;flex-direction:column;gap:calc(var(--space-1) / 2);min-width:0;padding:var(--space-1) 0;line-height:var(--leading-tight);}
.sum__note{font-size:var(--type-caption);color:var(--text-muted);overflow-wrap:anywhere;}
.sum__val{font-weight:var(--weight-bold);font-variant-numeric:tabular-nums;text-align:right;}
/* Remove — ADAPT of .dlg-close without border, 44px */
.sum__rm{width:44px;height:44px;display:flex;align-items:center;justify-content:center;padding:0;background:none;border:0;border-radius:var(--radius-md);color:var(--text-muted);cursor:pointer;}
.sum__rm:hover{background:var(--qac-royal-050);color:var(--action-primary);}
.sum__rm:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px;}
/* "Some services aren't priced yet." while a line is pending (adjustment 4) */
.sum__pending{margin:0;font-size:var(--type-caption);font-weight:var(--weight-semibold);color:var(--text-heading);}
/* Totals — CREATE on the .hours table rhythm: Subtotal, Tax, Total, as sent by the server (ADR D12) */
:is(.sum,.sumbar__sheet) .totals{margin:0;display:flex;flex-direction:column;gap:var(--space-1);}
:is(.sum,.sumbar__sheet) .totals__row{display:flex;justify-content:space-between;align-items:baseline;gap:var(--space-4);font-size:var(--type-body-sm);}
:is(.sum,.sumbar__sheet) .totals dt{color:var(--text-body);}
:is(.sum,.sumbar__sheet) .totals dd{margin:0;font-weight:var(--weight-semibold);color:var(--text-heading);font-variant-numeric:tabular-nums;}
:is(.sum,.sumbar__sheet) .totals__row--total{margin-top:var(--space-1);padding-top:var(--space-2);border-top:var(--border-width) solid var(--border-strong);font-size:var(--type-subtitle);}
:is(.sum,.sumbar__sheet) .totals__row--total :is(dt,dd){font-weight:var(--weight-bold);color:var(--text-heading);}
.sum__disclaimer{margin:0;font-size:var(--type-caption);font-weight:var(--weight-semibold);color:var(--text-heading);}
.sum__notes{display:flex;flex-direction:column;gap:var(--space-1);}

/* SummaryBar (phone and tablet) — the shell's .mbar ADAPT (book.css) on the same muted surface and keyline;
   the toggle expands the full summary in a sheet above the row, which keeps Continue visible. */
.sumbar__sheet{max-height:60vh;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:var(--space-3);
  padding:var(--space-2) var(--space-1) var(--space-3);margin-bottom:var(--space-2);border-bottom:var(--border-width) solid var(--border-default);}
.sumbar__sheet[hidden]{display:none;}
.sumbar__slot[hidden]{display:none;}
.sumbar__slot[hidden] + .btn{flex:1 1 auto;}
.sumbar__toggle{flex:1 1 auto;min-width:0;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);padding:var(--space-1) var(--space-3);
  background:var(--surface-page);border:var(--border-width) solid var(--border-default);border-radius:var(--radius-md);cursor:pointer;text-align:left;
  font-family:var(--font-text);color:var(--text-heading);}
.sumbar__toggle:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px;}
.sumbar__txt{display:flex;flex-direction:column;min-width:0;line-height:var(--leading-tight);}
.sumbar__count{font-weight:var(--weight-bold);font-size:var(--type-body-sm);}
.sumbar__total{font-size:var(--type-caption);color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sumbar__chev{display:flex;color:var(--action-primary);transition:transform var(--duration-base) var(--ease-standard);}
.sumbar__toggle[aria-expanded="true"] .sumbar__chev{transform:rotate(180deg);}
@media (prefers-reduced-motion: reduce){ .sumbar__chev{transition:none;} }
