.telegram-rich-table {
  margin: 0.78rem 0 0.88rem;
}

.telegram-rich-table figcaption {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
}

.telegram-rich-table__scroll {
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  border-radius: var(--radius-inner);
  background: color-mix(in srgb, var(--surface-muted) 46%, var(--surface-strong));
  overscroll-behavior-inline: contain;
}

.telegram-rich-table table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  table-layout: fixed;
}

.telegram-rich-table th,
.telegram-rich-table td {
  padding: 0.62rem 0.72rem;
  border-right: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  color: color-mix(in srgb, var(--text) 92%, var(--text-soft));
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
}

.telegram-rich-table th {
  background: color-mix(in srgb, var(--surface-muted) 82%, var(--surface-strong));
  color: var(--text);
  font-weight: 680;
}

.telegram-rich-table th:first-child,
.telegram-rich-table td:first-child {
  width: 64%;
}

.telegram-rich-table th:last-child,
.telegram-rich-table td:last-child {
  border-right: 0;
}

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

@media (max-width: 600px) {
  .telegram-rich-table__scroll {
    margin-inline: -2px;
  }

  .telegram-rich-table th,
  .telegram-rich-table td {
    padding: 0.58rem 0.62rem;
    font-size: 0.78rem;
  }
}
