/*
 * The Online Casinos section (/online-casino/ and its category pages).
 * See src/generate/online-casino.js. Styles nothing outside .oc-wrap and the
 * section's own menu (.oc-subnav, which sits in the masthead in place of the
 * news navigation), except the one rule that lets the band meet the masthead.
 * Colours are the title's own theme tokens, so light and dark both follow
 * the title.
 */

#main:has(> .oc-wrap) { padding-top: 0; }
/* No bottom bar on these pages (layout's sectionNav), so no room kept for it. */
.portal:has(> #main > .oc-wrap) { padding-bottom: env(safe-area-inset-bottom, 0px); }

.oc-wrap {
  --oc-gap: clamp(16px, 2.5vw, 24px);
  color: var(--ink);
  font-family: var(--font-body);
}
.oc-wrap *, .oc-wrap *::before, .oc-wrap *::after { box-sizing: border-box; }

/* ---- sub-navigation and band ------------------------------------------- */

.oc-subnav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.oc-subnav__in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  gap: 4px 22px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.oc-subnav__in::-webkit-scrollbar { display: none; }
.oc-subnav a {
  flex: none;
  padding: 14px 0 12px;
  color: var(--ink);
  font-family: var(--font-meta);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.oc-subnav a:hover { color: var(--accent); }
.oc-subnav a[aria-current="page"] { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.oc-subnav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.oc-band { background: var(--accent); color: var(--accent-ink); }
.oc-band__in { max-width: var(--wrap); margin: 0 auto; padding: 22px var(--gutter); }
.oc-band__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.1;
}

/* ---- page body ---------------------------------------------------------- */

.oc {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.oc > section { margin-top: clamp(32px, 5vw, 48px); }
.oc h1 {
  margin: clamp(22px, 4vw, 34px) 0 10px;
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
  max-width: 24em;
}
.oc h2 {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 800;
  line-height: 1.2;
}
.oc h3 { font-family: var(--font-head); }
.oc p { line-height: 1.6; max-width: 72ch; }
.oc a { color: var(--accent); }
.oc-meta { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.oc-lead { font-size: 17px; margin: 0 0 14px; }
.oc-disclosure, .oc-small, .oc-disclaimer { color: var(--muted); font-size: 13px; }
.oc-disclosure {
  margin: 0;
  padding: 10px 12px;
  background: var(--sunken);
  border-radius: var(--radius);
  max-width: none;
}

/* ---- badges ------------------------------------------------------------- */

.oc-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -.02em;
  line-height: 1;
}
.oc-mark--lg {
  width: 84px;
  height: 84px;
  font-size: 22px;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--accent);
}

/* Logos. A wordmark sits on a fixed dark or light ground (the operator's
   artwork is drawn for one or the other, whatever the page's mode); a square
   app icon fills the circle. */
.oc-mark { overflow: hidden; }
.oc-mark img { display: block; }
.oc-mark--dark { background: #121418; }
.oc-mark--light { background: #ffffff; }
.oc-mark--dark, .oc-mark--light { outline: 1px solid var(--border); outline-offset: -1px; }
.oc-mark--dark img, .oc-mark--light img { width: 80%; height: 64%; object-fit: contain; }
.oc-mark--cover { background: #121418; }
.oc-mark--cover img { width: 100%; height: 100%; object-fit: cover; }
.oc-mark--lg.oc-mark--dark, .oc-mark--lg.oc-mark--light { outline: 0; }

/* In a card the badge is a logo tile rather than a circle, so a long
   wordmark reads at a useful size. A square app icon sits at the tile's
   height on the dark ground. */
.oc-card .oc-mark { width: 104px; height: 56px; border-radius: calc(var(--radius) * 2); }
.oc-card .oc-mark--dark img, .oc-card .oc-mark--light img { width: 88px; height: 40px; }
.oc-card .oc-mark--cover img { width: 56px; height: 56px; object-fit: cover; }
.oc-card .oc-mark--text { font-size: 18px; }

.oc-offers__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.oc-offers__head h2 { text-transform: uppercase; font-size: 20px; margin: 0; }
.oc-offers__head a { font-size: 14px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.oc-offers__head a:hover { color: var(--accent); }
.oc-badges {
  list-style: none;
  margin: 18px 0 10px;
  padding: 8px 2px 4px;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.oc-badges li { flex: none; }
.oc-badges a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 96px;
  text-decoration: none;
  color: var(--ink);
}
.oc-badges a:hover .oc-mark--text { background: var(--accent); color: var(--accent-ink); }
.oc-badges a:hover .oc-mark { transform: scale(1.04); }
.oc-mark { transition: transform .15s ease; }
@media (prefers-reduced-motion: reduce) { .oc-mark { transition: none; } }
.oc-badges__n {
  position: absolute;
  top: -4px;
  right: 2px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--surface);
}
.oc-badges__name { font-size: 13px; text-align: center; line-height: 1.25; }

/* ---- casino cards ------------------------------------------------------- */

.oc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.oc-card {
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) 1.3fr 1.2fr auto;
  align-items: center;
  gap: 14px var(--oc-gap);
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  scroll-margin-top: 90px;
}
.oc-card:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.oc-card__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.oc-card__rank {
  flex: none;
  width: 26px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  color: var(--muted);
  text-align: center;
}
.oc-card__title { min-width: 0; }
.oc .oc-card__name { margin: 0 0 3px; font-size: 18px; font-weight: 800; line-height: 1.2; }
.oc-card__tag { display: inline-block; font-size: 13px; color: var(--muted); }
.oc .oc-card__offer { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.35; }
.oc .oc-card__offer--none { font-weight: 400; color: var(--muted); font-size: 14px; }
.oc-card__label {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.oc-card__notes { margin: 0; padding: 0 0 0 18px; font-size: 14px; color: var(--ink); line-height: 1.45; }
.oc-card__notes li + li { margin-top: 3px; }
.oc-card__cta { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: center; }
.oc-card__small { font-size: 11px; color: var(--muted); white-space: nowrap; }

.oc .oc-btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.oc .oc-btn:hover { filter: brightness(1.08); }
.oc .oc-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.oc .oc-btn--ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.oc-more { margin: 18px 0 0; }

@media (max-width: 1080px) {
  .oc-card { grid-template-columns: 1fr 1fr; }
  .oc-card__cta { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .oc-card__offer { grid-column: 1; }
  .oc-card__notes { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .oc-card { grid-template-columns: 1fr; padding: 14px; }
  .oc-card__cta, .oc-card__offer, .oc-card__notes { grid-column: 1; grid-row: auto; }
  .oc .oc-btn { display: block; }
  .oc-mark--lg { width: 68px; height: 68px; font-size: 19px; }
  .oc-badges { gap: 12px; }
  .oc-badges a { width: 80px; }
}

/* ---- tiles, explore, table --------------------------------------------- */

.oc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.oc-tiles--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.oc-tile {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}
.oc .oc-tile h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.oc .oc-tile p { margin: 0; font-size: 14px; line-height: 1.55; }

.oc-explore { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.oc .oc-explore a {
  display: block;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.oc .oc-explore a:hover { border-color: var(--accent); }
.oc-explore strong { display: block; margin-bottom: 4px; color: var(--accent); font-family: var(--font-head); font-size: 16px; }
.oc-explore span { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); }

.oc-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.oc-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
.oc-table th, .oc-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); line-height: 1.45; }
.oc-table thead th { background: var(--sunken); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.oc-table tbody th { white-space: nowrap; font-weight: 700; }
.oc-table tbody tr:last-child > * { border-bottom: 0; }

/* ---- safer gambling, FAQ, disclaimer ---------------------------------- */

.oc-rg {
  padding: 18px 20px;
  background: var(--sunken);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.oc-rg p:last-child { margin-bottom: 0; }

.oc-faq { display: grid; gap: 8px; }
.oc-faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.oc-faq__item summary { cursor: pointer; padding: 14px 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.oc-faq__item summary::-webkit-details-marker { display: none; }
.oc-faq__item summary::after { content: "+"; font-weight: 700; color: var(--accent); font-size: 20px; line-height: 1; }
.oc-faq__item[open] summary::after { content: "\2212"; }
.oc .oc-faq__item h3 { margin: 0; font-size: 16px; font-weight: 700; }
.oc .oc-faq__item p { margin: 0; padding: 0 16px 14px; }

.oc-disclaimer { margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--border); max-width: none; }
