/* ============================================================
   NEONBET · Content panels — Promotions · VIP · Support ·
   Responsible Gaming · Terms · Privacy · AML/KYC.
   (frontend-redesign-v2 · designer look)
   ------------------------------------------------------------
   SCOPED reskin of #content-panel. openContentPanel/getPanelContent/
   closeContentPanel architecture, data-i18n translations and auth
   state are untouched — visuals only. Opens identically from the
   bottom tab bar, drawer and desktop nav. Loaded after style.css.
   ============================================================ */

#content-panel.content-panel {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(27,40,106,0.45), transparent 65%),
    radial-gradient(900px 500px at -10% 30%, rgba(22,33,90,0.45), transparent 65%),
    var(--bg-base);
  font-family: var(--font-sans);
  color: var(--text-primary);
}

/* ---- In-flow layout ----
   style.css declares .content-panel as a fixed full-viewport overlay
   (inset:0, z-index:5000, own scroller) — that overlay is what used to
   cover the site header and footer on every panel. The element now lives
   inside #main-screen > main, so it renders between the fixed topnav and
   the site footer, and the WINDOW is the scroll container. The in-game
   overlay (#game-iframe-overlay) is untouched and still covers the chrome. */
#content-panel.content-panel {
  position: static;
  inset: auto;
  z-index: auto;
  overflow: visible;
  min-height: 50vh;   /* short panels (Contact) don't collapse the page */
  /* style.css animates the overlay with fadeUp (translateY) — a transform
     on the panel visually displaces its stuck sticky header. Fade opacity
     only instead. */
  animation: cpFadeIn 0.25s ease;
}
@keyframes cpFadeIn { from { opacity: 0; } to { opacity: 1; } }
/* The panel's own header stays sticky, parked below the fixed topnav.
   Its overlay-era safe-area inset is dropped — the topnav consumes the
   safe area now that the header no longer touches the viewport top. */
#content-panel .cp-header {
  top: calc(var(--nav-height-mobile) + env(safe-area-inset-top));
  height: 56px;
  padding: 0 var(--space-6);
}
@media (min-width: 1200px) {
  #content-panel .cp-header { top: calc(var(--nav-height) + env(safe-area-inset-top)); }
}
/* While a panel is open, the home/games views step aside. Pure CSS: both
   views keep their DOM and classes (e.g. #nb-games.is-active), so closing
   the panel restores exactly the view that was active before. */
body.cp-open #nb-home,
body.cp-open #nb-games { display: none !important; }

/* ---- Header ----
   Title-only since the "Back to Lobby" button was retired (the global
   topnav/footer navigate everywhere; Escape still closes). The sticky
   header stays — it carries the page title. */
#content-panel .cp-header {
  height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--space-6) 0;
  background: var(--bg-surface-1);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
/* .cp-title is an <h1> since the semantic-headings pass — margin reset
   neutralizes the UA default h1 margin; everything else was already
   pinned here, so the visual stays identical to the old <span>. */
#content-panel .cp-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; letter-spacing: 0.03em; color: var(--text-primary); margin: 0; }
#content-panel .cp-body { max-width: 980px; margin: 0 auto; padding: var(--space-8) var(--space-6) var(--space-20); }
@media (max-width: 600px) { #content-panel .cp-body { padding: var(--space-6) var(--space-5) var(--space-16); } }

/* ---- Generic content typography ---- */
#content-panel .cp-body h1, #content-panel .cp-body h2, #content-panel .cp-body h3, #content-panel .cp-body h4 {
  font-family: var(--font-display); color: var(--text-primary); letter-spacing: 0.02em;
}
#content-panel .cp-body h2 { font-size: var(--text-2xl); margin: 0 0 var(--space-3); }
#content-panel .cp-body h3 { font-size: var(--text-xl); margin: 0 0 var(--space-2); }
#content-panel .cp-body p { color: var(--text-secondary); line-height: 1.7; }
#content-panel .cp-body a { color: var(--neon-cyan); }
#content-panel .cp-body a:hover { color: var(--text-primary); }
#content-panel .cp-body strong { color: var(--text-primary); }

