/**
 * @license MIT, https://opensource.org/license/MIT
 */

.table-responsive {
    background-color: var(--pico-background-color);
}

.table-responsive .table-row {
    display: flex;
    align-items: stretch;
    border-bottom: var(--pico-border-width) solid var(--pico-table-border-color);
}

.table-responsive .table-col {
    padding: calc(var(--pico-spacing) / 2) var(--pico-spacing);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.table-responsive .th {
    background-color: var(--pico-muted-background-color);
    text-align: center;
}

.table-responsive .th * {
    color: var(--pico-contrast-hover);
}

.table-responsive .th:first-child {
  text-align: start;
}

.table-responsive .td {
  text-align: center;
}

.table-responsive .th > *:first-child,
.table-responsive .td > *:first-child {
    margin-top: 0;
}

.table-responsive .th > *:last-child,
.table-responsive .td > *:last-child {
    margin-bottom: 0;
}

.table-responsive .th img,
.table-responsive .th p {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    align-content: end;
    text-align: center;
    height: 100%;
    width: 100%;
}

.table-responsive .td p {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 576px) {
  .table-responsive .table-row {
    flex-wrap: wrap;
  }

  .table-responsive .row:first-child .col:first-child p {
    display: none
  }

  .table-responsive .table-col:first-child {
    flex: 0 0 100%;
  }

  .table-responsive .table-col:not(:first-child) {
    flex: 1;
  }
}
