@font-face {
  font-family: "Digital";
  src: url("../fonts/DSEG7ModernMini-BoldItalic.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
body {
  background-image: url("/img/track-background.jpg");
  font-family: "Inter", sans-serif;
}

.contents {
  background-color: #ddd;
  opacity: 0.85;
  padding: 1rem;
  width: -moz-fit-content;
  width: fit-content;
}

.top-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.runners {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1rem;
}

.finishers,
.runner-result {
  display: block;
}
.finishers .runner-cell,
.runner-result .runner-cell {
  margin-top: 1rem;
  width: -moz-fit-content;
  width: fit-content;
}

.runner-cell {
  background-color: white;
  color: black;
  border-left: 1px solid black;
  border-right: 1px solid black;
  border-top: 10px solid black;
  border-bottom: 10px solid black;
  padding: 5px 10px;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
}
.runner-cell .lap {
  color: darkred;
  font-size: 2.5rem;
}

.timer {
  font-family: "Digital";
  font-size: 2.5rem;
  font-weight: bold;
  background-color: black;
  color: lime;
  padding: 5px 5px 5px 5px;
  vertical-align: middle;
  width: -moz-fit-content;
  width: fit-content;
}

.button {
  color: white;
  background-color: darkblue;
  padding: 0.25em 1rem;
  border: 1px solid white;
  border-radius: 5px;
  font-size: 1.2rem;
  font-weight: bold;
}

.button:link,
.button:visited {
  text-decoration: none;
}

.functions {
  margin-top: 2rem;
}
.functions button {
  color: white;
  background-color: darkblue;
  padding: 0.25em 1rem;
  border: 1px solid white;
  border-radius: 5px;
  font-size: 1.8rem;
  font-weight: bold;
}

.race-name {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.lapper-list {
  display: block;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.result-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.result-list-number {
  font-size: 2rem;
  background-color: white;
  opacity: 0.9;
  border: 2px solid black;
  width: -moz-fit-content;
  width: fit-content;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.result-table {
  background-color: #fff;
  opacity: 0.9;
  border: 1px solid;
  border-collapse: collapse;
}
.result-table td {
  text-align: right;
  border: 1px solid;
  padding: 2px;
}

.new-race {
  margin-left: 40px;
  margin-top: 1rem;
  background-color: #cfc;
  padding: 10px;
  width: -moz-fit-content;
  width: fit-content;
  border: 3px solid #111;
}

.races-list {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}
.races-list li {
  margin-top: 1rem;
  background-color: #ccc;
  padding: 5px;
  width: -moz-fit-content;
  width: fit-content;
  border: 3px solid #111;
}

#start-button:disabled {
  background-color: lightgrey;
}

#stop-button {
  display: none;
  background-color: red;
}

.space-above {
  margin-top: 2rem;
}

.smaller {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.6rem;
}