/* Shared presentation layer. Commercial data and editorial ordering are unchanged. */
:root { --color-text-faint: var(--color-text-muted); }
[data-theme="dark"] { --color-text-muted: #adb8c5; --color-text-faint: #adb8c5; }

body[data-site-family] :is(.review-main, .review-sidebar, .promo-hero-header > div, .bb-card-info) {
  min-width: 0;
}
body[data-site-family] :is(.review-section-card, .review-verdict-card, .promo-details-card, .promo-faq-card) {
  overflow-wrap: break-word;
}
body[data-site-family] :is(.review-section-card, .review-verdict-card) ul {
  list-style-position: outside;
  padding-left: 1.25rem;
}
body[data-site-family] :is(.review-section-card, .review-verdict-card) li { padding-left: .2rem; }
body[data-site-family] :is(.promo-hero-tcs, .top5-tcs, .bcz-tcs, .cta-row-tcs, .bb-tcs, .tcz-row-tcs, .review-note) {
  font-size: max(.8125rem, 13px) !important;
  line-height: 1.6;
  color: var(--color-text-muted);
}
body[data-site-family] .promo-hero-header { gap: 1rem; }
body[data-site-family] .promo-hero-header > div { flex: 1; }
body[data-site-family] .promo-hero-brand { overflow-wrap: anywhere; }
body[data-site-family] .odds-hero h1 { color: #fff; }
body[data-site-family] .bcz-rating-score { white-space: nowrap; }
body[data-site-family] .bcz-rating-score small { font-size: .5em; font-weight: 500; }
body[data-site-family] .tcz-row__score-value { white-space: nowrap; }
body[data-site-family] :is(.bcz-rating-score, .tcz-row__score-value) small { white-space: pre; }
body[data-site-family] :is(.pros-col, .cons-col) { min-width: 0; }
body[data-site-family] :is(.pro-item, .con-item) {
  display: block !important;
  position: relative;
  padding-left: 1.5rem !important;
}
body[data-site-family] :is(.pro-item, .con-item) > svg {
  position: absolute;
  left: 0;
  top: .25rem;
}
body[data-site-family] .header-inner .header-actions {
  display: flex;
  gap: .5rem;
  margin-left: auto;
}
body[data-site-family] .header-inner .main-nav { display: flex; gap: 1rem; align-items: center; }
body[data-site-family] .header-inner .mobile-menu-toggle { display: none; }
body[data-site-family] .header-inner :is(.header-actions button, .nav-toggle) {
  color: var(--color-text);
  background: transparent;
  border: 0;
  cursor: pointer;
}
body[data-site-family] .header-inner .nav-dropdown { position: relative; }
body[data-site-family] .header-inner .main-nav[data-site-nav-ready] .nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  padding: .5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
body[data-site-family] .header-inner .nav-panel a { display: block; padding: .7rem; }
body[data-site-family] .header-inner .nav-panel[hidden] { display: none !important; }
body[data-site-family] .top5-row {
  grid-template-columns: 32px 96px minmax(0, 1fr) auto auto;
}
[data-theme="dark"] body[data-site-family] .promo-code-label { color: #f8d884 !important; }
[data-theme="dark"] body[data-site-family] .quick-facts-row span { color: var(--color-text) !important; }
body[data-site-family] .promo-detail-row {
  gap: 1rem;
  align-items: start;
}
body[data-site-family] .promo-detail-row > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
body[data-site-family] :is(.rating-badge, .score-badge, .tcz-rating-pill, .bbt-rating) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
body[data-site-family] :is(button, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select) {
  min-height: 44px !important;
}
body[data-site-family] button { min-width: 44px !important; }
body[data-site-family] :is(.theme-toggle, .mobile-menu-btn) { width: 44px; height: 44px; }
body[data-site-family] :is(.btn-primary, .btn-secondary, .cta-btn, .bb-visit-btn, .bb-card-cta) {
  min-height: 44px;
  align-items: center;
}
body[data-site-family] :is(button, a, input, select, summary):focus-visible {
  outline: 3px solid var(--color-primary, #1641b4);
  outline-offset: 3px;
}
body[data-site-family] :is(.faq-question, .faq-item summary) { min-height: 44px; }
body[data-site-family] button.faq-q {
  width: 100%;
  text-align: left;
  border: 0;
  color: var(--color-text);
  font-family: inherit;
}
.faq-answer[hidden], [data-site-table] tr[hidden], [data-site-duplicate-heading], .site-table-empty[hidden] {
  display: none !important;
}

/* Only simple, explicitly marked comparison tables become cards. Existing
   custom filtering, odds grids and the bonus comparison keep their own UI. */
table[data-site-table] {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}
table[data-site-table] :is(th, td) {
  white-space: normal;
  overflow-wrap: break-word;
}
table[data-site-table] thead th { font-size: .75rem; line-height: 1.45; }
table[data-site-table] .bk-cell { min-width: 200px; }
table[data-site-table] :is(.btn-primary, .btn-secondary) { display: inline-flex; justify-content: center; white-space: nowrap; }
.site-table-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  margin: 1rem 0;
}
.site-table-search { display: grid; gap: .4rem; flex: 1 1 250px; max-width: 440px; font-size: .8125rem; font-weight: 600; }
.site-table-search input {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  padding: .65rem .85rem;
}
.site-table-toolbar button {
  padding: .6rem 1rem;
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  background: var(--color-surface);
  cursor: pointer;
}
.site-table-count { font-size: .8125rem; color: var(--color-text-muted); padding-block: .7rem; }
.site-table-empty {
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text-muted);
}
.site-copy-status {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: calc(100% - 2rem);
  padding: .8rem 1rem;
  background: var(--color-text);
  color: var(--color-surface);
  border-radius: 8px;
  font-size: .875rem;
  box-shadow: 0 4px 20px #0002;
}
.site-copy-status:empty { display: none; }

@media (max-width: 900px) {
  table[data-site-table] { display: block; border: 0; background: transparent; }
  table[data-site-table] thead {
    display: table-header-group !important;
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0 !important;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  table[data-site-table] thead th { display: table-cell !important; }
  table[data-site-table] tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
  }
  table[data-site-table] tbody tr {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    width: auto;
    min-width: 0;
    padding: 1.1rem;
    margin: 0;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: visible;
  }
  table[data-site-table] tbody tr:nth-child(even),
  table[data-site-table] tbody tr:hover { background: var(--color-surface); }
  table[data-site-table] tbody td {
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 0 !important;
    border: 0;
    text-align: left !important;
    font-size: .875rem;
    white-space: normal;
  }
  table[data-site-table] tbody td::before {
    content: attr(data-label);
    display: block;
    float: none;
    position: static;
    width: auto;
    margin: 0 0 .2rem;
    color: var(--color-text-muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: normal;
  }
  table[data-site-table] tbody td.bk-rank-cell { font-size: .75rem; color: var(--color-text-muted); }
  table[data-site-table] tbody td.bk-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .85rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--color-border);
  }
  table[data-site-table] tbody td.bk-cell > br { display: none; }
  table[data-site-table] tbody td.bk-cell > br + span { flex-basis: 100%; }
  table[data-site-table] tbody td.bk-cell .bk-name-link { min-width: 0; overflow-wrap: anywhere; }
  table[data-site-table] tbody td:is(.bk-cell, .bk-rank-cell)::before,
  table[data-site-table] tbody td:last-child:has(a.btn-primary)::before { display: none; }
  table[data-site-table] tbody td:last-child:has(a.btn-primary) { margin-top: auto; padding-top: .3rem; }
  table[data-site-table] tbody td:last-child :is(.btn-primary, .btn-secondary) { width: 100%; }
  :is(.table-responsive, .all-book-table-wrap):has(> table[data-site-table]) {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  table.all-book-table[data-site-table] tbody td { display: block; text-align: left; }
  table.all-book-table[data-site-table] tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  table.all-book-table[data-site-table] tbody td:first-child,
  table.all-book-table[data-site-table] tbody td:last-child { grid-column: 1 / -1; }
  table.all-book-table[data-site-table] tbody td:first-child::before { display: none; }
  table.all-book-table[data-site-table] tbody td:last-child .visit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }
  table.all-book-table[data-site-table] tbody td:first-child > a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem;
  }
}
@media (max-width: 720px) {
  body[data-site-family] .top5-row {
    grid-template-columns: 24px 80px minmax(0, 1fr);
  }
}
@media (max-width: 1100px) {
  body[data-site-family] .header-inner { position: relative; gap: 1rem; }
  body[data-site-family] .header-inner .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  body[data-site-family] .header-inner .main-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    padding: 1rem;
    background: var(--color-surface);
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    max-height: 75vh;
    overflow-y: auto;
    z-index: 100;
  }
  body[data-site-family] .header-inner .main-nav.site-nav-open { display: grid; gap: .5rem; }
  body[data-site-family] .header-inner .main-nav a { display: block; padding: .7rem; }
  body[data-site-family] .header-inner .main-nav[data-site-nav-ready] .nav-panel {
    position: static;
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }
  body[data-site-family] .header-inner:has(.main-nav:not([data-site-nav-ready])) { flex-wrap: wrap; }
  body[data-site-family] .header-inner .main-nav:not([data-site-nav-ready]) { display: grid; position: static; flex-basis: 100%; }
}
@media (max-width: 600px) {
  body[data-site-family] .news-grid { grid-template-columns: minmax(0, 1fr); }
  body[data-site-family] .review-hub-actions { flex-wrap: wrap; }
  body[data-site-family] .review-hub-actions > a { white-space: normal; }
  body[data-site-family] a.btn-primary { max-width: 100%; white-space: normal; text-align: center; }
  body[data-site-family] .fixture-table tbody tr {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "match" "comp" "date" "venue";
  }
  body[data-site-family] .fixture-table td { min-width: 0; }
  body[data-site-family] .fixture-table tr td:nth-child(4) { justify-self: start; white-space: normal; }
  table[data-site-table] tbody { grid-template-columns: minmax(0, 1fr); }
  body[data-site-family] .promo-table tbody tr {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand brand" "bonus bonus" "type type" "code claim";
  }
  body[data-site-family] .promo-table td { min-width: 0; overflow-wrap: break-word; }
  body[data-site-family] .promo-table tr td:nth-child(4) { justify-self: start; }
  body[data-site-family] .promo-brand { min-width: 0; }
  body[data-site-family] .promo-brand span { white-space: normal; }
  body[data-site-family] .promo-detail-row { display: grid; grid-template-columns: minmax(80px, 30%) minmax(0, 1fr); }
  body[data-site-family] .promo-detail-row > span:last-child { text-align: left; }
  body[data-site-family] :is(.promo-code-display, .sidebar-promo) { flex-wrap: wrap; gap: .6rem; }
  body[data-site-family="legal-hub"] main .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body[data-site-family="legal-hub"] .law-box { min-width: 0; overflow-wrap: anywhere; }
  body[data-site-family] .bb-copy-btn { display: inline-flex; align-items: center; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .site-table-toolbar *, [data-site-table] * { scroll-behavior: auto; transition: none; }
}
