html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
}

body {
  background: #f6f7f9;
  /* Keep content clear of the iPad home indicator when installed to the Home Screen. */
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-text-size-adjust: 100%;
}

.app-nav {
  padding-top: max(.5rem, env(safe-area-inset-top));
}

.app-nav .nav-link {
  color: rgba(255, 255, 255, .85);
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus {
  color: #fff;
}

.app-nav .account-button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .25rem;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Comfortable touch targets for fingers rather than a mouse. */
.unit-list .list-group-item {
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.form-switch {
  padding-left: 3.4em;
}

.form-switch .form-check-input {
  width: 2.6em;
  height: 1.4em;
  margin-left: -3.4em;
}

/* Previous / Next unit buttons: equal width so they don't jump around between units. */
.unit-pager .btn {
  min-width: 9rem;
}

/* Long owner/vehicle lists in the import preview wrap instead of widening the table. */
.import-table td {
  overflow-wrap: anywhere;
}

/* The photo pickers are real file inputs hidden inside big buttons; without script they show as normal inputs. */
.photo-upload .btn {
  position: relative;
  overflow: hidden;
}

.photo-upload .photo-picker {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.password-toggle {
  display: inline-flex;
  align-items: center;
  min-width: 3rem;
  justify-content: center;
}

.attr-list dt {
  font-weight: 500;
  color: var(--bs-secondary-color);
}

.unit-photo {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.analysis-table .count-cell,
.analysis-table .pct-cell {
  width: 3.5rem;
  white-space: nowrap;
}

.analysis-table .count-cell a {
  display: inline-block;
  min-width: 2.5rem;
  padding: .25rem .5rem;
  text-align: center;
}

/* Save stays reachable at the bottom of long forms on the iPad. */
.sticky-actions {
  position: sticky;
  bottom: 0;
  padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom));
  background: #f6f7f9;
  border-top: 1px solid var(--bs-border-color);
}
