/* Road depot vehicle grid. All selectors stay local to this window. */
.road-depot-window {
  --ttd-company-caption: var(--ttd-caption-red);
  width: 686px;
}

.road-depot-window .ttd-window__body {
  min-height: 0;
  text-shadow: none;
}

.road-depot-window__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 2px;
  height: 144px;
  padding: 2px;
  background: var(--ttd-bg, #838583);
}

.road-depot-window__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 27px;
  align-content: start;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--ttd-bg, #838583);
  border: 2px solid;
  border-color: var(--ttd-bevel-dark, #626562) var(--ttd-bevel-light, #a8a8a8)
    var(--ttd-bevel-light, #a8a8a8) var(--ttd-bevel-dark, #626562);
  scrollbar-color: #a8a8a8 #626562;
  scrollbar-width: thin;
}

.road-depot-window__grid::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

.road-depot-window__grid::-webkit-scrollbar-track {
  background: #626562;
  border: 2px solid #a8a8a8;
}

.road-depot-window__grid::-webkit-scrollbar-thumb {
  background: #838583;
  border: 2px solid;
  border-color: #a8a8a8 #626562 #626562 #a8a8a8;
}

.road-depot-window__vehicle,
.road-depot-window__empty-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 27px;
  padding: 0 2px;
  overflow: hidden;
  color: #101010;
  font: inherit;
  line-height: 20px;
  white-space: nowrap;
  background: var(--ttd-bg, #838583);
  border: 1px solid;
  border-color: var(--ttd-bevel-light, #a8a8a8) var(--ttd-bevel-dark, #626562)
    var(--ttd-bevel-dark, #626562) var(--ttd-bevel-light, #a8a8a8);
}

.road-depot-window__vehicle {
  gap: 0;
  padding: 0;
}

.road-depot-window__vehicle:hover {
  background: #8b8d8b;
}

.road-depot-window__vehicle-open {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 2px;
  min-width: 0;
  height: 100%;
  padding: 0 2px;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.road-depot-window__vehicle-open:active {
  background: #777977;
}

.road-depot-window__status:focus-visible,
.road-depot-window__vehicle-open:focus-visible,
.road-depot-window__scroll-button:focus-visible {
  outline: 2px dotted #101010;
  outline-offset: -4px;
}

.road-depot-window__vehicle canvas {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.road-depot-window__status {
  appearance: none;
  display: inline-flex;
  flex: 0 0 14px;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 22px;
  font-weight: bold;
  line-height: 20px;
  cursor: pointer;
}

.road-depot-window__status:disabled {
  cursor: default;
  opacity: .7;
}

.road-depot-window__status--stopped {
  color: #e00000;
  text-shadow: 1px 1px 0 #101010;
}

.road-depot-window__status--running {
  color: #00a000;
  font-size: 16px;
  text-shadow: 1px 1px 0 #101010;
}

.road-depot-window__number {
  flex: 0 0 auto;
  color: #101010;
}

.road-depot-window__empty-cell {
  display: block;
}

.road-depot-window__message {
  grid-column: 1 / -1;
  padding: 4px;
  color: #101010;
  white-space: normal;
}

.road-depot-window__scroll {
  display: grid;
  grid-template-rows: 28px 1fr 28px;
  gap: 2px;
  min-height: 0;
}

.road-depot-window__scroll-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  padding: 0;
  color: #101010;
  font: inherit;
  background: var(--ttd-bg, #838583);
  border: 2px solid;
  border-color: var(--ttd-bevel-light, #a8a8a8) var(--ttd-bevel-dark, #626562)
    var(--ttd-bevel-dark, #626562) var(--ttd-bevel-light, #a8a8a8);
  cursor: pointer;
}

.road-depot-window__scroll-button:active {
  border-color: var(--ttd-bevel-dark, #626562) var(--ttd-bevel-light, #a8a8a8)
    var(--ttd-bevel-light, #a8a8a8) var(--ttd-bevel-dark, #626562);
}
