/* Shared editorial tables: blog copy and ranking guides, not product cards. */
:is(.entry-content, .guide-content) .content-table {
  min-width: 0;
  max-width: 100%;
  margin-block: 28px;
  padding: 0;
  border: 0;
  box-shadow: none;
}

:is(.entry-content, .guide-content) .wp-block-table {
  max-width: 100%;
  margin-inline: 0;
  overflow: visible;
  padding: 0;
  border: 0;
  box-shadow: none;
}

:is(.entry-content, .guide-content) .wp-block-table > .content-table {
  margin-block: 0;
}

:is(.entry-content, .guide-content) .content-table__scroll {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #d7e6eb;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 9px 24px -20px rgb(8 48 72 / 28%);
  scrollbar-width: thin;
  scrollbar-color: #70cfc5 #eff7f8;
}

:is(.entry-content, .guide-content) .content-table__scroll:focus-visible {
  outline: 3px solid var(--c-primary, #13a6da);
  outline-offset: 4px;
}

/* Shared typography, without a second frame around the enhanced table. */
:is(.entry-content, .guide-content) table:not(.offer-card__details table) {
  width: 100%;
  max-width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  background: #fff;
  color: #18364c;
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.65;
  text-align: left;
}

/* Fallback applies ONLY to tables without our scrolling container. */
:is(.entry-content, .guide-content) table:not(.offer-card__details table):not(:where(.content-table__scroll > table)) {
  display: block;
  margin-block: 26px;
  overflow-x: auto;
  border: 1px solid #d7e6eb;
  border-radius: 15px;
}

:is(.entry-content, .guide-content) .content-table .content-table__scroll > table {
  display: table;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) :is(th, td) {
  padding: 17px 20px;
  border: 0;
  border-bottom: 1px solid #e1ebef;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) tr > * + * {
  border-left: 1px solid #e5eef1;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) thead {
  background: linear-gradient(105deg, #e1f4fa 0%, #e2f5ed 100%);
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) thead :is(th, td) {
  color: #103952;
  background: transparent;
  border-bottom: 2px solid #83d7ca;
  font-weight: 700;
  font-size: .875rem;
  line-height: 1.5;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) tbody tr {
  background: #fff;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) tbody tr:nth-child(even) {
  background: #f4f9fa;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) tbody th {
  font-weight: 650;
  color: #123b55;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) :is(th, td) strong {
  color: #123b55;
  font-weight: 650;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) tbody:last-child tr:last-child > *,
:is(.entry-content, .guide-content) table:not(.offer-card__details table) tfoot tr:last-child > * {
  border-bottom: 0;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) tfoot {
  background: #edf7f4;
  font-weight: 600;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) caption {
  padding: 14px 20px;
  color: #486579;
  background: #f5fafb;
  font-size: .8125rem;
  font-weight: 500;
  text-align: left;
  caption-side: bottom;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) :is(p, ul, ol) {
  margin-block: 0 8px;
  font-size: inherit;
  line-height: inherit;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) :is(p, ul, ol):last-child {
  margin-bottom: 0;
}

:is(.entry-content, .guide-content) table:not(.offer-card__details table) a {
  color: #007e9f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

:is(.entry-content, .guide-content) .content-table__hint {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  align-items: center;
  margin: 9px 2px 0;
  color: #536e80;
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.5;
}

:is(.entry-content, .guide-content) .content-table__hint::before {
  content: '↔';
  color: #078d9f;
  font-size: 1rem;
}

:is(.entry-content, .guide-content) .content-table__hint[hidden] {
  display: none;
}

@media (hover: hover) {
  :is(.entry-content, .guide-content) table:not(.offer-card__details table) tbody tr:hover {
    background: #eaf6f4;
  }
}

@media (max-width: 767px) {
  :is(.entry-content, .guide-content) .content-table {
    margin-block: 22px;
  }

  :is(.entry-content, .guide-content) .content-table__scroll,
  :is(.entry-content, .guide-content) table:not(.offer-card__details table):not(:where(.content-table__scroll > table)) {
    border-radius: 11px;
  }

  :is(.entry-content, .guide-content) .content-table .content-table__scroll > table {
    border-radius: 0;
  }

  :is(.entry-content, .guide-content) table:not(.offer-card__details table) :is(th, td) {
    min-width: 145px;
    padding: 13px 15px;
    font-size: .875rem;
  }

  :is(.entry-content, .guide-content) table:not(.offer-card__details table) thead :is(th, td) {
    font-size: .8125rem;
  }
}

@media print {
  :is(.entry-content, .guide-content) .content-table__scroll {
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
  }

  :is(.entry-content, .guide-content) table:not(.offer-card__details table) {
    display: table;
    width: 100%;
    min-width: 0;
    overflow: visible;
    table-layout: fixed;
    font-size: 9pt;
  }

  :is(.entry-content, .guide-content) table:not(.offer-card__details table) :is(th, td) {
    min-width: 0;
    padding: 7px;
    overflow-wrap: anywhere;
    font-size: 9pt;
  }

  :is(.entry-content, .guide-content) table:not(.offer-card__details table) thead {
    display: table-header-group;
  }

  :is(.entry-content, .guide-content) table:not(.offer-card__details table) tr {
    break-inside: avoid;
  }

  :is(.entry-content, .guide-content) .content-table__hint {
    display: none;
  }
}
