/* Canonical data tables (.table, .table-wrapper). Extracted from the
   guide pages — used by guides, locations, and the calculators. */

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--spacing-lg) 0 var(--spacing-xl) 0;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

@media (max-width: 768px) {
.table-wrapper {
    position: relative;
  }
.table-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 28px;
    background: linear-gradient(to left, rgb(15 23 42 / 0.14), transparent);
    pointer-events: none;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  }
.table-wrapper::before {
    content: "Swipe to see more →";
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    padding: var(--spacing-xs) var(--spacing-sm);
    text-align: right;
  }
.table {
    font-size: var(--font-size-sm);
  }
.table th,
  .table td {
    padding: var(--spacing-sm) var(--spacing-sm);
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 0.95rem;
}

.table--comparison thead {
  background: var(--color-secondary);
  color: white;
}

.table--cost thead {
  background: linear-gradient(135deg, #3b82f6, var(--color-primary));
  color: white;
}

.table th {
  padding: 1.25rem var(--spacing-md);
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.table tr {
  border-bottom: 1px solid var(--color-gray-200);
  transition: background-color var(--transition-fast);
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table tbody tr:nth-child(even) {
  background-color: var(--bg-card-alt);
}

.table td {
  padding: 1.25rem var(--spacing-md);
  color: var(--color-gray-600);
}

.table td:first-child {
  font-weight: 600;
  color: var(--color-gray-900);
}

.table--cost td strong {
  color: var(--color-primary-darker);
  font-size: 1.1rem;
}

@media (max-width: 768px) {
.table {
    font-size: 0.75rem;
  }
.table th,
  .table td {
    padding: 0.75rem var(--spacing-sm);
  }
.table th {
    font-size: 0.7rem;
  }
}
