/* ============================================================
   CB VERKTOY — calculator + hub template
   Two-column layout: sticky sidebar topliste + main content.
   Calculator UI itself is styled by inline cb_tools_css().
   ============================================================ */

body.cb-verktoy {
  margin: 0 !important; padding: 0 !important;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #f4f6f9;
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
  --cb-bg: #f4f6f9;
  --cb-card-bg: #ffffff;
  --cb-card-border: #e2e6ec;
  --cb-card-shadow: 0 2px 16px rgba(0,0,0,0.05);
  --cb-card-radius: 14px;
  --cb-text: #1a1a2e;
  --cb-text-light: #5a6577;
  --cb-text-muted: #8a93a2;
  --cb-navy: #1e3a5f;
  --cb-navy-dark: #0f1923;
  --cb-green: #11ac84;
  --cb-green-dark: #0d9876;
  --cb-green-light: #e8f8f3;
  --cb-gold: #f5a623;
}
body.cb-verktoy main {
  padding-top: 0 !important;
  max-width: none !important; width: 100% !important;
  margin: 0 !important; padding-left: 0 !important; padding-right: 0 !important;
}
body.cb-verktoy footer.cb-footer,
body.cb-verktoy .cb-u-crosslinks,
body.cb-verktoy .cb-breadcrumb,
body.cb-verktoy .cb-conversion-block,
body.cb-verktoy .cb-crosslinks,
body.cb-verktoy .cb-sidebar-toplist { display: none !important; }

/* ============================================================
   LAYOUT
   ============================================================ */
.cb-vk-main { max-width: 100%; }
.cb-vk-layout {
  max-width: 960px; margin: 0 auto;
  padding: 28px 16px 24px;
  display: grid; grid-template-columns: 260px 1fr;
  gap: 32px; align-items: start;
}
@media (max-width: 820px) {
  .cb-vk-layout { grid-template-columns: 1fr; gap: 20px; padding: 16px 14px 20px; }
}

/* Sidebar */
.cb-vk-sidebar { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 821px) {
  .cb-vk-sidebar {
    position: sticky; top: 84px; align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto; z-index: 5;
  }
}

.cb-vk-content { min-width: 0; }

/* Override the .cbt-wrap max-width inside our layout (it's already constrained
   by .cb-vk-layout). Let it fill the column. */
