@use "../variables" as v;
@use "../mixins" as m;

table {
  border-collapse: separate !important;
  border-spacing: 0;
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  text-align: left;

  thead {
    font-weight: 500;
  }

  tbody {
    //background-color: rgba(var(--zn-panel), var(--zn-panel-opacity));

    a {
      cursor: pointer;
      color: rgb(var(--zn-primary));
    }
  }

  tbody tr td {
    border-top: 1px solid rgb(var(--zn-border-color)) !important;
  }

  tbody tr:first-of-type td {
    border-top: 0 !important;
  }

  tbody tr:nth-of-type(even) {
    background-color: rgba(var(--zn-body));
  }

  thead tr th:first-of-type,
  tbody tr td:first-of-type {
    padding-left: 14px;
  }

  thead tr th:last-of-type,
  tbody tr td:last-of-type {
    padding-right: 14px;
  }

  th, td {
    padding: m.spacing(md);
    min-width: 90px;
    white-space: nowrap;

    &:first-child {
      padding-left: 0;
    }
  }

  td > span {
    white-space: normal;
  }

  th {
    padding-bottom: 0;
    border-bottom: 1px solid rgb(var(--zn-border-color));
  }
}

.zn-table-fixed {
  table-layout: fixed;
}

thead tr:last-of-type th {
  border-bottom: 0;
}
