/* Hide the little bit of space over the sticky headers. */
div.stickyoffsetbackground
  {
  position: fixed;
  top: 5em;
  left: 0;
  right: 0;
  height: 30px;
  z-index: 998;
  background-color: #ffffcc;
  }
  
/* Use a consistent style for all list-style tables. */
table.tablelist
  {
  border-spacing: 0;
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px;
  margin-bottom: 20px;
  }

table.tablelist th,
table.tablelist td
  {
  padding: 0.5em 1em;
  }

table.tablelist tr.header th
  {
  top: 100px !important;
  position: sticky;
  z-index: 999;
  }
  
table.tablelist th
  {
  background: #f1f1c1;
  text-align: center;
  border-right: 1px solid #e0e0b0;
  }

table.tablelist td
  {
  background: #fafaca;
  text-align: center;
  color: green;
  border-top: 1px solid #e0e0b0;
  border-right: 1px solid #e0e0b0;
  z-index: 0;
  }

table.tablelist td:first-child
  {
  text-align: left;
  color: #004400;
  }

table.tablelist td.header
  {
  font-weight: bold;
  padding-right: 7px;
  }

table.tablelist td.pricecolumn
  {
  text-align: right;
  white-space: nowrap;
  }
  
table.tablelist td.actioncolumn
  {
  text-align: center;
  }

/* Use rounded borders. */
table.tablelist tr:first-child th:first-child,
table.tablelist tr:first-child td:first-child
  {
  border-top-left-radius: 0.6em;
  }

table.tablelist tbody.group tr td
  {
  border-top: none;
  border-bottom: none;
  }

table.tablelist tbody.group tr:first-child td
  {
  border-top: 1px solid #e0e0b0;
  }

table.tablelist tbody.group:last-child tr:last-child td
  {
  border-bottom: 1px solid #e0e0b0;
  }

table.tablelist tbody.group tr:first-child td:first-child
  {
  border-top-left-radius: 0;
  }

table.tablelist tbody.group:first-child tr:first-child td:first-child
  {
  border-top-left-radius: 0.6em;
  }

table.tablelist tr:first-child th:last-child,
table.tablelist tr:first-child td:last-child
  {
  border-top-right-radius: 0.6em;
  }

table.tablelist tbody.group tr:first-child td:last-child
  {
  border-top-right-radius: 0;
  }

table.tablelist tbody.group:first-child tr:first-child td:last-child
  {
  border-top-right-radius: 0.6em;
  }

table.tablelist tr:last-child td:first-child,
table.tablelist tr.last_child td:first-child,
table.tablelist tr.last_child th:first-child
  {
  border-bottom-left-radius: 0.6em;
  }

table.tablelist tbody.group tr:last-child td:first-child
  {
  border-bottom-left-radius: 0;
  }

table.tablelist tbody.group:last-child tr:last-child td:first-child
  {
  border-bottom-left-radius: 0.6em;
  }

table.tablelist tr:last-child td:last-child,
table.tablelist tr.last_child td:last-child,
table.tablelist tr.last_child th:last-child
  {
  border-bottom-right-radius: 0.6em;
  }

table.tablelist tbody.group tr:last-child td:last-child
  {
  border-bottom-right-radius: 0;
  }

table.tablelist tbody.group:last-child tr:last-child td:last-child
  {
  border-bottom-right-radius: 0.6em;
  }

table.tablelist tr:first-child td
  {
  border-top: 1px solid #e0e0b0;
  }

/* Put borders on table headers. */
table.tablelist tr th
  {
  border-top: 1px solid #e0e0b0;
  }

table.tablelist tr th:first-child
  {
  border-left: 1px solid #e0e0b0;
  }

table.tablelist tr th:last-child
  {
  border-right: 1px solid #e0e0b0;
  }

/* Exterior border on the last row. */
table.tablelist tr:last-child td
  {
  border-bottom: 1px solid #e0e0b0;
  }

/* Exterior borders. */
table.tablelist td:first-child
  {
  border-left: 1px solid #e0e0b0;
  }

table.tablelist td:last-child
  {
  border-right: 1px solid #e0e0b0;
  }

/* Override hacks. */
table.tablelist .verticalborder
  {
  border-right: 1px solid #e0e0b0;
  }

table.tablelist tr.horizontalborder td,
table.tablelist tr.horizontalborder th
  {
  border-top: 1px solid #e0e0b0;
  }

table.tablelist tr.horizontalborder:first-child tr + td
  {
  border-top: none;
  }

table.tablelist td.horizontalborder
  {
  border-bottom: 1px solid #e0e0b0;
  }

table.tablelist tr.last_child th,
table.tablelist tr.last_child td
  {
  border-bottom: 1px solid #e0e0b0;
  }

@media (prefers-color-scheme: dark)
  {
  /* Hide the little bit of space over the sticky headers. */
  div.stickyoffsetbackground
    {
    background-color: rgb(4, 33, 3);
    }
    
  table.tablelist th
    {
    background: rgb(44, 63, 63);
    border-right: 1px solid #707050;
    }

  table.tablelist td
    {
    background: rgb(24, 43, 43);
    color: #e0ffe0;
    border-top: 1px solid #707050;
    border-right: 1px solid #707050;
    }

  table.tablelist td:first-child
    {
    color: #00aa00;
    }

  table.tablelist tbody.group tr:first-child td
    {
    border-top: 1px solid #707050;
    }

  table.tablelist tbody.group:last-child tr:last-child td
    {
    border-bottom: 1px solid #707050;
    }

  /* Put borders on table headers. */
  table.tablelist tr th
    {
    border-top: 1px solid #707050;
    }

  table.tablelist tr th:first-child
    {
    border-left: 1px solid #707050;
    }

  table.tablelist tr th:last-child
    {
    border-right: 1px solid #707050;
    }

  /* Exterior border on the last row. */
  table.tablelist tr:last-child td
    {
    border-bottom: 1px solid #707050;
    }

  /* Exterior borders. */
  table.tablelist td:first-child
    {
    border-left: 1px solid #707050;
    }

  table.tablelist td:last-child
    {
    border-right: 1px solid #707050;
    }

  /* Override hacks. */
  table.tablelist .verticalborder
    {
    border-right: 1px solid #707050;
    }

  table.tablelist tr.horizontalborder td,
  table.tablelist tr.horizontalborder th
    {
    border-top: 1px solid #707050;
    }

  table.tablelist td.horizontalborder
    {
    border-bottom: 1px solid #707050;
    }

  table.tablelist tr.last_child th,
  table.tablelist tr.last_child td
    {
    border-bottom: 1px solid #707050;
    }
  }