.cb-vk-content > .cbt-wrap {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ============================================================
   SIDEBAR TOPLIST (cb-ar-toplist-* — same sitewide component)
   ============================================================ */
body.cb-verktoy .cb-ar-toplist-card {
  background: var(--cb-card-bg);
  border: 1px solid var(--cb-card-border);
  border-radius: var(--cb-card-radius);
  padding: 18px 16px; box-shadow: var(--cb-card-shadow);
}
body.cb-verktoy .cb-ar-toplist-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--cb-text-muted);
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--cb-card-border);
}
body.cb-verktoy .cb-ar-toplist-items { display: flex; flex-direction: column; gap: 4px; }
body.cb-verktoy .cb-ar-toplist-item {
  display: grid; grid-template-columns: 20px 36px 1fr;
  gap: 10px; align-items: center;
  padding: 8px; border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none; color: inherit;
  transition: all 0.15s;
}
body.cb-verktoy .cb-ar-toplist-item:hover {
  background: var(--cb-green-light);
  border-color: rgba(17,172,132,0.18);
  text-decoration: none;
}
body.cb-verktoy .cb-ar-toplist-rank {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--cb-green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}
body.cb-verktoy .cb-ar-toplist-rank.r2 { background: #6b7d8d; }
body.cb-verktoy .cb-ar-toplist-rank.r3 { background: var(--cb-gold); }
body.cb-verktoy .cb-ar-toplist-logo {
  width: 36px; height: 36px;
  background: #f4f6f9; border-radius: 6px;
  object-fit: contain; padding: 4px; flex-shrink: 0;
}
body.cb-verktoy .cb-ar-toplist-logo-ph {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px; color: var(--cb-navy);
  padding: 0;
}
body.cb-verktoy .cb-ar-toplist-info { min-width: 0; display: flex; flex-direction: column; }
body.cb-verktoy .cb-ar-toplist-name {
  font-weight: 700; font-size: 13px; color: var(--cb-navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.cb-verktoy .cb-ar-toplist-bonus {
  font-size: 11px; color: var(--cb-text-light); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.cb-verktoy .cb-ar-toplist-cta {
  display: block; margin-top: 14px;
  padding: 11px 12px;
  background: var(--cb-green); color: #fff;
  text-align: center; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  text-decoration: none; transition: background 0.15s;
}
body.cb-verktoy .cb-ar-toplist-cta:hover {
  background: var(--cb-green-dark); text-decoration: none; color: #fff;
}
body.cb-verktoy .cb-ar-toplist-tc {
  margin-top: 8px;
  font-size: 10.5px; color: var(--cb-text-muted); text-align: center;
}

/* ============================================================
   EDITORIAL SECTIONS
   ============================================================ */
.cb-vk-section {
  background: var(--cb-card-bg);
  border: 1px solid var(--cb-card-border);
  border-radius: var(--cb-card-radius);
  padding: 24px 26px;
  margin-top: 18px;
  box-shadow: var(--cb-card-shadow);
}
.cb-vk-section h2 {
  font-family: 'Roboto', 'Inter', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--cb-navy);
  margin: 0 0 16px;
  line-height: 1.25;
}
.cb-vk-section h3 {
  font-size: 17px; font-weight: 700; color: var(--cb-navy);
  margin: 18px 0 8px;
}
.cb-vk-section p {
  font-size: 16px; line-height: 1.7; color: var(--cb-text);
  margin: 0 0 12px;
}
.cb-vk-section p:last-child { margin-bottom: 0; }

.cb-vk-intro p {
  font-size: 16.5px;
  color: var(--cb-text);
}

/* How-to numbered steps */
.cb-vk-steps {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.cb-vk-steps li {
  display: flex; gap: 14px; align-items: flex-start;
}
.cb-vk-step-num {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--cb-green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.cb-vk-step-body { flex: 1; min-width: 0; }
.cb-vk-step-body strong {
  display: block; font-size: 15px; font-weight: 700;
  color: var(--cb-navy); margin-bottom: 4px;
}
.cb-vk-step-body p {
  font-size: 14.5px; color: var(--cb-text-light); line-height: 1.55;
  margin: 0;
}

/* FAQ (details/summary) */
.cb-vk-faq-item {
  background: transparent;
  border-top: 1px solid var(--cb-card-border);
  padding: 12px 0;
}
.cb-vk-faq-item:first-of-type { border-top: 0; padding-top: 0; }
.cb-vk-faq-q {
  font-size: 15.5px; font-weight: 600; color: var(--cb-navy);
  cursor: pointer; list-style: none;
  padding: 6px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.cb-vk-faq-q::marker, .cb-vk-faq-q::-webkit-details-marker { display: none; }
.cb-vk-faq-q::after {
  content: '+'; color: var(--cb-text-muted);
  font-size: 22px; font-weight: 400; line-height: 1;
  margin-left: 14px; transition: transform 0.2s;
}
details[open] > .cb-vk-faq-q::after {
  content: '\2013';
  color: var(--cb-green);
}
.cb-vk-faq-a {
  padding-top: 6px;
  font-size: 14.5px; color: var(--cb-text); line-height: 1.7;
}
.cb-vk-faq-a p { margin: 0 0 8px; }
.cb-vk-faq-a p:last-child { margin-bottom: 0; }

/* Mistakes list — numbered cards with red accent */
.cb-vk-mistakes-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  counter-reset: mistake;
}
.cb-vk-mistakes-list li {
  counter-increment: mistake;
  position: relative;
  background: #fef9f9;
  border: 1px solid #f4d6d6;
  border-left: 3px solid #d35454;
  border-radius: 8px;
  padding: 12px 16px 12px 44px;
  font-size: 14.5px; line-height: 1.6;
  color: var(--cb-text);
}
.cb-vk-mistakes-list li::before {
  content: counter(mistake);
  position: absolute;
  left: 12px; top: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #d35454; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}

/* Math + example sections — softer typography */
.cb-vk-math p,
.cb-vk-example p { font-size: 15.5px; line-height: 1.7; }
.cb-vk-math ul,
.cb-vk-example ul {
  margin: 12px 0;
  padding-left: 22px;
}
.cb-vk-math ul li,
.cb-vk-example ul li {
  margin-bottom: 6px;
  font-size: 14.5px; line-height: 1.6;
  color: var(--cb-text-light);
}
.cb-vk-example h3 {
  font-size: 16px; font-weight: 700;
  color: var(--cb-green);
  margin: 18px 0 6px;
  text-transform: none;
}

/* Responsible gambling box */
.cb-vk-rg {
  display: flex; gap: 16px; align-items: flex-start;
  background: linear-gradient(135deg, #fff8ec 0%, #fffaf1 100%);
  border: 1px solid #f0d9a1;
  border-radius: var(--cb-card-radius);
  padding: 20px 22px;
  margin-top: 18px;
}
.cb-vk-rg-icon { font-size: 22px; flex-shrink: 0; }
.cb-vk-rg-body h3 {
  font-size: 15px; font-weight: 700; color: var(--cb-navy);
  margin: 0 0 6px;
}
.cb-vk-rg-body p {
  font-size: 14px; line-height: 1.6; color: var(--cb-text); margin: 0;
}
.cb-vk-rg-body a {
  color: var(--cb-navy); font-weight: 600; text-decoration: underline;
}

/* ============================================================
   RELATED GUIDES
   ============================================================ */
.cb-vk-related {
  max-width: 960px; margin: 32px auto 0;
  padding: 0 16px 56px;
}
.cb-vk-related h2 {
  font-family: 'Roboto', 'Inter', sans-serif;
  font-size: 22px; font-weight: 800; color: var(--cb-navy);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cb-card-border);
}
.cb-vk-related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 820px) { .cb-vk-related-grid { grid-template-columns: 1fr; } }

.cb-vk-related-card {
  background: var(--cb-card-bg);
  border: 1px solid var(--cb-card-border);
  border-radius: var(--cb-card-radius);
  overflow: hidden; box-shadow: var(--cb-card-shadow);
  display: block; transition: all 0.2s;
  text-decoration: none; color: inherit;
}
.cb-vk-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  text-decoration: none;
}
.cb-vk-related-img {
  width: 100%; height: 150px; object-fit: cover;
  background: linear-gradient(135deg, var(--cb-navy-dark), var(--cb-navy));
}
.cb-vk-related-img-ph {
  background: linear-gradient(135deg, var(--cb-navy-dark), var(--cb-green));
}
.cb-vk-related-body { padding: 14px 16px; }
.cb-vk-related-kicker {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--cb-green); letter-spacing: 0.06em; margin-bottom: 6px;
}
.cb-vk-related-card h3 {
  font-size: 15px; font-weight: 700;
  margin: 0 0 6px; line-height: 1.35;
  color: var(--cb-navy);
}
.cb-vk-related-meta {
  font-size: 12px; color: var(--cb-text-muted);
}

/* Small-screen polish */
@media (max-width: 480px) {
  .cb-vk-section { padding: 18px 18px; }
  .cb-vk-section h2 { font-size: 19px; }
  .cb-vk-step-body strong { font-size: 14.5px; }
  .cb-vk-step-body p { font-size: 14px; }
}
