/* Tables inside a blog post body (wrapped by lib/richTextTables.ts).
   The Webflow export never styled tables, so a comparison table rendered as
   bare, borderless cells at the body's 20px size, crushed into narrow columns.
   Hairline rules, a tinted header row and a smaller size make it read as a
   table; on narrow screens it keeps readable columns and scrolls sideways. */

.rl-text-rich-text .rt-table-scroll {
  margin: 2rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(29, 23, 0, 0.12);
  border-radius: 12px;
}

.rl-text-rich-text .rt-table-scroll:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.rl-text-rich-text table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--black);
}

.rl-text-rich-text th,
.rl-text-rich-text td {
  padding: 0.875rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(29, 23, 0, 0.12);
}

.rl-text-rich-text thead th {
  background-color: rgba(29, 23, 0, 0.05);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.rl-text-rich-text tbody tr:last-child td {
  border-bottom: 0;
}

/* The first column names the row, so it reads as a label. */
.rl-text-rich-text tbody td:first-child {
  font-weight: 600;
}

@media screen and (max-width: 767px) {
  .rl-text-rich-text .rt-table-scroll {
    margin: 24px 0;
  }

  .rl-text-rich-text table {
    font-size: 15px;
  }

  .rl-text-rich-text th,
  .rl-text-rich-text td {
    padding: 12px 14px;
  }
}

/* A cell with more than one paragraph keeps them, at the table's size. */
.rl-text-rich-text td p,
.rl-text-rich-text th p {
  margin: 0 0 0.5em;
  font-size: inherit;
  line-height: inherit;
}

.rl-text-rich-text td p:last-child,
.rl-text-rich-text th p:last-child {
  margin-bottom: 0;
}
