/* RFID Smart Cabinet — problem / solution: a real <table> at every width
 * (other display values would strip its semantics) */

.ps-table {
  table-layout: fixed;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.ps-table th,
.ps-table td {
  padding: var(--space-3);
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.ps-table th {
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-feature-settings: 'case';
}

.ps-table th span {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.ps-table th .icon {
  margin-top: 0.175em;
}

.ps-table tbody tr:last-child td {
  border-bottom: 0;
}

.ps-table__before {
  color: var(--color-text-secondary);
}

th.ps-table__before {
  color: var(--color-error);
}

.ps-table__after {
  background-color: var(--color-accent-tint);
  border-left: 1px solid var(--color-border);
}

th.ps-table__after {
  color: var(--color-accent-dark);
}

td.ps-table__after {
  font-weight: var(--weight-medium);
}

@media (max-width: 639px) {
  .ps-table td {
    font-size: var(--text-small);
  }

  /* "AUJOURD'HUI" overflowed its cell at 14px: 12px at 320–340, 13px from 360 */
  .ps-table th {
    font-size: clamp(0.75rem, 5vw - 0.3125rem, 0.8125rem);
  }

  /* Edge to edge on phones */
  .ps-table {
    width: calc(100% + 2 * var(--space-4));
    margin-inline: calc(-1 * var(--space-4));
    border-inline: 0;
    border-radius: 0;
  }

  .ps-table th:first-child,
  .ps-table td:first-child {
    padding-left: var(--space-4);
  }

  .ps-table th:last-child,
  .ps-table td:last-child {
    padding-right: var(--space-4);
  }
}

@media (min-width: 640px) {
  .ps-table th,
  .ps-table td {
    padding: var(--space-4) var(--space-5);
  }
}
