/* ============================================================
   SPILLEAUTOMATER PAGE — CasinoBonuser.com
   Design system from homepage tokens.
   All classes prefixed .cb-sa- to avoid Mercury collisions.
   Scoped to body.cb-spilleautomater where needed.
   ============================================================ */

/* ---------- MAIN FULL-WIDTH FOR HERO ---------- */
body.cb-spilleautomater main {
  padding-top: 0;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ---------- HIDE LEGACY FOOTER & ELEMENTS ---------- */
body.cb-spilleautomater footer.cb-footer { display: none !important; }
body.cb-spilleautomater .cb-u-crosslinks { display: none !important; }
body.cb-spilleautomater .cb-breadcrumb { display: none !important; }
body.cb-spilleautomater .cb-conversion-block { display: none !important; }
body.cb-spilleautomater .cb-crosslinks { display: none !important; }
body.cb-spilleautomater .cb-sidebar-toplist { display: none !important; }

/* ---------- RESET & BASE (scoped) ---------- */
body.cb-spilleautomater {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a2e;
  background: #f4f6f9;
  -webkit-font-smoothing: antialiased;
}
body.cb-spilleautomater *, body.cb-spilleautomater *::before, body.cb-spilleautomater *::after { box-sizing: border-box; }
body.cb-spilleautomater a { text-decoration: none; color: inherit; }
body.cb-spilleautomater img { max-width: 100%; height: auto; }
body.cb-spilleautomater h1, body.cb-spilleautomater h2, body.cb-spilleautomater h3, body.cb-spilleautomater h4 {
  font-family: 'Roboto', 'Inter', sans-serif; line-height: 1.25;
}

/* ---------- TOKENS ---------- */
:root {
  --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-green:      #11ac84;
  --cb-green-light:#e8f8f3;
  --cb-gold:       #f5a623;
  --cb-gold-light: #fff8ec;
  --cb-teal:       #00b4d8;
  --cb-cta-from:   #8ad455;
  --cb-cta-to:     #5fa82e;
}

/* ---------- FOCUS STYLES ---------- */
body.cb-spilleautomater a:focus-visible,
body.cb-spilleautomater button:focus-visible,
body.cb-spilleautomater input:focus-visible {
  outline: 2px solid var(--cb-green);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   BREADCRUMB (inside hero, light text on dark bg)
   ============================================================ */
.cb-sa-breadcrumb {
  max-width: 960px; margin: 0 auto; padding: 0 16px 16px;
  font-size: 13px; color: #6b7d8d;
  position: relative; z-index: 1; text-align: left;
}
.cb-sa-breadcrumb a { color: #6b7d8d; text-decoration: none; }
.cb-sa-breadcrumb a:hover { color: var(--cb-green); }
.cb-sa-breadcrumb .sep { margin: 0 6px; opacity: .5; }

/* ============================================================
   HERO
   ============================================================ */
.cb-sa-hero {
  background: linear-gradient(135deg, #0f1923 0%, #1e3a5f 100%);
  padding: 64px 16px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
body.cb-spilleautomater.admin-bar .cb-sa-hero { padding-top: 96px; }

.cb-sa-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(17,172,132,.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(0,180,216,.08) 0%, transparent 50%);
  pointer-events: none;
}
.cb-sa-hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #11ac84, #6aad38);
  opacity: .6;
}

.cb-sa-hero-inner {
  max-width: 720px; margin: 0 auto; position: relative; z-index: 1;
}
.cb-sa-hero h1 {
  color: #fff; font-size: 28px; font-weight: 800; margin-bottom: 10px;
}
.cb-sa-hero-sub {
  color: #94a3b4; font-size: 15px; line-height: 1.7; max-width: 580px; margin: 0 auto 24px;
}

/* Hero search */
.cb-sa-hero-search {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}
.cb-sa-search-icon {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--cb-text-muted);
  pointer-events: none;
}
.cb-sa-search-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-size: 15px;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
  transition: border-color .2s, background .2s;
}
.cb-sa-search-input::placeholder {
  color: #6b7d8d;
}
.cb-sa-search-input:focus {
  outline: none;
  border-color: var(--cb-green);
  background: rgba(255,255,255,.12);
}

@media (min-width: 768px) {
  .cb-sa-hero { padding: 68px 16px 40px; }
  .cb-sa-hero h1 { font-size: 36px; }
  .cb-sa-hero-sub { font-size: 16px; }
}

/* ============================================================
   SECTION WRAPPER
   ============================================================ */
.cb-sa-section {
  max-width: 960px; margin: 0 auto; padding: 28px 16px;
}
.cb-sa-section-header {
  text-align: center; margin-bottom: 28px;
}
.cb-sa-section-header h2 {
  font-size: 22px; font-weight: 800; color: var(--cb-navy); margin-bottom: 8px;
}
.cb-sa-section-header p {
  font-size: 14px; color: var(--cb-text-light); max-width: 600px; margin: 0 auto; line-height: 1.7;
}
@media (min-width: 768px) {
  .cb-sa-section-header h2 { font-size: 26px; }
  .cb-sa-section-header p { font-size: 15px; }
}

/* ============================================================
   GAME CARDS GRID
   ============================================================ */
.cb-sa-cards-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (min-width: 640px) { .cb-sa-cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .cb-sa-cards-grid { grid-template-columns: repeat(4, 1fr); } }

.cb-sa-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: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
}
.cb-sa-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

