.table {
  margin-bottom: 30px;
}

.table > :not(caption) > * > * {
  background-color: transparent;
}

.table thead th {
  vertical-align: middle;
  border-top: 0;
  border-bottom: 0;
}

.table th {
  padding: 12px 20px;
  background: var(--color-brand-primary);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-bg-surface);
  white-space: nowrap;
}

.table th figure {
  display: inline-block;
  vertical-align: middle;
  margin: 0 0 2px 5px;
  font-size: 4px;
}

.table th strong {
  display: block;
  font-weight: 500;
}

.table td {
  padding: 1rem 1.25rem;
}

.table td:nth-child(5),
.table td:nth-child(4),
.table td:nth-child(1) {
  vertical-align: middle;
  text-align: center;
}

.table td:last-child {
  padding: 5px 5px;
}

.table .table__title {
  overflow: hidden;
  height: 1.15em;
  margin-bottom: 7px;
  font-size: 14px;
  color: var(--color-brand-primary);
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  a {
    color: var(--color-text-heading)
  }
}

.table .table__title i {
  display: inline-block;
  vertical-align: top;
  margin-right: 5px;
}

.table .table__meta {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--color-text-body);
}

.table .table__meta a {
  text-decoration: underline;
  color: var(--color-text-body);
}

.table .table__label {
  position: relative;
  padding-bottom: 7px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--color-text-body);
}

.table .table__label:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-brand-primary);
}

.table .table__label--report:before {
  background: var(--color-report);
}

.table .table__label--letter:before {
  background: var(--color-letter);
}

.table .table__label--meeting:before {
  background: var(--color-meeting);
}

.table .table__label--collection:before {
  background: var(--color-collection);
}

.table .table__label--sheet:before {
  background: var(--color-sheet);
}

.table .table__date {
  font-size: 0.75rem;;
  font-weight: 400;
  color: var(--color-text-body);
}

.table .table__size {
  font-size: 0.75rem;
}

.table .table__btn {
  display: block;
  font-size: 1rem;
  text-decoration: none;
}

.table-bordered td {
  border-width: 0 1px;
  border-style: solid;
  border-color: rgba(38, 103, 176, 0.15);
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);

}

.table-bordered td:first-child {
  border-width: 0 0 0 0;
}

.table-bordered td:last-child {
  border-width: 0 0 0 1px;
}

.table-bordered th {
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--color-bg-surface);
}

.table-striped tbody tr:nth-of-type(even) {
  background-color: var(--color-bg-subtle);
}

.table-hover tbody tr:hover > * {
  background: var(--color-brand-secondary) !important;
  color: var(--color-bg-surface) !important;
}

.table-hover tbody tr:hover td {
  border-color: rgba(255, 255, 255, 0.15);
}

.table-hover tbody tr:hover .table__label:before {
  background: var(--color-bg-surface);
}

.table-hover tbody tr:hover .table__label,
.table-hover tbody tr:hover .table__title,
.table-hover tbody tr:hover .table__meta,
.table-hover tbody tr:hover a,
.table-hover tbody tr:hover .table__date,
.table-hover tbody tr:hover span:before {
  color: var(--color-bg-surface);
}

.table-hover .icon-download::before {
    color: var(--color-brand-secondary);
    font-size:0.75rem;
}

/* Tablet Portrait */
@media (max-width: 992px) {
  .table {
    display: block;
    border: 0;
  }

  .table thead,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    padding: 0;
    border: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
  }

  .table thead {
    display: none;
  }

  .table tbody tr {
    background-color: var(--color-bg-surface);
  }

  .table td {
    width: 85%;
  }

  .table td:last-child {
    padding: 0;
  }

  .table tr {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    padding: 1rem;
  }

  .table td:nth-child(1),
   .table .table__size {
    display: none;
  }

  .table-hover .icon-download::before {
    color: var(--color-bg-surface);
    font-size:0.75rem;
  }

  .table td:nth-child(2) {
    -webkit-box-ordinal-group: 2;
    -ms-flex-order: 1;
    order: 1;
  }

  .table td:nth-child(3) {
    -webkit-box-ordinal-group: 4;
    -ms-flex-order: 3;
    order: 3;
  }

  .table td:nth-child(4) {
    -webkit-box-ordinal-group: 3;
    -ms-flex-order: 2;
    order: 3;
  }

  .table td:last-child {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: 50px;
    height: 100%;
  }

  .table .table__label {
    padding: 0 0 3px 13px;
  }

  .table .table__label:before {
    top: 2px;
    bottom: auto;
    width: 3px;
    height: 10px;
  }

  .table .table__date {
    margin-bottom: 15px;
    text-align: left;
  }

  .table .table__btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid #d3dfed;
    background: var(--color-brand-primary);
    color: var(--color-bg-surface);;
  }
}

/* Mobile */
@media (max-width: 767px) {


  .table .table__date {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .table .table__title {
    overflow: visible;
    height: auto;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
  }

  .table .table__title i {
    display: none;
  }

  .table .table__meta {
    font-size: 11px;
  }
}