/*
 * 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; }

/* ── Mobile card layout (≤767px) ── */
@media (max-width: 767px) {
  /* Hide table header, convert to block */
  .bcw-table thead { display: none; }
  .bcw-table,
  .bcw-table tbody { display: block; width: 100%; }

  /* Even-row tint → reset; cards have their own background */
  .bcw-table tr:nth-child(even) td { background: var(--paper); }

  /* Each <tr> = card with gold left accent */
  .bcw-table tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    background: var(--paper);
  }

  /* Position badge — centered stripe at top of card */
  .bcw-table tbody td:first-child {
    display: block;
    width: 100%;
    text-align: center;
    padding: 6px 14px;
    border-bottom: 1px solid var(--line);
    border-right: none;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--paper));
    box-sizing: border-box;
  }
  .bcw-table tbody td:first-child::before { display: none; }

  /* Data cells — label : value flex row */
  .bcw-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 14px;
    border: none;
    border-bottom: 1px solid var(--line);
    font-size: .82rem;
    width: 100%;
    box-sizing: border-box;
    vertical-align: top;
  }

  /* Column label via ::before */
  .bcw-table tbody td::before {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    flex-shrink: 0;
    padding-top: 2px;
    min-width: 5rem;
  }
  .bcw-table tbody td:nth-child(2)::before { content: "Casino"; }
  .bcw-table tbody td:nth-child(3)::before { content: "Bonus"; }
  .bcw-table tbody td:nth-child(4)::before { content: "Omsetning"; }
  .bcw-table tbody td:nth-child(5)::before { content: "Best for"; }
  .bcw-table tbody td:nth-child(6)::before { content: "Lisens"; }

  /* CTA cell — full-width block at bottom of card */
  .bcw-table tbody td:last-child {
    display: block;
    border-bottom: none;
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
  .bcw-table tbody td:last-child::before { display: none; }

  /* Full-width CTA button — always filled, never partial */
  .bcw-table .bcw-cta {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    padding: 10px 16px !important;
    font-size: .9rem !important;
    white-space: nowrap !important;
    margin: 0 !important;
    border-radius: 8px !important;
  }

  /* Compact sub-tables (3 content cols): hide empty 4th col */
  .bcw-table-compact tbody td:nth-child(4) { display: none !important; }
  .bcw-table-compact tbody td:nth-child(3)::before { content: "Hva som skiller"; }
}

@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; }
}


/* Brand overrides */
:root {
  --bg: #0c1026;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e5e7eb;
  --accent: #ff3b3b;
  --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;
}
