/*
 * Best Casinos — universal page styles
 * Все цвета, шрифты и геометрия управляются переменными :root.
 * При интеграции в бренд достаточно переопределить переменные в brands/<brand>.json → css_vars.
 */

:root {
  --bg: #f6f1e8;
  --paper: #fffdf8;
  --ink: #161616;
  --muted: #6a6257;
  --line: #ded4c3;
  --accent: #c86a22;
  --accent-ink: #ffffff;
  --font-body: Georgia, "Times New Roman", serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  --container-max: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

.bcw-wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.bcw-paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.bcw-paper h1,
.bcw-paper h2,
.bcw-paper h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 16px;
}

.bcw-paper h1 { font-size: 40px; }

.bcw-paper h2 {
  font-size: 28px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.bcw-paper h3 {
  font-size: 22px;
  margin-top: 22px;
}

.bcw-paper p { margin: 0 0 16px; }

.bcw-paper ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.bcw-paper a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bcw-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 15px;
}

.bcw-table th,
.bcw-table td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.bcw-table th {
  background: color-mix(in srgb, var(--accent) 12%, var(--paper));
  font-size: 14px;
  font-weight: 700;
}

.bcw-table tr:nth-child(even) td {
  background: color-mix(in srgb, var(--line) 18%, var(--paper));
}

.bcw-table .bcw-host-row td {
  background: color-mix(in srgb, var(--accent) 16%, var(--paper));
  font-weight: 600;
}

.bcw-table .bcw-cta {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.bcw-table .bcw-cta:hover,
.bcw-table .bcw-cta:focus {
  filter: brightness(0.92);
}

.bcw-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.bcw-note {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 15px;
}

.bcw-small {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.bcw-table-compact th,
.bcw-table-compact td {
  padding: 8px 10px;
  font-size: 14px;
}

.bcw-extra {
  margin-top: 28px;
}

.bcw-faq {
  margin-top: 32px;
}

.bcw-faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: color-mix(in srgb, var(--line) 8%, var(--paper));
}

.bcw-faq-item[open] {
  background: var(--paper);
}

.bcw-faq-item summary {
  cursor: pointer;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
}

.bcw-faq-item summary::-webkit-details-marker { display: none; }

.bcw-faq-item summary::after {
  content: "+";
  float: right;
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
}

.bcw-faq-item[open] summary::after { content: "−"; }

.bcw-faq-answer {
  margin-top: 10px;
  color: var(--ink);
}

.bcw-faq-answer p:last-child { margin-bottom: 0; }

/* ─── Table wrapper: allows horizontal scroll on mid screens ─── */
.bcw-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

@media (max-width: 640px) {
  .bcw-paper { padding: 20px 16px; }
  .bcw-paper h1 { font-size: 30px; }
  .bcw-paper h2 { font-size: 22px; }
  .bcw-paper h3 { font-size: 18px; }

  /* ─── Table → Cards: main ranking table ─── */
  .bcw-table-wrap .bcw-table {
    /* Let the table break out of fixed-width column mode */
    width: 100%;
    font-size: 14px;
  }

  /* thead: visually hidden but stays in DOM for a11y */
  .bcw-table-wrap .bcw-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* Each <tr> becomes a card */
  .bcw-table-wrap .bcw-table tbody tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--paper);
  }

  /* Remove alternating row background (card has its own bg) */
  .bcw-table-wrap .bcw-table tr:nth-child(even) td {
    background: transparent;
  }

  /* Each <td> becomes a label-value row */
  .bcw-table-wrap .bcw-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
    padding: 6px 0;
    font-size: 14px;
    text-align: left;
    vertical-align: top;
  }

  .bcw-table-wrap .bcw-table td:last-child {
    border-bottom: 0;
    padding-top: 8px;
  }

  /* Label (from data-label attribute) */
  .bcw-table-wrap .bcw-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
  }

  /* Hide the pseudo-element for CTA column (empty data-label) */
  .bcw-table-wrap .bcw-table td[data-label=""]::before {
    display: none;
  }

  /* CTA column: full width button/link */
  .bcw-table-wrap .bcw-table td[data-label=""] {
    justify-content: center;
    padding-top: 10px;
  }

  .bcw-table-wrap .bcw-table .bcw-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 15px;
    min-height: 44px;
    box-sizing: border-box;
  }

  /* host-row highlight preserved on cards */
  .bcw-table-wrap .bcw-table .bcw-host-row td {
    background: transparent;
  }
  .bcw-table-wrap .bcw-table .bcw-host-row {
    background: color-mix(in srgb, var(--accent) 10%, var(--paper));
    border-color: var(--accent);
  }

  /* Compact variant: same card pattern, slightly less padding */
  .bcw-table-wrap .bcw-table-compact td {
    font-size: 13px;
    padding: 5px 0;
  }

  .bcw-table-wrap .bcw-table-compact td::before {
    font-size: 11px;
    min-width: 70px;
  }
}


/* Brand overrides */
:root {
  --bg: #f4f6fc;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #dde4f3;
  --accent: #4453a8;
  --accent-ink: #ffffff;
  --font-body: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-heading: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
