:root {
  --text--table--header_colour_text: #ffffff;
  --text--table--header_colour_background: #002147;
  --oxfcms-text-table-th-font-weight: 500;
  --text--table--background_colour: #ffffff;
  --text--table--alternate_colour_background: #f2f0f0;
  --text--table--border-radius: 10px;
  --text--table--padding: 1.375rem;
}

.oxfcms-text div.dt-container div.dt-layout-full {
  width: 95%;
  margin: auto;
}
/* .oxfcms-text table {
  margin: 0 auto;
} */
/* Heading colours */
.oxfcms-text table th,
.oxfcms-text .ck-content .table table th,
.oxfcms-text .ck-content .table table th:focus {
  background-color: var(--text--table--header_colour_background);
  color: var(--text--table--header_colour_text);
  font-weight: var(--oxfcms-text-table-th-font-weight);
}

.oxfcms-text table {
  border: 0;
  thead {
    th {
      text-align: left;
      border-right: 1px solid #1d42a6;
      line-height: 120%;
      padding: var(--text--table--padding);
      border-top: 0;
      border-bottom: 1px solid #002147;
      &:first-of-type {
        border-top-left-radius: var(--text--table--border-radius);
        border-top: 0;
        border-left: 0;
        border-bottom-color: #1d42a6;
      }
      &:last-of-type {
        border-top-right-radius: var(--text--table--border-radius);
        border-right: 0;
      }
    }
  }
  
  tbody td, td {
    color: var(--text--table--text_colour);
    background-color: var(--text--table--background_colour);
    text-align: left;
    line-height: 120%;
    padding: var(--text--table--padding);
  }

  tbody th, th {
    text-align: left;
    color: var(--text--table--header_colour_text);
    background-color: var(--text--table--header_colour_background);
    border-bottom: 1px solid #1d42a6;
    border-right-color: #002147;
    border-left: 0;
    line-height: 120%;
    padding: var(--text--table--padding);
  }

  tbody tr:last-of-type {
    th {
      border-bottom-color: #002147;
    }
  }
  tbody tr:nth-of-type(2n) td, tr:nth-of-type(2n) td {
    color: var(--text--table--alternate_colour_text);
    background-color: var(--text--table--alternate_colour_background);
  }

  hr {
    border-color: var(--text--horizontal-line--colour);
  }
}

@media screen and (width < 1280px) {
  .oxfcms-text table {
    --text--table--padding: 1.25rem;
  }
}
/* Responsive behaviour - horizontal scrollbar on overflow */

@media screen and (width < 768px) {
  .oxfcms-text table {
    --text--table--padding: 1.125rem;
  }

  .oxfcms-text {
    max-width: 100%;
    overflow: hidden;
  }

  .oxfcms-text .oxfcms-text-table-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .oxfcms-text .oxfcms-text-table-wrapper table {
    display: table;
    width: 100%;
    min-width: 600px;
  }
}
