/* UGM_SEO_TABLE:CTqInc01
   Contain SEO / news rich HTML tables that were overflowing card borders
   (grind vs desk Path / Best when / Trade-off, and similar AI HTML). */

.shop-seo-body-html,
.news-article-html,
.shop-seo-section__body,
.seo-rich,
.shop-seo-guide {
  overflow-x: clip;
  max-width: 100%;
}

.seo-table-wrap,
.shop-seo-body-html .seo-table-wrap,
.news-article-html .seo-table-wrap,
.shop-seo-guide .seo-table-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0.85rem 0 0.35rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: 12px !important;
  border: 1px solid rgba(232, 184, 74, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%),
    rgba(8, 10, 16, 0.72) !important;
  box-sizing: border-box !important;
}

.seo-table-caption {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.35rem 0.85rem !important;
  padding: 0.55rem 0.85rem !important;
  border-bottom: 1px solid rgba(232, 184, 74, 0.2) !important;
  font-size: 0.68rem !important;
  font-weight: 750 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: rgba(255, 213, 106, 0.92) !important;
}

.seo-table-caption span:last-child {
  color: rgba(180, 186, 198, 0.92) !important;
  font-weight: 600 !important;
}

.seo-table,
.shop-seo-body-html table.seo-table,
.news-article-html table.seo-table,
.shop-seo-body-html table,
.news-article-html table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  font-size: 0.86rem !important;
}

.seo-table th,
.seo-table td,
.shop-seo-body-html table th,
.shop-seo-body-html table td,
.news-article-html table th,
.news-article-html table td {
  padding: 0.65rem 0.75rem !important;
  text-align: left !important;
  vertical-align: top !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  hyphens: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.seo-table th,
.shop-seo-body-html table th,
.news-article-html table th {
  font-size: 0.74rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(255, 213, 106, 0.9) !important;
  background: rgba(232, 184, 74, 0.08) !important;
  font-weight: 700 !important;
}

.seo-table tbody tr:last-child td,
.shop-seo-body-html table tbody tr:last-child td,
.news-article-html table tbody tr:last-child td {
  border-bottom: 0 !important;
}

/* Images / pre / iframes inside SEO/news bodies never blow the card */
.shop-seo-body-html img,
.news-article-html img,
.shop-seo-body-html video,
.news-article-html video,
.shop-seo-body-html iframe,
.news-article-html iframe,
.shop-seo-body-html pre,
.news-article-html pre {
  max-width: 100% !important;
  height: auto !important;
}

.shop-seo-body-html pre,
.news-article-html pre {
  overflow-x: auto !important;
}

/* Narrow desks: slightly denser cells, keep 3-col readable via wrap not clip */
@media (max-width: 720px) {
  .seo-table th,
  .seo-table td,
  .shop-seo-body-html table th,
  .shop-seo-body-html table td,
  .news-article-html table th,
  .news-article-html table td {
    padding: 0.55rem 0.55rem !important;
    font-size: 0.8rem !important;
  }

  .seo-table-caption {
    padding: 0.5rem 0.65rem !important;
  }
}