/* Card image placeholder */
.cb-sa-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cb-sa-card-initial {
  font-size: 48px;
  font-weight: 900;
  color: rgba(255,255,255,.3);
  font-family: 'Roboto', 'Inter', sans-serif;
  text-transform: uppercase;
  user-select: none;
}
.cb-sa-game-thumb {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: inherit;
}
.cb-sa-card-image .cb-sa-game-thumb + .cb-sa-badge { z-index: 2; }

/* Badge */
.cb-sa-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  line-height: 1.5;
  letter-spacing: .3px;
}
.cb-sa-badge--hot {
  background: #f5a623;
  color: #fff;
}
.cb-sa-badge--new {
  background: #00b4d8;
  color: #fff;
}
.cb-sa-badge--jackpot {
  background: #e74c3c;
  color: #fff;
}

/* Card body */
.cb-sa-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cb-sa-card-name {
  font-size: 14px; font-weight: 700; color: var(--cb-text);
  margin: 0 0 4px;
  line-height: 1.3;
}
.cb-sa-card-provider {
  font-size: 12px; color: var(--cb-text-muted);
  margin-bottom: 10px;
}

/* Card meta: RTP + volatility */
.cb-sa-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--cb-card-border);
}

/* RTP label */
.cb-sa-rtp {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 50px;
  background: var(--cb-green-light);
  color: var(--cb-green);
  white-space: nowrap;
}

/* Volatility indicator */
.cb-sa-vol {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.cb-sa-vol-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.cb-sa-vol--low {
  color: #11ac84;
}
.cb-sa-vol--medium {
  color: #f5a623;
}
.cb-sa-vol--high {
  color: #e74c3c;
}

/* No results message */
.cb-sa-no-results {
  text-align: center;
  font-size: 15px;
  color: var(--cb-text-muted);
  padding: 24px 0;
}

/* ============================================================
   PROVIDER CARDS GRID
   ============================================================ */
.cb-sa-providers-grid {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
@media (min-width: 520px) { .cb-sa-providers-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .cb-sa-providers-grid { grid-template-columns: 1fr 1fr 1fr 1fr; } }

.cb-sa-provider-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cb-card-bg);
  border: 1px solid var(--cb-card-border);
  border-radius: var(--cb-card-radius);
  padding: 16px;
  box-shadow: var(--cb-card-shadow);
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
}
.cb-sa-provider-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.cb-sa-provider-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e2e6ec;
  padding: 4px;
}
.cb-sa-provider-logo {
  width: 36px; height: 36px; object-fit: contain;
}
.cb-sa-provider-icon span {
  font-size: 20px; font-weight: 800; color: #fff;
  font-family: 'Roboto', 'Inter', sans-serif;
}

.cb-sa-provider-info {
  flex: 1;
  min-width: 0;
}
.cb-sa-provider-info h3 {
  font-size: 14px; font-weight: 700; color: var(--cb-text);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cb-sa-provider-count {
  font-size: 12px; color: var(--cb-text-muted); font-weight: 500;
}

.cb-sa-provider-arrow {
  flex-shrink: 0;
  color: var(--cb-text-muted);
  transition: transform .2s;
}
.cb-sa-provider-card:hover .cb-sa-provider-arrow {
  transform: translateX(3px);
  color: var(--cb-green);
}

/* ============================================================
   EDITORIAL
   ============================================================ */
.cb-sa-editorial {
  background: var(--cb-card-bg);
  border: 1px solid var(--cb-card-border);
  border-radius: var(--cb-card-radius);
  padding: 28px 24px;
  box-shadow: var(--cb-card-shadow);
  max-width: 760px; margin: 0 auto;
}
.cb-sa-editorial h2 {
  font-size: 20px; font-weight: 800; color: var(--cb-navy); margin-bottom: 16px;
}
.cb-sa-editorial h3 {
  font-size: 16px; font-weight: 700; color: var(--cb-text); margin: 20px 0 8px;
}
.cb-sa-editorial p {
  font-size: 14px; color: var(--cb-text-light); line-height: 1.8; margin-bottom: 14px;
}
.cb-sa-editorial ul {
  list-style: none; padding: 0; margin: 0 0 14px;
}
.cb-sa-editorial li {
  font-size: 14px; color: var(--cb-text-light); line-height: 1.8;
  padding: 4px 0 4px 24px; position: relative;
}
.cb-sa-editorial li::before {
  content: '';
  position: absolute; left: 0; top: 11px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cb-green);
}

