/* Surveys (surveys/surveys.php and the survey pages guides/guide.php?guides_surveys=1).
 * 1. List page: card grid, same look as the guides list (.guides26 / .g26-* in guide-2026.css).
 * 2. Survey pages: clean data tables (header, zebra rows, hover, sticky header, sideways scroll on phones).
 * Colours come from the redesign variables; --wov-surface / --wov-surface-2 exist only in the dark theme,
 * so every use has a fallback.
 */

/* ---------- 1. List page ---------- */
.surveys26 {
  padding: 4px 30px 20px;
}
.surveys26 .s26-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 16px;
}
.surveys26 .s26-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--wov-surface, #fff);
  border: 1px solid var(--wov-line);
  border-radius: 10px;
  text-decoration: none;
  transition: box-shadow .15s, transform .15s;
}
.surveys26 .s26-card:hover {
  box-shadow: 0 6px 18px rgba(20, 27, 45, .12);
  transform: translateY(-2px);
}
.surveys26 .s26-card img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.surveys26 .s26-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
}
.surveys26 .s26-body strong {
  font-family: var(--wov-display);
  font-size: 17px;
  line-height: 1.25;
  color: var(--wov-ink);
}
.surveys26 .s26-card:hover strong {
  color: var(--wov-red);
}
.surveys26 .s26-summary {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--wov-muted);
}
@media (max-width: 767px) {
  .surveys26 {
    padding: 4px 12px 16px;
  }
  .surveys26 .s26-card img {
    height: 170px;
  }
}

/* ---------- 2. Survey pages: tables ---------- */
:is(.guide-detail, .wov-games26) table {
  --sv-head-bg: var(--wov-ground);
  --sv-zebra: color-mix(in srgb, var(--wov-ground) 45%, var(--wov-surface, #fff));
  --sv-hover: color-mix(in srgb, var(--wov-blue) 13%, var(--wov-surface, #fff));
  --sv-sorted: color-mix(in srgb, var(--wov-blue) 14%, var(--wov-ground));
  width: 100%;
  margin: 14px 0 20px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--wov-line);
  border-radius: 10px;
  overflow: visible; /* the older .hotels rule clips; that would stop the sticky header */
  font-family: var(--wov-font);
  font-size: 14px;
  background: var(--wov-surface, #fff);
}
:is(.guide-detail, .wov-games26) table.fixed {
  table-layout: auto;
}

/* Cells */
:is(.guide-detail, .wov-games26) table th,
:is(.guide-detail, .wov-games26) table td {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--wov-ink);
  text-align: center;
  vertical-align: middle;
  border: 0;
  border-bottom: 1px solid var(--wov-line);
}
:is(.guide-detail, .wov-games26) table tr:last-child > td {
  border-bottom: 0;
}
/* Text columns stay on the left: the first column and anything the page marks .l */
:is(.guide-detail, .wov-games26) table th:first-child,
:is(.guide-detail, .wov-games26) table td:first-child,
:is(.guide-detail, .wov-games26) table th.l,
:is(.guide-detail, .wov-games26) table td.l,
:is(.guide-detail, .wov-games26) table th#remarks,
:is(.guide-detail, .wov-games26) table th#game {
  text-align: left !important;
}
/* Numbers centred (beats the old .r / .c !important rules) */
:is(.guide-detail, .wov-games26) table td.r,
:is(.guide-detail, .wov-games26) table td.c,
:is(.guide-detail, .wov-games26) table th.r,
:is(.guide-detail, .wov-games26) table th.c {
  text-align: center !important;
}
:is(.guide-detail, .wov-games26) table td.l.r,
:is(.guide-detail, .wov-games26) table td.l.c {
  text-align: left !important;
}
:is(.guide-detail, .wov-games26) table td a {
  color: var(--wov-blue);
  text-decoration: none;
}
:is(.guide-detail, .wov-games26) table td a:hover {
  text-decoration: underline;
}

/* Header row: soft ground colour, dark text, red rule. Sticks to the top while scrolling. */
:is(.guide-detail, .wov-games26) table thead th,
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--wov-ink);
  background-color: var(--sv-head-bg);
  border-bottom: 2px solid var(--wov-red);
}
:is(.guide-detail, .wov-games26) table thead th a,
:is(.guide-detail, .wov-games26) table th a {
  color: var(--wov-blue) !important;
  text-decoration: none;
}
:is(.guide-detail, .wov-games26) table thead th a:hover,
:is(.guide-detail, .wov-games26) table th a:hover {
  color: var(--wov-red) !important;
}
:is(.guide-detail, .wov-games26) table thead th:first-child {
  border-top-left-radius: 9px;
}
:is(.guide-detail, .wov-games26) table tbody tr:last-child > td:first-child {
  border-bottom-left-radius: 9px;
}
:is(.guide-detail, .wov-games26) table tbody tr:last-child > td:last-child {
  border-bottom-right-radius: 9px;
}
:is(.guide-detail, .wov-games26) table thead th:last-child {
  border-top-right-radius: 9px;
}

