table {
  border-collapse: collapse;
  margin-bottom: 10px;
  table-layout: fixed;
  word-wrap: break-word;
  max-width: 100%;
}

table.longTable {
  width: 100%;
}

table.longTable tr:not(:last-child) {
  border-bottom: 1px solid var(--light_borders);
}

table tr,
table td {
  padding: 0 20px 0 4px;
  overflow: hidden;
  white-space: nowrap;
}

table button,
table input[type="submit"] {
  padding: 5px 10px 5px 10px;
}

table form {
  display: inline-block;
}

table form:not(:first-child) {
  margin-left: 10px;
}

table form > * {
  margin: 0;
}

tr.expanded {
  border: 0;
}

tr.expanded > td {
  background: var(--light_panel_background);
}

tr.expandable {
  cursor: pointer;
}

tr.expandable:hover {
  background: var(--light_footer_background);
}

tr.expandable:hover > td:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

tr.expandable:hover > td:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

tr.expandable.first > td:first-child {
  border-bottom-left-radius: 0;
}

tr.expandable.first > td:last-child {
  border-bottom-right-radius: 0;
}

tr.expanded.first {
  border-bottom: 2px solid var(--light_borders);
}

tr.expanded.first > td:first-child {
  border-top-left-radius: 10px;
}

tr.expanded.first > td:last-child {
  border-top-right-radius: 10px;
}

tr.expanded.last > td:first-child {
  border-bottom-left-radius: 10px;
}

tr.expanded.last > td:last-child {
  border-bottom-right-radius: 10px;
}

tr.expanded:not(.expandable) {
  padding-top: 0;
  padding-bottom: 0;
}

tr.expanded:not(.expandable) > td:first-child {
  padding-left: 30px;
}

button.btnExpanded {
  transform: rotate(90deg);
}

/* Buttons */
button.btnExpand {
  margin: 0 10px 0 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
}

button.btnExpand:hover {
  background: transparent;
}

button.btnExpanded {
  transform: rotate(90deg);
}

td:last-child > button {
  float: right;
}

tr.key {
  background: var(--light_panel_background);
  text-align: center;
  font-weight: bold;
}

tr.key > td:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

tr.key > td:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
