/* ============================================================
   Shared v2 page components: sticky section TOC + FAQ accordion.
   Loaded by casino v2 pages and live-blackjack-game v2 pages so the
   two cannot drift (single definition; owner uniformity rule).
   Chrome classes (header/footer) stay in chrome-legacy.css; this file
   is for in-page components shared across v2 page types.
   ============================================================ */

/* ---------- Button variants ----------
   (.cv2-btn base + --cta live in chrome-legacy.css) */
.cv2-btn--ghost {
  background: transparent;
  color: var(--bji-text-inverse);
  border: 1px solid rgb(255 255 255 / 0.35);
}
.cv2-btn--ghost:hover { border-color: rgb(255 255 255 / 0.7); color: #fff; }

.cv2-btn--outline {
  background: var(--bji-surface);
  color: var(--bji-link);
  border: 1px solid var(--bji-border-strong);
}
.cv2-btn--outline:hover { border-color: var(--bji-link); color: var(--bji-link-hover); }

.cv2-btn--sm { padding: 0.55em 1.1em; font-size: var(--bji-text-sm); }

/* ---------- Sticky section nav ---------- */
.cv2-toc {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bji-surface);
  border-bottom: 1px solid var(--bji-border);
  box-shadow: var(--bji-shadow-sm);
}
.cv2-toc-inner {
  display: flex;
  gap: var(--bji-space-1);
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: var(--bji-space-2);
  scroll-snap-type: x proximity;
  /* Lea Verou scrolling-shadow trick: the two "cover" gradients (local)
     sit over the ends and hide the fade gradients (scroll) when there is
     nothing more to scroll toward — a swipe affordance that is accurate at
     both ends with no JS. */
  background:
    linear-gradient(90deg, var(--bji-surface), transparent) 0 0 / 2.5rem 100% no-repeat local,
    linear-gradient(90deg, transparent, var(--bji-surface)) 100% 0 / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(14 22 56 / 0.12), transparent) 0 0 / 1rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(14 22 56 / 0.12), transparent) 100% 0 / 1rem 100% no-repeat scroll;
}
.cv2-toc-inner::-webkit-scrollbar { display: none; }
.cv2-toc a { scroll-snap-align: start; }
.cv2-toc a {
  flex: 0 0 auto;
  padding: 0.4em 0.75em;
  border-radius: var(--bji-radius-pill);
  font-size: var(--bji-text-sm);
  font-weight: var(--bji-weight-medium);
  color: var(--bji-text-muted);
  white-space: nowrap;
  /* explicit: casino pages have a page-wide link reset, live-game pages
     do not; shared components must not rely on either page's resets */
  text-decoration: none;
}
.cv2-toc a:hover { background: var(--bji-gray-100); text-decoration: none; }
.cv2-toc .cv2-toc-cta {
  margin-left: auto;
  background: var(--bji-cta);
  color: var(--bji-cta-text);
  font-weight: var(--bji-weight-semibold);
}
.cv2-toc .cv2-toc-cta:hover { background: var(--bji-cta-hover); }

/* ---------- FAQ ---------- */
/* Full container width (owner call 2026-07-11): the old prose-width
   centering clashed with the left-aligned section headings. */
.cv2-faq { display: grid; gap: var(--bji-space-3); }
.cv2-faq details {
  border: 1px solid var(--bji-border);
  border-radius: var(--bji-radius-md);
  background: var(--bji-surface-raised);
  overflow: hidden;
}
.cv2-faq summary {
  list-style: none;
  cursor: pointer;
  padding: var(--bji-space-4) var(--bji-space-5);
  font-weight: var(--bji-weight-semibold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--bji-space-3);
}
.cv2-faq summary::-webkit-details-marker { display: none; }
.cv2-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: var(--bji-text-xl);
  color: var(--bji-text-faint);
  transition: transform var(--bji-duration) var(--bji-ease);
}
.cv2-faq details[open] summary::after { transform: rotate(45deg); }
.cv2-faq details[open] summary { border-bottom: 1px solid var(--bji-border); }
.cv2-faq .cv2-faq-a { padding: var(--bji-space-4) var(--bji-space-5); font-size: var(--bji-text-sm); color: var(--bji-text-muted); }
.cv2-faq .cv2-faq-a p { margin: 0 0 var(--bji-space-3); }
.cv2-faq .cv2-faq-a p:last-child { margin-bottom: 0; }