/* Zebra rows and hover (nth-child, so the stripes stay even after tablesorter re-orders rows) */
:is(.guide-detail, .wov-games26) table tbody td,
:is(.guide-detail, .wov-games26) table.tablesorter tbody td {
  background-color: var(--wov-surface, #fff);
}
:is(.guide-detail, .wov-games26) table tbody tr:nth-child(even) > td,
:is(.guide-detail, .wov-games26) table.tablesorter tbody tr:nth-child(even) > td {
  background-color: var(--sv-zebra);
}
:is(.guide-detail, .wov-games26) table tbody tr:hover > td,
:is(.guide-detail, .wov-games26) table.tablesorter tbody tr:hover > td {
  background-color: var(--sv-hover);
}

/* Sort indicators: tablesorter adds .header / .headerSortUp / .headerSortDown to the th and
 * the old CSS paints a black GIF arrow on the span. Re-draw the same GIFs as a mask in the text
 * colour so they stay visible on both themes. */
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.header {
  position: sticky;
  cursor: pointer;
  padding-right: 28px;
  user-select: none;
}
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.header span,
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.headerSortUp span,
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.headerSortDown span {
  padding-right: 0;
  background-image: none;
}
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.header::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 7px;
  width: 21px;
  height: 9px;
  margin-top: -4.5px;
  background-color: currentColor;
  opacity: .5;
  -webkit-mask: url(/common/images/bg.gif) center / contain no-repeat;
  mask: url(/common/images/bg.gif) center / contain no-repeat;
}
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.headerSortUp::after {
  -webkit-mask-image: url(/common/images/asc.gif);
  mask-image: url(/common/images/asc.gif);
  opacity: 1;
}
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.headerSortDown::after {
  -webkit-mask-image: url(/common/images/desc.gif);
  mask-image: url(/common/images/desc.gif);
  opacity: 1;
}
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.headerSortUp,
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.headerSortDown {
  background-color: var(--sv-sorted);
}
:is(.guide-detail, .wov-games26) table.tablesorter thead tr th.header:hover {
  background-color: var(--sv-sorted);
}

/* Tables typed into the guide text (no thead, no th), e.g. the blackjack survey:
 * row 1 is a title bar (bgcolor attribute), row 2 holds the column labels, rows with a
 * colspan are casino sub-headings. */
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tr[bgcolor] > td {
  padding: 12px;
  font-size: 15px;
  color: #fff;
  background-color: var(--wov-navy);
  border-bottom: 0;
}
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tr[bgcolor] > td font {
  font-size: inherit;
}
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tr[bgcolor] > td b,
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tr[bgcolor] > td strong {
  color: inherit;
}
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tr[bgcolor] + tr > td {
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  background-color: var(--sv-head-bg);
  border-bottom: 2px solid var(--wov-red);
}
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tr[bgcolor] + tr > td * {
  font-style: normal;
}
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tbody tr:nth-child(even) > td[colspan],
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tbody tr:nth-child(odd) > td[colspan],
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tbody tr:hover > td[colspan] {
  text-align: left !important;
  background-color: var(--sv-sub, color-mix(in srgb, var(--wov-blue) 9%, var(--wov-ground)));
}
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tbody tr[bgcolor] > td[colspan] {
  background-color: var(--wov-navy);
}
/* Row 1 and 2 are headings: no zebra or hover colour on them */
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tbody tr[bgcolor]:hover > td {
  background-color: var(--wov-navy);
}
:is(.guide-detail, .wov-games26) table:not(.tablesorter) tbody tr[bgcolor] + tr:hover > td {
  background-color: var(--sv-head-bg);
}

/* The page wraps the typed tables in .scroll-table; keep its rounded corners tidy */
:is(.guide-detail, .wov-games26) .scroll-table {
  max-width: 100%;
}

/* Phones: the table scrolls sideways inside its own box instead of widening the page.
 * (The sticky header then sticks inside that box; vertical sticking works on larger screens.) */
@media (max-width: 767px) {
  :is(.guide-detail, .wov-games26) table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }
  :is(.guide-detail, .wov-games26) .scroll-table {
    overflow-x: auto;
  }
  :is(.guide-detail, .wov-games26) .scroll-table table {
    display: table;
    overflow: visible;
    width: max-content;
    min-width: 100%;
  }
  :is(.guide-detail, .wov-games26) table th,
  :is(.guide-detail, .wov-games26) table td {
    padding: 9px 10px;
    white-space: nowrap;
  }
  :is(.guide-detail, .wov-games26) table thead th,
  :is(.guide-detail, .wov-games26) table.tablesorter thead tr th {
    padding: 10px 10px;
  }
  :is(.guide-detail, .wov-games26) table.tablesorter thead tr th.header {
    padding-right: 28px;
  }
}

/* The full blackjack table (many columns) is wider than the content column at normal padding:
   compact cells so it fits (the variants table shares id BlackJack but has class .fixed). */
:is(.guide-detail, .wov-games26) table#BlackJack:not(.fixed) th,
:is(.guide-detail, .wov-games26) table#BlackJack:not(.fixed) td {
  padding: 9px 6px;
  font-size: 13px;
}
:is(.guide-detail, .wov-games26) table#BlackJack:not(.fixed) thead th {
  font-size: 11px;
  letter-spacing: .02em;
}
:is(.guide-detail, .wov-games26) table.tablesorter#BlackJack:not(.fixed) thead tr th.header {
  padding-right: 18px;
}
:is(.guide-detail, .wov-games26) table.tablesorter#BlackJack:not(.fixed) thead tr th.header::after {
  right: 3px;
  width: 14px;
}
