/* Center tables for demo */
table {
  margin: 0 auto;
}

/* Default Table Style */
table {
  color: #333;
  background: white;
  border: 1px solid grey;
  font-size: 12pt;
  border-collapse: collapse;
}

table thead th,
table tfoot th {
  color: #777;
  background: rgb(0 0 0 / 10%);
}

table caption {
  padding: 0.5em;
}

table th,
table td {
  padding: 0.5em;
  border: 1px solid lightgrey;
  text-align: left;
}

/* Zebra Table Style */
[data-table-theme*="zebra"] tbody tr:nth-of-type(odd) {
  background: rgb(0 0 0 / 5%);
}

[data-table-theme*="zebra"][data-table-theme*="dark"]
  tbody
  tr:nth-of-type(odd) {
  background: rgb(255 255 255 / 5%);
}

/* Dark Style */
[data-table-theme*="dark"] {
  color: #ddd;
  background: #333;
  font-size: 12pt;
  border-collapse: collapse;
}

[data-table-theme*="dark"] thead th,
[data-table-theme*="dark"] tfoot th {
  color: #aaa;
  background: rgb(0255 255 255 / 15%);
}

[data-table-theme*="dark"] caption {
  padding: 0.5em;
}

[data-table-theme*="dark"] th,
[data-table-theme*="dark"] td {
  padding: 0.5em;
  border: 1px solid grey;
}

table.table-checkins {
  border: none;
  width: 100%;

  & th,
  & td {
    border: none;
    background: transparent;
    padding: 0.5rem 0.25rem;
    width: 50%;
    text-align: left;
  }

  & th {
    font-weight: 500;
  }

  & td {
    border-top: 1px solid var(--lightest-gray);
  }
}

table.table-stats {
  border: none;
  font-weight: normal;
  overflow-x: scroll;
  width: 100%;

  & thead th {
    border-bottom: 2px solid var(--lightest-gray);
    padding: 0 0.75rem;
  }

  & .table-stats-totals td {
    background-color: var(--gray-50);
    border-top: 2px solid var(--lightest-gray);
    font-weight: bold;
  }

  & tr + tr {
    border-top: 1px solid var(--lightest-gray);
  }

  & th,
  & td {
    border: none;
    background: transparent;
    color: var(--gray-700);
    padding: 0;
    text-align: right;
  }

  & th {
    border-bottom: 1px solid var(--lightest-gray);
    font-size: 0.875rem;
    text-align: right;
  }

  & .without-link {
    padding: 0.25rem 1rem;
  }

  & td:first-child {
    font-size: 0.875rem;
    text-wrap: nowrap;
    text-align: left;
  }

  & td:not(:first-child) {
    font-family: monospace;
    font-size: 0.875rem;
  }

  & td:last-child {
    font-weight: bold;
  }

  & td a {
    display: block;
    padding: 0.25rem 1rem;
    text-decoration: none;
  }

  & td a:hover {
    background-color: var(--light-blue);
  }
}

table.table-stats.table-stats--invites {
  & th {
    text-align: left;
  }

  & tr:last-child td {
    border-bottom: 1px solid var(--lightest-gray);
  }
}
