/* Shared portrait cards. Slots separate provider artwork from their captions, while original games use full-bleed art. */

:root body[data-lobby-layout="reference"] #games-hub {
  --tile-radius:10px;
  --tile-ink:#f6f7ff;
  --tile-muted:#b2bed3;
  --tile-base:#171e2d;
  --tile-ring:rgb(255 255 255 / .09);
  --tile-ring-hover:rgb(255 255 255 / .26);
  --tile-scrim:linear-gradient(180deg,rgb(12 14 38 / 0) 0%,rgb(12 14 38 / .72) 46%,rgb(10 12 32 / .94) 100%);
}
:root[data-theme="light"] body[data-lobby-layout="reference"] #games-hub {
  --tile-ring:rgb(20 26 74 / .10);
  --tile-ring-hover:rgb(60 72 170 / .45);
}

/* ---- Shared frame ---- */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog :is(#lobby-games .game-tab.game-tile-premium,#lobby-slots .tts-demo-game,#lobby-cases .case-tile) {
  position:relative; isolation:isolate; overflow:hidden; container-type:inline-size;
  width:100%; min-width:0; max-width:none; height:auto; min-height:0; aspect-ratio:3/4; margin:0;
  border:0; border-radius:var(--tile-radius);
  box-shadow:none; color:var(--tile-ink); text-align:start;
}
/* Keep the art uninterrupted and use the border to signal hover. */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog :is(#lobby-games .game-tab.game-tile-premium,#lobby-slots .tts-demo-game,#lobby-cases .case-tile)::after {
  content:""; position:absolute; inset:0; z-index:3; pointer-events:none; border-radius:inherit;
  box-shadow:inset 0 0 0 1px var(--tile-ring);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog :is(#lobby-games .game-tab.game-tile-premium,#lobby-slots .tts-demo-game,#lobby-cases .case-tile):focus-visible {
  outline:2px solid var(--accent); outline-offset:3px;
}
@media(hover:hover) {
  :root body[data-lobby-layout="reference"] #games-hub #game-catalog :is(#lobby-games .game-tab.game-tile-premium,#lobby-slots .tts-demo-game,#lobby-cases .case-tile):hover::after {
    box-shadow:inset 0 0 0 2px var(--tile-ring-hover);
  }
}
/* Keep the cover steady while hovering. */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-games .game-tile-premium:hover .game-tile-art > :is(img,svg),
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-slots .tts-demo-game:hover > img { transform:none; filter:none; }

