/* ==========================================================================
   Courtesy cars (courtesy-cars.php): the live car rows on their board, the
   numbered steps, and the two sign-out sheets. Everything else is styles.css.
   ========================================================================== */

/* ---- The car rows: the panel's .carcard, enlarged for the page ---- */
.carlist { list-style: none; display: grid; gap: .75rem; }
.carcard--board { grid-template-columns: auto 1fr; align-items: start; padding: 1rem 1.1rem; border-width: var(--frame); }
.carcard--board .carcard__dot { width: .8rem; height: .8rem; margin-top: .5rem; }
.carcard--board .carcard__name { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.8rem); text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; }
.carcard--board .carcard__model { display: block; margin-top: .3rem; font-size: .78rem; letter-spacing: .01em; text-transform: none; }
.carcard--board .carcard__status { margin-top: .6rem; font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--paint); }
.carcard__photo { width: min(100%, 22rem); margin-bottom: .7rem; border: var(--frame) solid var(--navy); }
.carcard__facts { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: .45rem 0 0; font-family: var(--font-mono); font-size: .8rem; line-height: 1.45; }
.carcard__facts dt { color: var(--paint-soft); }
.carcard__facts dd { margin: 0; color: var(--paint); font-variant-numeric: tabular-nums; }
.carcard__act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .9rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.carcard__act .btn { width: 100%; }
.carcard__have { font-size: .9rem; color: var(--paint-soft); }
@media (min-width: 640px) {
  .carcard__act .btn { width: auto; min-width: 12.5rem; }
}
@media (min-width: 900px) {
  .carcard--board { grid-template-columns: auto 1fr auto; align-items: center; }
  .carcard__act { grid-column: auto; flex-direction: column; align-items: flex-end; gap: .45rem; margin: 0; padding: 0; border: 0; }
  .carcard__have { text-align: right; }
}
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn--ghost[disabled]:hover { background: transparent; border-color: var(--navy); }

/* The figure and the steps share the narrow column beside the live board */
.cars-side { display: grid; gap: 1.1rem; align-content: start; }

/* ---- The numbered steps ---- */
.steps { list-style: none; display: grid; margin-top: 1rem; border-top: var(--frame) solid var(--navy); }
.steps li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.steps li:last-child { border-bottom: 0; }
.steps .num { font-size: 1.35rem; font-weight: 700; color: var(--navy); line-height: 1; }

/* ---- The drive-time ledger ---- */
.ledger-wrap { overflow-x: auto; }
.ledger-wrap td.r, .ledger-wrap th.r { white-space: nowrap; padding-left: 1.25rem; }
.ledger th small { display: block; margin-top: .15rem; font-family: var(--font-mono); font-size: .7rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--paint-soft); }

/* ---- The sheets: sign out, check in ---- */
.sheet { width: min(36rem, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); margin: auto; padding: 0; border: var(--frame) solid var(--navy); background: var(--board); color: var(--paint); overflow: auto; }
.sheet::backdrop { background: rgb(0 0 0 / .45); }
.sheet__head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.1rem; background: var(--board); border-bottom: var(--frame) solid var(--navy); }
.sheet__head h3 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); text-transform: uppercase; letter-spacing: .01em; }
.sheet__close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.75rem; height: 2.75rem; border: var(--frame) solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; }
.sheet__close:hover { background: var(--sky-pale); }
.sheet__close svg { width: 1.2rem; height: 1.2rem; }
.sheet__body { padding: 1.1rem; }
.sheet__body > .form > p { color: var(--paint-soft); font-size: .95rem; }
.sheet__wide { width: 100%; }
.code { margin-top: 1rem; padding: 1.1rem; border: var(--frame) solid var(--navy); text-align: center; }
.code__lbl { display: block; font-family: var(--font-display); font-weight: 800; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: var(--paint-soft); }
.code__val { display: block; margin-top: .3rem; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(2rem, 1.6rem + 2vw, 2.8rem); font-weight: 700; letter-spacing: .2em; line-height: 1.1; color: var(--navy); }
.code__note { margin: .6rem auto 0; max-width: 36ch; font-size: .88rem; color: var(--paint-soft); }
#soSuccess .btn { margin-top: 1rem; }
.code-input { font-family: var(--font-mono); font-size: 1.3rem; letter-spacing: .25em; text-transform: uppercase; }
.agree label { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; font-family: var(--font-text); font-weight: 400; font-size: .95rem; letter-spacing: 0; text-transform: none; color: var(--paint); cursor: pointer; }
.agree input[type="checkbox"] { width: 1.3rem; height: 1.3rem; min-height: 0; margin: .15rem 0 0; padding: 0; }
.field-error:empty { display: none; }
