body {
  --subtle-colour: rgba(255, 255, 255, 0.06);
  --strong-colour: #191f29;
}

@media (prefers-color-scheme: light) {
  body {
    --subtle-colour: rgba(0, 0, 0, 0.06);
    --strong-colour: #d0d0eb;
  }
}

tbody tr:nth-child(even) {
  background-color: var(--subtle-colour);
}

thead tr th {
  background-color: var(--strong-colour);
}

#rankingTable th {
  position: sticky;
  top: 0;
}

th, td {
  padding: 0.5em;
  text-align: left;
}

input, button {
  padding: 0.5em;
  box-sizing: border-box;
  font-family: Lexend, sans-serif, emoji, "Twemoji Mozilla", "Segoe UI Emoji", "Apple Color Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

table input, table button {
  width: 100%;
}

table {
  border-collapse: separate;
}

#waiting {
  font-size: 2em; position: fixed; top: 0.5rem; z-index: 1; background-color: #858a8a; border-radius: 1em; padding: 0 0.25em;
}

#dropZone {
  padding: 10em 0; border: 2px dashed var(--subtle-colour); text-align: center;
}

.invalid:not(#unitInput) {
  color: #F54927;
}
#unitInput:not(.invalid) {
  font-weight: bold;
}

.anomaly {
  font-style: italic;
}

.discountCalculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;  
}

@media (prefers-color-scheme: light) {
  #waiting {
    background-color: white;
  }
}

@media (max-width: 600px) {
  th, td {
    font-size: 0.8em;
    padding: 0.25em;
  }
  input, button {
    width: 100%;
  }
  #rankingTable input, #rankingTable button {
    padding-top: 0.75em;
    padding-bottom: 0.75em;
  }
  .actionsWrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1em;
  }
}
@media (max-width: 400px) {
  /* Removes sticky header, so only use in necessary cases */
  div:has(#rankingTable) {
    overflow-x: auto;
  }
}