/* Delivery prices --------------------------------------------------------
   The shop's delivery price list: a row per delivery method, a column per
   payment, the pair's price where they meet. The one accent is the free
   delivery promise under a method's name, in the success colour, since it is
   the line a customer scans the table for; everything else stays quiet.
   Prices use tabular figures so the grosze of a column stand one under
   another.

   On a phone every row is a card: the method on top, then one line per
   payment it is sold with, the payment's name taken from the cell's
   data-label. A pair the shop does not sell is left out of the card, where a
   dash would only be noise. From the tablet up it is a table in one frame,
   scrolling sideways inside the frame when the payments outrun it. */

.delivery-prices__table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.delivery-prices__table thead {
  display: none;
}

.delivery-prices__table tbody {
  display: grid;
  gap: var(--space-3);
}

.delivery-prices__table tr {
  display: grid;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.delivery-prices__method {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding-bottom: var(--space-3);
  text-align: left;
}

.delivery-prices__name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
}

.delivery-prices__free {
  display: inline-flex;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  color: var(--success);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}

.delivery-prices__price {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
  font-weight: 700;
  color: var(--ink);
}

.delivery-prices__price::before {
  content: attr(data-label);
  font-weight: 400;
  color: var(--ink-soft);
}

.delivery-prices__price--none {
  display: none;
}

@media (min-width: 640px) {
  .delivery-prices__frame {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
  }

  .delivery-prices__table thead {
    display: table-header-group;
  }

  .delivery-prices__table tbody {
    display: table-row-group;
  }

  .delivery-prices__table tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }

  .delivery-prices__table tbody tr {
    border-top: 1px solid var(--line);
  }

  .delivery-prices__table th,
  .delivery-prices__table td {
    padding: var(--space-4) var(--space-5);
    vertical-align: middle;
  }

  .delivery-prices__table thead th {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-soft);
    text-align: right;
    white-space: nowrap;
  }

  .delivery-prices__table thead .delivery-prices__corner {
    text-align: left;
  }

  .delivery-prices__method {
    display: table-cell;
    min-width: 12rem;
    padding-bottom: var(--space-4);
  }

  .delivery-prices__method .delivery-prices__free {
    margin-top: var(--space-2);
  }

  .delivery-prices__name {
    display: block;
    font-size: var(--text-base);
  }

  .delivery-prices__price,
  .delivery-prices__price--none {
    display: table-cell;
    border-top: 0;
    text-align: right;
    white-space: nowrap;
  }

  .delivery-prices__price::before {
    content: none;
  }

  .delivery-prices__price--none {
    color: var(--ink-muted);
    font-weight: 400;
  }
}