/* ---- Mini-games: full-bleed art (the title is part of the art) ---- */
/* Light theme gave the Mini-games grid itself a shadow, which read as a pale panel behind the row. Tiles carry their own. */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog :is(#lobby-games,#lobby-sports) .catalog-grid { box-shadow:none; }
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-games .game-tab.game-tile-premium { padding:0; background-color:#24295a; }
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-games .game-tile-premium .game-tile-art {
  display:block; width:100%; height:100%; padding:0; border:0; border-radius:0; background:none;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-games .game-tile-premium .game-tile-art > :is(img,svg) {
  display:block; width:100%; height:100%; border-radius:0; object-fit:cover;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-games .game-tab.featured-provider-tile {
  background:radial-gradient(ellipse at 50% 54%,#25395e,#0c1628 75%);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-games .featured-provider-tile .game-tile-art > img {
  object-fit:contain;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-games .featured-provider-name {
  position:absolute; inset:auto 0 7%; z-index:2; text-align:center; color:var(--tile-muted);
  font-size:clamp(9px,7cqi,13px); font-weight:650;
}

/* ---- Shared caption plate (slots + chests) ---- */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog :is(#lobby-slots .tts-demo-game > strong,#lobby-cases .case-tile-title) {
  position:static; z-index:2; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; align-items:initial; justify-content:initial;
  width:auto; height:auto; min-height:0; margin:0 clamp(8px,7cqi,12px); padding:0; overflow:hidden; clip-path:none; white-space:normal;
  color:var(--tile-ink); font-size:clamp(11px,8.4cqi,15px); font-weight:800; line-height:1.25; letter-spacing:-.1px;
  text-align:start; overflow-wrap:anywhere; text-shadow:0 1px 2px rgb(0 0 0 / .45);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog :is(#lobby-slots .tts-demo-game > .tts-demo-game-provider,#lobby-cases .case-tile-footer) {
  position:static; z-index:2; width:auto; height:auto; margin:0 clamp(8px,7cqi,12px); padding:0; clip-path:none;
  color:var(--tile-muted); font-size:clamp(9px,6.4cqi,12px); font-weight:650; line-height:1.3; letter-spacing:.2px; text-align:start;
}

/* ---- Slots: keep official art and publisher metadata distinct ---- */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-slots .tts-demo-tile { display:flex; min-width:0; }
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-slots .tts-demo-game {
  display:grid; grid-template-rows:auto minmax(0,1fr) auto; grid-template-columns:minmax(0,1fr); row-gap:5px;
  padding:0 0 clamp(7px,6cqi,10px); background:var(--surface);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-slots .tts-demo-game > img {
  grid-row:1; z-index:1; align-self:start; justify-self:stretch; order:0;
  width:100%; height:auto; max-height:100%; aspect-ratio:4/3; object-fit:cover; margin:0; border-radius:0; background:var(--raised);
  box-shadow:none; mask-image:none;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-slots .tts-demo-game > strong {
  grid-row:2; order:0; align-self:start; color:var(--ink); font-size:clamp(11px,9cqi,14px); font-weight:700; text-shadow:none;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-slots .tts-demo-game > .tts-demo-game-provider {
  grid-row:3; order:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
  color:var(--muted); font-size:clamp(10px,7.1cqi,12px); font-weight:550; letter-spacing:0; text-transform:none;
}
/* No cover art: use the BlueRabbit mark at the same size as a cover. */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-slots .tts-demo-game[data-has-art="false"]::before {
  position:static; inset:auto; z-index:1; grid-row:1; order:0; width:100%; height:auto; aspect-ratio:4/3; filter:none; transform:none;
  content:''; background:var(--raised) url('/assets/bluerabbit-b-logo-v2.png') center/30% no-repeat;
}
@media(max-width:360px) {
  :root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-slots .tts-demo-game > img { aspect-ratio:1.6; }
  :root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-slots .tts-demo-game[data-has-art="false"]::before { aspect-ratio:1.6; }
}
/* Favorite stays a separate control over the cover art. */
:root body[data-lobby-layout="reference"] #games-hub #lobby-slots .tts-demo-tile > .tts-slot-favorite { z-index:4; }
:root body[data-lobby-layout="reference"] #games-hub #lobby-slots .tts-demo-tile > .tts-slot-favorite::before {
  border-color:rgb(255 255 255 / .22); background:rgb(12 17 31 / .84);
}

/* ---- Chests: the chest floats on its own color glow, caption + price under it ---- */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile {
  display:grid; grid-template-rows:minmax(0,1fr) auto auto; grid-template-columns:minmax(0,1fr); row-gap:3px; gap:3px 0;
  padding:0 0 clamp(8px,7cqi,12px);
  background:
    radial-gradient(90% 62% at 50% 34%,color-mix(in srgb,var(--case-color) 38%,transparent),transparent 72%),
    var(--tile-scrim) bottom/100% 50% no-repeat,
    linear-gradient(180deg,color-mix(in srgb,var(--case-color) 16%,#1b2050),var(--tile-base) 70%);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile:is(:hover,[aria-pressed="true"]) { border-color:transparent; }
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile-art {
  grid-row:1; display:grid; place-items:center; width:100%; height:100%; min-height:0; padding:8% 10% 2%; background:none;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile-art::before {
  inset:16% 14% 10%; border:0; background:radial-gradient(ellipse,color-mix(in srgb,var(--case-color) 30%,transparent),transparent 68%);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile-art img {
  width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 10px 12px rgb(0 0 0 / .45));
}
/* The body wrapper steps aside so title and footer join the card's caption rows. */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile-body { display:contents; }
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile-title { grid-row:2; }
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile-footer {
  grid-row:3; display:flex; align-items:center; justify-content:space-between; gap:6px;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile-price {
  min-width:0; color:color-mix(in srgb,var(--case-color) 55%,#fff); font-size:clamp(10px,7.4cqi,14px); font-weight:800; line-height:1.3;
  font-variant-numeric:tabular-nums; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile-action {
  display:grid; place-items:center; flex:none; width:clamp(20px,15cqi,28px); height:clamp(20px,15cqi,28px); border:0; border-radius:8px;
  background:color-mix(in srgb,var(--case-color) 30%,rgb(255 255 255 / .06)); color:#fff;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-cases .case-tile-action svg { width:62%; height:62%; color:#fff; stroke:currentColor; }

@media(max-width:600px) {
  :root body[data-lobby-layout="reference"] #games-hub { --tile-radius:12px; }
}
@media(prefers-reduced-motion:reduce) {
  :root body[data-lobby-layout="reference"] #games-hub #game-catalog :is(#lobby-games .game-tab.game-tile-premium,#lobby-slots .tts-demo-game,#lobby-cases .case-tile),
  :root body[data-lobby-layout="reference"] #games-hub #game-catalog :is(#lobby-games .game-tab.game-tile-premium,#lobby-slots .tts-demo-game,#lobby-cases .case-tile)::after { transition:none; }
}

/* ---- Sports: "Coming soon" placeholders (Dota 2, CS2, Soccer, Tennis, Hockey) on the same card ----
   Not playable yet: no hover lift, no pointer, a "Coming soon" chip in the corner and the same caption plate
   as chests (title, then a muted "Coming soon" meta line). The art floats on a glow in the sport's own color. */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile {
  position:relative; isolation:isolate; overflow:hidden; container-type:inline-size;
  display:grid; grid-template-rows:minmax(0,1fr) auto auto; grid-template-columns:minmax(0,1fr); row-gap:3px;
  width:100%; min-width:0; aspect-ratio:3/4; margin:0; padding:0 0 clamp(8px,7cqi,12px);
  border-radius:var(--tile-radius); box-shadow:none; color:var(--tile-ink); text-align:start; cursor:default;
  background:
    radial-gradient(90% 62% at 50% 38%,color-mix(in srgb,var(--sport-color) 34%,transparent),transparent 72%),
    var(--tile-scrim) bottom/100% 50% no-repeat,
    linear-gradient(180deg,color-mix(in srgb,var(--sport-color) 16%,#1b2050),var(--tile-base) 70%);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile::after {
  content:""; position:absolute; inset:0; z-index:3; pointer-events:none; border-radius:inherit;
  box-shadow:inset 0 0 0 1px var(--tile-ring);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile-art {
  grid-row:1; display:grid; place-items:center; min-height:0; padding:14% 10% 0;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile-art svg {
  display:block; width:100%; height:100%; max-height:100%; filter:drop-shadow(0 10px 12px rgb(0 0 0 / .4)) saturate(.9);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile-title {
  grid-row:2; z-index:2; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
  margin:0 clamp(8px,7cqi,12px); color:var(--tile-ink); font-size:clamp(11px,8.4cqi,15px); font-weight:800; line-height:1.25;
  letter-spacing:-.1px; overflow-wrap:anywhere; text-shadow:0 1px 2px rgb(0 0 0 / .45);
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile-footer {
  grid-row:3; z-index:2; display:flex; align-items:center; gap:5px; min-width:0; margin:0 clamp(8px,7cqi,12px);
  color:var(--tile-muted); font-size:clamp(9px,6.4cqi,12px); font-weight:650; line-height:1.3; letter-spacing:.2px;
}
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile-footer svg { flex:none; width:1.1em; height:1.1em; }
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile-footer span { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile-badge {
  position:absolute; top:clamp(6px,5cqi,10px); inset-inline-end:clamp(6px,5cqi,10px); z-index:4; max-width:calc(100% - 12px);
  padding:3px clamp(6px,5cqi,9px); overflow:hidden; border:1px solid color-mix(in srgb,var(--sport-color) 55%,transparent); border-radius:999px;
  background:rgb(12 14 36 / .62); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  color:color-mix(in srgb,var(--sport-color) 45%,#fff); font-size:clamp(8px,5.6cqi,11px); font-weight:800; line-height:1.2;
  letter-spacing:.4px; text-transform:uppercase; white-space:nowrap; text-overflow:ellipsis;
}
/* A game that takes bets now (it has matches on the live betting board). */
:root body[data-lobby-layout="reference"] #games-hub #game-catalog #lobby-sports .sports-tile-badge.is-open { border-color:color-mix(in srgb,#3ddc97 70%,transparent); color:#bff5d9; }

/* ---- Live casino: a view of the Slots section limited to live dealer families (Evolution) ---- */
#slots-heading [data-slots-heading="live"] { display:none; }
#games-hub[data-slots-view="live"] #slots-heading [data-slots-heading="all"] { display:none; }
#games-hub[data-slots-view="live"] #slots-heading [data-slots-heading="live"] { display:inline; }
#games-hub[data-slots-view="live"] #lobby-slots :is(.slots-catalog,.moon-warren-catalog-feedback,#tts-slot-publisher) { display:none !important; }
#games-hub[data-slots-filter="new"] #lobby-slots :is(.slots-catalog,.moon-warren-catalog-feedback) { display:none !important; }
/* LIVE chip on a live table's cover, top-left (the favorite star owns top-right). */
:is(#lobby-slots .tts-demo-game,#lobby-games .live-table-tile) > .tts-live-badge {
  position:absolute; z-index:3; inset:8px auto auto 8px; display:inline-flex; align-items:center; gap:5px;
  padding:3px 8px 3px 7px; border-radius:999px; background:#e5243b; color:#fff;
  font:800 10px/1.2 system-ui,sans-serif; letter-spacing:.6px; text-transform:uppercase; pointer-events:none;
  box-shadow:0 2px 8px rgb(0 0 0 / .35);
}
:is(#lobby-slots .tts-demo-game,#lobby-games .live-table-tile) > .tts-live-badge::before {
  content:""; width:6px; height:6px; border-radius:50%; background:#fff; box-shadow:0 0 0 0 rgb(255 255 255 / .7);
  animation:tts-live-pulse 1.6s ease-out infinite;
}
#lobby-games .live-table-tile > .tts-live-badge[data-recovery="true"] { background:#263354; }
#lobby-games .live-table-tile > .tts-live-badge[data-recovery="true"]::before { content:none; }
@keyframes tts-live-pulse { 0% { box-shadow:0 0 0 0 rgb(255 255 255 / .7); } 70%,100% { box-shadow:0 0 0 6px rgb(255 255 255 / 0); } }
@media (prefers-reduced-motion:reduce) { :is(#lobby-slots .tts-demo-game,#lobby-games .live-table-tile) > .tts-live-badge::before { animation:none; } }
