:root {
  --qpsr-maroon: #7a1220;
  --qpsr-maroon-dark: #56050f;
}

body {
  background-color: #f5f2ef;
}

.navbar-qpsr {
  background-color: var(--qpsr-maroon);
}

.navbar-qpsr .navbar-brand,
.navbar-qpsr .navbar-text {
  color: #fff;
}

.card-header-qpsr {
  background-color: var(--qpsr-maroon);
  color: #fff;
  font-weight: 600;
}

.rs-table th,
.rs-table td {
  vertical-align: middle;
  padding: 0.35rem;
}

.rs-table input,
.rs-table select {
  min-width: 5.5rem;
}

.rs-table .fault-col input {
  min-width: 12rem;
}

#signature-pad-wrap {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background: #fff;
  touch-action: none;
}

#signature-pad {
  width: 100%;
  height: 160px;
  display: block;
  cursor: crosshair;
}

.required-asterisk::after {
  content: " *";
  color: var(--qpsr-maroon);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

footer.site-footer {
  color: #6c757d;
  font-size: 0.875rem;
}

@media (max-width: 575.98px) {
  .rs-table th,
  .rs-table td {
    font-size: 0.8rem;
  }
}

/* Below md, turn the Rollingstock table into a stacked card per vehicle
   instead of a horizontally-scrolling table -- easier to fill in on a
   phone. Uses the same <input>/<select> elements, just re-laid-out via
   CSS (table -> block, with data-label driving an inline label per
   field), so nothing needs to be duplicated for submission. */
@media (max-width: 767.98px) {
  .rs-table thead {
    display: none;
  }

  .rs-table,
  .rs-table tbody,
  .rs-table tr,
  .rs-table td {
    display: block;
    width: 100%;
  }

  .rs-table {
    border: none;
  }

  .rs-table tr {
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #fff;
  }

  .rs-table tr::before {
    content: "Vehicle " attr(data-row-index) " of 12";
    display: block;
    font-weight: 700;
    color: var(--qpsr-maroon);
    margin-bottom: 0.4rem;
  }

  .rs-table td {
    border: none;
    padding: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .rs-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    font-weight: 600;
    color: #495057;
  }

  .rs-table td > input,
  .rs-table td > select {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .rs-table .fault-col input {
    min-width: 0;
  }
}
