/* Responsive comparison tables used across New Zealand guide pages. */
.grid-cols-300-1fr > article.wysiwyg,
.ndb-article-column,
article.wysiwyg .ndb-editorial-table-block,
article.wysiwyg .ndb-table-scroll {
  min-width: 0;
}

article.wysiwyg {
  display: flow-root;
  overflow-wrap: anywhere;
}

/* The opening comparison block already has its own padding and border. */
article.wysiwyg[data-text-container]:has(> .ndb-editorial-table-block:first-child) {
  padding-top: 0 !important;
}

article.wysiwyg[data-text-container] > .ndb-editorial-table-block:first-child {
  margin-top: 0 !important;
}

article.wysiwyg .ndb-editorial-table-block > h2 {
  margin: 0 0 16px !important;
}

article.wysiwyg p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  margin-bottom: 18px !important;
  max-width: 78ch;
  text-wrap: pretty;
}

/* Restore readable numbering in article copy after the site's global CSS reset. */
article.wysiwyg ol:not([class]),
.ndb-article ol:not([class]) {
  display: block;
  max-width: 78ch;
  margin: 16px 0 24px;
  padding-left: 2rem;
  list-style: decimal outside;
}

article.wysiwyg ol:not([class]) > li,
.ndb-article ol:not([class]) > li {
  display: list-item;
  padding-left: .3rem;
  margin: 0 0 12px;
  line-height: 1.65;
}

article.wysiwyg ul > li,
.ndb-article ul > li {
  line-height: 1.65;
}

article.wysiwyg ol:not([class]) > li:last-child,
.ndb-article ol:not([class]) > li:last-child {
  margin-bottom: 0;
}

article.wysiwyg ol:not([class]) > li::marker,
.ndb-article ol:not([class]) > li::marker {
  color: #00247d;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

article.wysiwyg ol:not([class]) ol:not([class]),
.ndb-article ol:not([class]) ol:not([class]) {
  margin: 10px 0 0;
  list-style-type: lower-alpha;
}

/* Expanded legacy offer details are prose, so keep the same readable rhythm. */
.wysiwyg[data-hidden-view] {
  font-size: 16px !important;
  line-height: 1.7 !important;
  max-width: 78ch;
  text-wrap: pretty;
}

.wysiwyg[data-hidden-view] p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  margin-bottom: 18px !important;
  max-width: 78ch;
  text-wrap: pretty;
}

article.wysiwyg .ndb-casino-card__summary p {
  color: #53647a !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  margin: 12px 0 0 !important;
}

article.wysiwyg .ndb-casino-card__summary p.ndb-casino-card__source {
  font-size: 12px !important;
  margin-top: 8px !important;
  overflow-wrap: anywhere;
}

article.wysiwyg .ndb-table-note {
  color: #53647a !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  margin: 12px 2px 0 !important;
}

article.wysiwyg .ndb-table-scroll > table.ndb-reference-table td > p {
  font-size: 14px !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  max-width: none;
}

.filters-header-container .color-bb-neutral-300 {
  color: #e2e8f0 !important;
}

article.wysiwyg .ndb-table-scroll {
  clear: both;
  width: 100%;
}

/* Let article tables use the full width of the article card, including its padding. */
article.wysiwyg[data-text-container] > .ndb-table-scroll,
article.wysiwyg[data-text-container] > .ndb-editorial-table-block {
  box-sizing: border-box;
  width: calc(100% + 48px) !important;
  max-width: none !important;
  margin-left: -24px !important;
  margin-right: -24px !important;
}

article.wysiwyg[data-text-container] > .ndb-editorial-table-block > .ndb-table-scroll {
  box-sizing: border-box;
  width: calc(100% + 44px);
  max-width: none;
  margin-left: -22px;
  margin-right: -22px;
}

article.wysiwyg figure {
  box-sizing: border-box;
  max-width: 100%;
}

article.wysiwyg figure img {
  width: 100% !important;
  height: auto !important;
}

article.wysiwyg figure:is([class*="--left"], .image-left, .lc-left, .bonus-float-left) {
  float: left;
  clear: none;
  width: 38%;
  max-width: 400px;
  margin: 8px 24px 18px 0 !important;
}

article.wysiwyg figure:is([class*="--right"], .image-right, .lc-right, .bonus-float-right) {
  float: right;
  clear: none;
  width: 38%;
  max-width: 400px;
  margin: 8px 0 18px 24px !important;
}

