/* The drive time cost calculator page. Loaded after site.css and calculator.css, whose card, field, results and
   printout styles it shares. This adds the business and frequency choices, the field tags, the calculated field
   and the cost table. */
.drive-choice, .drive-group { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.drive-choice legend, .drive-group legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.drive-group { border-top: 1px solid var(--line); padding-top: 16px; }
.drive-group legend { float: left; width: 100%; font-size: 1.05rem; }
.drive-group legend + * { clear: both; }
.drive-group-note { margin: 0 0 12px; }
.drive-options { display: flex; flex-wrap: wrap; gap: 8px; }
.drive-options label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; cursor: pointer;
  border: 1.5px solid var(--input); border-radius: var(--radius); font-weight: 600;
}
.drive-options input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.drive-options label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.drive-options label:has(input:focus-visible) { outline: 3px solid var(--marker); outline-offset: 2px; }

.drive-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700; line-height: 1.5; padding: 0 7px; margin-left: 4px;
  border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--muted); vertical-align: middle;
  white-space: nowrap;
}
.drive-tag[data-kind="mine"] { border-color: var(--ink); color: var(--ink); }
.drive-tag[data-kind="calc"] { background: var(--marker); border-color: var(--ink); color: var(--ink); }
.calc-card input.is-calc { background: #FFF6CC; border-style: dashed; border-color: var(--ink); }
.drive-reset-row { margin: 4px 0 14px; }
[data-visits-row][hidden] { display: none; }

.drive-table-wrap { overflow-x: auto; }
/* Let the grid columns shrink on a phone, so the cost table scrolls inside its box instead of widening the page. */
.calc-grid > * { min-width: 0; }
.drive-costs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.drive-costs th, .drive-costs td {
  padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: baseline;
  white-space: nowrap;
}
.drive-costs th:first-child { text-align: left; padding-left: 0; font-weight: 400; }
.drive-costs thead th { font-weight: 700; border-bottom: 1.5px solid var(--ink); line-height: 1.3; vertical-align: bottom; }
.drive-costs thead th:first-child { font-weight: 700; }
.drive-basis { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.drive-costs td { font-weight: 700; }
.drive-costs .drive-row-total th, .drive-costs .drive-row-total td {
  background: var(--marker); font-weight: 700; font-size: 1rem; border-bottom: 1.5px solid var(--ink);
}
.drive-costs .drive-row-total th { padding-left: 10px; }
.drive-costs .drive-row-total td:last-child { padding-right: 10px; }
.drive-hours { margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); }
.drive-fee {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px;
  margin: 16px 0 0; padding: 14px 16px; background: var(--tint); border-radius: var(--radius); font-weight: 700;
}
.drive-fee strong { font-size: 1.4rem; }
.prose .drive-table-wrap { margin: 0 0 12px; }

@media (prefers-contrast: more) {
  .drive-costs .drive-row-total th, .drive-costs .drive-row-total td { outline: 2px solid var(--ink); }
}

@media print {
  .drive-costs { font-size: 10.5pt; }
  .drive-costs th, .drive-costs td { border-bottom: 0.75pt solid #777; padding: 5pt 6pt; }
  .drive-costs .drive-row-total th, .drive-costs .drive-row-total td {
    -webkit-print-color-adjust: exact; print-color-adjust: exact; border-bottom: 1pt solid #000;
  }
  .drive-fee { background: none; border: 1pt solid #000; padding: 8pt 10pt; }
  .drive-table-wrap { overflow: visible; }
  /* One page: this printout lists eleven inputs, so their rows are tighter than the bid calculator's. */
  .drive-hours { margin-top: 4pt; }
  .drive-fee { margin-top: 8pt; }
  .calc-inputs { margin-top: 12pt; }
  .calc-inputs th, .calc-inputs td { padding: 2.5pt 0; font-size: 11pt; }
  .calc-print-foot { margin-top: 14pt; }
}