/* ============================================================
   RESPONSIBLE GAMBLING BOX
   ============================================================ */
.cb-sa-rg-box {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--cb-gold-light);
  border: 1px solid rgba(245,166,35,.25);
  border-left: 4px solid var(--cb-gold);
  border-radius: var(--cb-card-radius);
  padding: 22px 24px;
  max-width: 760px; margin: 0 auto;
}
.cb-sa-rg-icon {
  flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(245,166,35,.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--cb-gold);
}
.cb-sa-rg-content h3 {
  font-size: 16px; font-weight: 700; color: #b8860b; margin-bottom: 6px;
}
.cb-sa-rg-content p {
  font-size: 14px; color: var(--cb-text-light); line-height: 1.7; margin: 0;
}
.cb-sa-rg-content a {
  color: #b8860b; font-weight: 600; text-decoration: underline;
}
.cb-sa-rg-content a:hover { color: var(--cb-navy); }

@media (max-width: 480px) {
  .cb-sa-rg-box { flex-direction: column; align-items: center; text-align: center; }
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.cb-sa-faq { max-width: 760px; margin: 0 auto; }
.cb-sa-faq-item {
  background: var(--cb-card-bg);
  border: 1px solid var(--cb-card-border);
  border-radius: var(--cb-card-radius);
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: var(--cb-card-shadow);
}
.cb-sa-faq-q {
  width: 100%; padding: 16px 20px;
  font-size: 14px; font-weight: 700; color: var(--cb-text);
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  transition: color .15s;
}
.cb-sa-faq-q:hover { color: var(--cb-green); }
.cb-sa-faq-q svg {
  flex-shrink: 0; width: 18px; height: 18px;
  transition: transform .2s; color: var(--cb-text-muted);
}
.cb-sa-faq-item.open .cb-sa-faq-q svg { transform: rotate(180deg); }
.cb-sa-faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
}
.cb-sa-faq-item.open .cb-sa-faq-a { max-height: 400px; }
.cb-sa-faq-a-inner {
  padding: 0 20px 16px;
  font-size: 14px; color: var(--cb-text-light); line-height: 1.8;
}
.cb-sa-faq-a-inner a { color: var(--cb-green); font-weight: 600; text-decoration: underline; }

/* ============================================================
   DIVIDER
   ============================================================ */
.cb-sa-divider {
  max-width: 960px; margin: 0 auto; padding: 0 16px;
}
.cb-sa-divider hr {
  border: none; height: 1px; background: var(--cb-card-border);
}

/* ============================================================
   RESPONSIVE — SMALL SCREENS (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  .cb-sa-hero { padding: 72px 12px 28px; }
  body.cb-spilleautomater.admin-bar .cb-sa-hero { padding-top: 104px; }
  .cb-sa-hero h1 { font-size: 22px; }
  .cb-sa-hero-sub { font-size: 13px; margin-bottom: 20px; }

  .cb-sa-search-input { font-size: 14px; padding: 12px 12px 12px 40px; }

  .cb-sa-section { padding: 20px 12px; }
  .cb-sa-section-header h2 { font-size: 20px; }

  .cb-sa-card-body { padding: 10px; }
  .cb-sa-card-name { font-size: 13px; }
  .cb-sa-card-provider { font-size: 11px; }
  .cb-sa-card-initial { font-size: 36px; }
  .cb-sa-rtp { font-size: 10px; padding: 2px 6px; }
  .cb-sa-vol { font-size: 10px; }
  .cb-sa-vol-dot { width: 6px; height: 6px; }

  .cb-sa-provider-card { padding: 12px; }
  .cb-sa-provider-icon { width: 36px; height: 36px; }
  .cb-sa-provider-icon span { font-size: 16px; }
  .cb-sa-provider-info h3 { font-size: 13px; }

  .cb-sa-editorial { padding: 20px 16px; }
  .cb-sa-editorial h2 { font-size: 18px; }

  .cb-sa-rg-box { padding: 18px 16px; }

  .cb-sa-faq-q { padding: 14px 16px; font-size: 13px; }
}

/* ============================================================
   RESPONSIVE — TABLET (481px–767px)
   ============================================================ */
@media (min-width: 481px) and (max-width: 767px) {
  .cb-sa-hero h1 { font-size: 30px; }
}

/* ============================================================
   RESPONSIVE — LARGE SCREENS (min-width: 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .cb-sa-section { padding: 36px 16px; }
  .cb-sa-hero { padding: 72px 16px 44px; }
  .cb-sa-hero h1 { font-size: 40px; }
  .cb-sa-hero-sub { font-size: 17px; }
}