article.wysiwyg figure:is([class*="--center"], [class*="--centre"], .image-center, .lc-center, .bonus-center, .ndb-center, .wb-figure--wide) {
  clear: both;
  width: 100%;
  max-width: 720px;
  margin: 22px auto !important;
}

@media (max-width: 768px) {
  article.wysiwyg figure:is([class*="--left"], [class*="--right"], [class*="--center"], [class*="--centre"], .image-left, .image-right, .image-center, .lc-left, .lc-right, .lc-center, .bonus-float-left, .bonus-float-right, .bonus-center, .ndb-left, .ndb-right, .ndb-center, .wb-figure--wide) {
    float: none !important;
    clear: both !important;
    width: 100%;
    max-width: 100% !important;
    margin: 18px 0 !important;
  }
}

/* The archived /nz pages still use desktop BetBrain grid and header classes. */
@media (max-width: 900px) {
  .grid-cols-300-1fr > article.wysiwyg {
    order: 1;
  }

  .grid-cols-300-1fr > .ndb-side-column {
    order: 2;
  }

  body > header .MainHeader {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-inline: 16px;
    gap: 8px;
  }

  body > header .MainHeader > .flex:first-child {
    min-width: 0;
    flex-shrink: 1;
  }

  body > header .MainHeader .searchContainer {
    display: none;
  }

  body > header .body-top-menu-2 {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  main .grid-cols-300-1fr,
  main .grid-cols-1fr-300,
  main .grid-cols-1fr-410 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  main .grid > * {
    min-width: 0;
  }

  main .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  main .grid-cols-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  main [data-special-tag-filter] {
    position: static !important;
    width: 100%;
    height: auto;
  }

  main [data-special-tag-filter] > ul {
    width: 100%;
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
  }

  main [data-special-tag-filter] label {
    width: auto;
    min-height: 40px;
    padding-inline: 12px;
  }
}

@media (max-width: 600px) {
  main .flex.flex-wrap.items-center.gap-16.justify-evenly > li {
    max-width: 100%;
    min-width: 0;
  }

  main .flex.flex-wrap.items-center.gap-16.justify-evenly > li > a {
    max-width: 100%;
    min-width: 0;
  }

  main .flex.flex-wrap.items-center.gap-16.justify-evenly > li img {
    width: auto;
    max-width: 100%;
  }

  footer a.shrink-0 {
    max-width: 100%;
    min-width: 0;
  }

  main .flex.items-center.gap-16:has(> [data-translate-tag-styles]) {
    flex-wrap: wrap;
  }

  footer .flex.gap-16.fs-12.lh-14,
  main .report-an-error {
    flex-wrap: wrap;
  }

  main .flex.align-start.gap-30.w100:has(> .w-300) {
    flex-wrap: wrap;
  }

  main .flex.align-start.gap-30.w100 > .w-300 {
    width: 100%;
    flex-shrink: 1;
  }

  main .grid-cols-2,
  main .grid-cols-4,
  main .grid-cols-6 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.ndb-editorial-table-block {
  position: relative;
  display: block;
  float: none !important;
  box-sizing: border-box;
  clear: both;
  width: 100% !important;
  max-width: 1280px !important;
  margin: 30px 0 36px;
  margin-right: auto;
  margin-left: auto;
  padding: 22px 22px 18px;
  overflow: hidden;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff 0%, #f8fafd 100%);
  box-shadow: 0 12px 30px rgba(14, 34, 60, .08);
  color: #26364c;
}

.ndb-editorial-table-block > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #172a45;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.25;
  letter-spacing: -.025em;
}

.ndb-editorial-table-block > h2::before {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6e1f0;
  border-radius: 8px;
  background: #edf3fb;
  color: #234f9a;
  content: "↗";
  font-size: 15px;
}

.ndb-table-scroll {
  max-width: 100%;
  margin: 16px 0 20px;
  overflow: visible;
  border: 1px solid #dbe3ed;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(18, 38, 65, .07);
}

.ndb-table-wrap {
  max-width: 100%;
  overflow: visible;
}

.ndb-table-wrap:focus-visible {
  outline: 3px solid rgba(35, 79, 154, .3);
  outline-offset: 2px;
}

.ndb-table-scroll:focus-visible {
  outline: 3px solid rgba(35, 79, 154, .3);
  outline-offset: 3px;
}

.ndb-table-scroll > table.ndb-reference-table {
  display: table !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  font-size: 14px;
  line-height: 1.55;
  table-layout: fixed;
}

.ndb-table-scroll > table.ndb-reference-table th,
.ndb-table-scroll > table.ndb-reference-table td {
  padding: 13px 15px !important;
  border: 0 !important;
  border-bottom: 1px solid #e7ecf2 !important;
  color: #26364c;
  text-align: left;
  vertical-align: top;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.ndb-table-scroll > table.ndb-reference-table thead th {
  position: sticky;
  top: 0;
  border-bottom: 1px solid #324964 !important;
  background: #1d3555 !important;
  color: #fff !important;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .065em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ndb-table-scroll > table.ndb-reference-table tbody tr:nth-child(odd) {
  background: #fff !important;
}

.ndb-table-scroll > table.ndb-reference-table tbody tr:nth-child(even) {
  background: #f5f8fc !important;
}

.ndb-table-scroll > table.ndb-reference-table tbody tr:hover {
  background: #edf3fa !important;
}

.ndb-table-scroll > table.ndb-reference-table tbody th[scope="row"] {
  min-width: 150px;
  background: #f7f9fc !important;
  color: #172a45;
  font-weight: 700;
}

.ndb-table-scroll > table.ndb-reference-table td > p {
  margin: 0 !important;
}

.ndb-brand-label {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff, #f5f8fc);
  color: #172a45;
  font-weight: 750;
  box-shadow: 0 2px 4px rgba(20, 42, 72, .05);
}

.ndb-brand-cell {
  display: flex;
  min-width: 142px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.ndb-casino-logo {
  display: block;
  width: 96px;
  height: 48px;
  padding: 5px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.ndb-editorial-table-block .ndb-table-scroll > table.ndb-reference-table {
  min-width: 0 !important;
  font-size: 13px;
}

.ndb-editorial-table-block .ndb-table-scroll > table.ndb-reference-table thead th:first-child,
.ndb-editorial-table-block .ndb-table-scroll > table.ndb-reference-table tbody th:first-child {
  min-width: 0;
}

.ndb-editorial-table-block .ndb-table-scroll > table.ndb-reference-table td:last-child,
.ndb-editorial-table-block .ndb-table-scroll > table.ndb-reference-table th:last-child {
  white-space: normal !important;
}

.ndb-editorial-table-block .ndb-table-scroll > table.ndb-reference-table td:last-child {
  color: #174b37;
  font-weight: 750;
}

.ndb-table-note {
  margin: 12px 2px 0;
  color: #53647a;
  font-size: 12px;
  line-height: 1.55;
}

.ndb-editorial-table-block > .ndb-table-note:first-of-type {
  padding: 10px 12px;
  border-radius: 7px;
  background: #f0f4f9;
}

/* Offer comparison cards use the same layout as the homepage casino listings. */
.ndb-casino-offer-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin-inline: 0 !important;
  justify-items: stretch;
  gap: 12px;
  list-style: none;
  margin-block: 14px 18px;
  padding: 0 !important;
}

.ndb-editorial-table-block:has(.ndb-casino-offer-list),
.ndb-offer-cards-wrap {
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ndb-editorial-table-block .ndb-casino-card {
  box-sizing: border-box;
  display: block;
  float: none !important;
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d7dce4;
  border-radius: 4px;
  background: #fff;
}

article.wysiwyg .ndb-editorial-table-block,
article.wysiwyg .ndb-casino-offer-list,
article.wysiwyg .ndb-casino-card {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
}

article.wysiwyg .ndb-casino-offer-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: stretch;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

article.wysiwyg .ndb-casino-card {
  float: none !important;
  grid-column: 1 / -1;
  justify-self: stretch;
}

.ndb-editorial-table-block .ndb-casino-card__header {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 7px 16px;
  border-bottom: 1px solid #d7dce4;
  background: #f5f5f6;
}

article.wysiwyg .ndb-editorial-table-block .ndb-casino-card__header img {
  display: block !important;
  flex: 0 0 auto;
  width: auto !important;
  max-width: 104px !important;
  height: 38px !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

article.wysiwyg .ndb-editorial-table-block .ndb-casino-card__header strong {
  color: #111827;
  font-size: 14px !important;
  text-align: left;
}

.ndb-editorial-table-block .ndb-casino-card__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 16px;
}

.ndb-editorial-table-block .ndb-casino-card__summary { min-width: 0; }
article.wysiwyg .ndb-editorial-table-block .ndb-casino-card__summary h3 { margin: 0 0 11px !important; color: #101827; font-size: 16px !important; line-height: 20px !important; }
.ndb-editorial-table-block .ndb-casino-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
article.wysiwyg .ndb-editorial-table-block .ndb-casino-card__tags span { padding: 3px 6px; border: 1px solid #96b4e1; border-radius: 3px; color: #183b69; font-size: 11px !important; font-weight: 750; line-height: 1.2 !important; text-transform: uppercase; }
.ndb-editorial-table-block .ndb-casino-card__tags span:first-child { background: #eaf0fa; }
.ndb-editorial-table-block .ndb-casino-card__summary p { margin: 12px 0 0; color: #53647a; font-size: 14px; line-height: 1.5; }
.ndb-editorial-table-block .ndb-casino-card__summary p strong { color: #172a45; }
.ndb-editorial-table-block .ndb-casino-card__action { display: grid; min-width: 0; align-content: center; gap: 8px; }
article.wysiwyg .ndb-editorial-table-block .ndb-casino-card__action-label { color: #53647a; font-size: 12px !important; text-align: right; }
article.wysiwyg .ndb-editorial-table-block .ndb-casino-card__code { overflow-wrap: anywhere; padding: 10px; border: 1px dashed #3d73c7; border-radius: 4px; color: #172a45; font-size: 13px !important; font-weight: 700; text-align: center; }
.ndb-editorial-table-block .ndb-casino-card__action a { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 4px; background: #183b69; color: #fff; font-size: .84rem; font-weight: 700; text-align: center; text-decoration: none; }
.ndb-editorial-table-block .ndb-casino-card__action a:hover { background: #1a52b8; color: #fff; }
.ndb-editorial-table-block .ndb-casino-card__action a:focus-visible { outline: 3px solid #3d73c7; outline-offset: 2px; }

@media (max-width: 768px) {
  .ndb-editorial-table-block {
    margin: 24px 0 30px;
    padding: 17px 14px 15px;
    border-radius: 11px;
  }

  article.wysiwyg[data-text-container] > .ndb-editorial-table-block > .ndb-table-scroll {
    width: calc(100% + 28px);
    margin-left: -14px;
    margin-right: -14px;
  }

  .ndb-editorial-table-block > h2 {
    gap: 8px;
    margin-bottom: 12px;
  }

  .ndb-editorial-table-block > h2::before {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }

  .ndb-table-scroll {
    margin: 14px 0 18px;
    border-radius: 8px;
  }

  .ndb-table-scroll > table.ndb-reference-table {
    min-width: 0 !important;
    font-size: 13px;
  }

  .ndb-table-scroll > table.ndb-reference-table th,
  .ndb-table-scroll > table.ndb-reference-table td {
    padding: 8px 6px !important;
    font-size: 11px;
  }

  .ndb-table-note {
    font-size: 11px;
  }

  .ndb-editorial-table-block .ndb-casino-card__body { grid-template-columns: 1fr; }
  .ndb-editorial-table-block .ndb-casino-card__action { padding: 12px 0 0; border-top: 1px solid #d7dce4; }
  .ndb-editorial-table-block .ndb-casino-card__action-label { text-align: left; }
}

@media (max-width: 640px) {
  article.wysiwyg .ndb-table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-color: #9fb4ce #edf2f8;
  }

  article.wysiwyg .ndb-table-scroll:has(thead th:nth-child(3))::before {
    content: "Swipe to view all columns →";
    display: block;
    position: sticky;
    left: 0;
    width: fit-content;
    padding: 8px 12px 2px;
    color: #53647a;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }

  article.wysiwyg .ndb-table-scroll > table.ndb-reference-table:has(thead th:nth-child(3)) {
    min-width: 580px !important;
  }

  article.wysiwyg .ndb-table-scroll > table.ndb-reference-table:has(thead th:nth-child(4)) {
    min-width: 720px !important;
  }

  article.wysiwyg .ndb-table-scroll > table.ndb-reference-table th,
  article.wysiwyg .ndb-table-scroll > table.ndb-reference-table td {
    padding: 10px 12px !important;
    font-size: 13px !important;
    overflow-wrap: normal;
    word-break: normal;
  }
}

.title-border-left::before { display: none !important; }