/* ---- Promotions ---- */
#content-panel .promo-grid {
  display: grid; gap: var(--space-4); grid-template-columns: 1fr; margin-bottom: var(--space-8);
}
@media (min-width: 700px)  { #content-panel .promo-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { #content-panel .promo-grid { grid-template-columns: 1fr 1fr 1fr; } }
#content-panel .promo-card {
  position: relative; overflow: hidden;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: var(--space-6);
}
#content-panel .promo-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.5;
  background: radial-gradient(circle at 80% 0%, rgba(255,46,147,0.18), transparent 60%), radial-gradient(circle at 0% 100%, rgba(0,229,255,0.10), transparent 60%);
  pointer-events: none;
}
#content-panel .promo-card > * { position: relative; z-index: 1; }
#content-panel .promo-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(255,46,147,0.15); color: var(--neon-magenta); border: 1px solid rgba(255,46,147,0.30); margin-bottom: var(--space-3);
}
#content-panel .promo-icon { font-size: 36px; margin-bottom: var(--space-2); }
#content-panel .promo-title { font-family: var(--font-display); font-size: var(--text-xl); color: var(--text-primary); margin-bottom: 4px; }
#content-panel .promo-amount, #content-panel .promo-value {
  font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700; margin-bottom: var(--space-2);
  background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent;
}
#content-panel .promo-desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--space-4); }
#content-panel .promo-cta {
  display: inline-flex; align-items: center; height: 44px; padding: 0 var(--space-5);
  border-radius: var(--radius-md); background: var(--grad-primary); color: var(--text-inverse);
  font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
#content-panel .promo-cta:hover { box-shadow: var(--glow-magenta); transform: translateY(-1px); opacity: 1; }

/* ---- VIP ----
   The VIP panel reskin moved to css/pages/vip.css (designer VIP Club
   page, scoped #content-panel .vip-page) when the panel content was
   replaced — the old .vip-tier-card rules would have collided. */

/* ---- Legal (Terms / Privacy / AML / KYC) ---- */
#content-panel .legal-doc { max-width: 760px; }
#content-panel .legal-title { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 400; color: var(--text-primary); margin-bottom: var(--space-2); }
#content-panel .legal-updated { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-8); letter-spacing: 0.02em; }
#content-panel .legal-section { margin-bottom: var(--space-8); }
#content-panel .legal-section h3 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; color: var(--text-primary); margin-bottom: var(--space-2); letter-spacing: 0.02em; }
#content-panel .legal-section p, #content-panel .legal-section li { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.8; margin-bottom: var(--space-2); }
#content-panel .legal-section ul { padding-left: var(--space-5); }
#content-panel .legal-section li { list-style: disc; }
#content-panel .legal-highlight {
  background: rgba(0,229,255,0.06); border-left: 3px solid var(--neon-cyan);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5); font-size: var(--text-sm); color: var(--text-primary); line-height: 1.7;
}

/* ---- Legal Table of Contents (auto "On this page" jump-nav) ---- */
#content-panel .legal-toc {
  margin: 0 0 var(--space-8);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
#content-panel .legal-toc .legal-toc-title {
  margin: 0 0 var(--space-2); max-width: none;
  font-family: var(--font-display); font-weight: 400; font-size: var(--text-xs);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
}
#content-panel .legal-toc .legal-toc-list { list-style: none; margin: 0; padding: 0; }
#content-panel .legal-toc .legal-toc-list li { margin: 0; list-style: none; }
#content-panel .legal-toc .legal-toc-list a {
  display: block; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.5;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
#content-panel .legal-toc .legal-toc-list a:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
#content-panel .legal-toc .legal-toc-list a[aria-current="true"] { background: rgba(0,229,255,0.08); color: var(--neon-cyan); }
/* Clear the 56px sticky panel header when a section is jumped to. */
#content-panel .legal-section[id] { scroll-margin-top: 72px; }

/* ---- Responsible Gaming cards + helpline ---- */
#content-panel .rg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-6); }
#content-panel .rg-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-5); }
#content-panel .rg-card-icon { font-size: 28px; margin-bottom: var(--space-2); }
#content-panel .rg-helpline { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-5); }
#content-panel .rg-helpline-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; }
#content-panel .rg-helpline-phone { font-family: var(--font-mono); color: var(--neon-cyan); font-weight: 700; }
