/* Shared components: game cards, rows, carousel, ad slots, dialogs, character. */

/* ---- Game card ---- */
bz-game-card { display: block; min-width: 0; }
.bz-card {
  position: relative; display: flex; flex-direction: column; text-decoration: none; border-radius: 20px; background: var(--surface);
  overflow: hidden; box-shadow: 0 2px 0 var(--line); transition: transform .15s ease, box-shadow .15s ease; color: var(--ink);
}
.bz-card:hover, .bz-card:has(:focus-visible) { transform: translateY(-5px); box-shadow: 0 2px 0 var(--line), 0 10px 22px var(--shadow); color: var(--ink); } /* the 3D lip stays under the lift shadow */
/* The whole card is the link to the game (the title link stretches over it); the creator's name is its own link on top. */
.bz-card__title { color: inherit; text-decoration: none; }
.bz-card__title::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.bz-card__by { position: relative; z-index: 1; color: inherit; text-decoration: underline; text-decoration-color: transparent; }
.bz-card__by:hover, .bz-card__by:focus-visible { text-decoration-color: currentColor; }
.bz-card__title:focus-visible { outline: none; }
.bz-card:has(.bz-card__title:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.bz-card__art { aspect-ratio: 1; position: relative; overflow: hidden; }
.bz-card__art > svg { width: 100%; height: 100%; display: block; }
.bz-live {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(11, 13, 30, 0.78); color: #fff;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px;
}
.bz-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3DDC84; }
.bz-card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.bz-card__title { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.bz-card__meta { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--muted); }
.bz-card__meta span:last-child { font-weight: 600; white-space: nowrap; }
.bz-card--sm .bz-card__title { font-size: 14px; }
.bz-card--sm .bz-card__meta { font-size: 12px; }
.bz-card--sm .bz-card__body { padding: 8px 10px 10px; }
@media (prefers-reduced-motion: reduce) { .bz-card { transition: none; } .bz-card:hover, .bz-card:focus-visible { transform: none; } }

/* ---- Grid of cards ---- */
.bz-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.bz-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1000px) { .bz-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .bz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bz-grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Row (Netflix style) ---- */
bz-row { display: block; }
.bz-rowbox { display: flex; flex-direction: column; gap: 14px; }
.bz-rowbox__head { display: flex; align-items: center; gap: 12px; }
.bz-rowbox__head h2 { flex: 1; }
.bz-rowbox__head > a { font-weight: 600; font-size: 15px; }
.bz-rowbox__head .bz-iconbtn { width: 40px; height: 40px; border-radius: 12px; }
.bz-rowbox__head .bz-iconbtn[disabled] { opacity: .4; }
.bz-rowtrack { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 8px 4px 8px; margin: -8px -4px -4px; scroll-snap-type: x proximity; scroll-padding-inline: 4px; scroll-behavior: smooth; }
.bz-rowtrack::-webkit-scrollbar { display: none; }
.bz-rowtrack > * { flex: 0 0 200px; scroll-snap-align: start; }
@media (max-width: 720px) {
  .bz-rowbox { gap: 10px; }
  .bz-rowbox__head .bz-iconbtn { display: none; }
  .bz-rowbox__head h2 { font-size: 24px; }
  .bz-rowtrack { gap: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .bz-rowtrack > * { flex-basis: 140px; }
}

/* ---- Chip row ---- */
.bz-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: -4px; }
.bz-chips::-webkit-scrollbar { display: none; }
.bz-chips > * { flex: none; }
@media (max-width: 720px) {
  .bz-chips { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .bz-chip { padding: 8px 14px; font-size: 14px; }
}

/* ---- Ad slot: a clearly labelled placeholder, nothing is loaded yet ---- */
bz-ad-slot { display: block; }
.bz-ad { border-radius: 20px; border: 2px dashed var(--line); background: var(--surface); padding: 10px; display: flex; flex-direction: column; gap: 8px; height: 100%; }
.bz-ad__label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.bz-ad__box { flex: 1; min-height: 120px; border-radius: 12px; background: var(--soft); display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; font-size: 13px; color: var(--muted); }

/* A spot in a card row has exactly the card's footprint. The row stretches the slot to the tallest card, and the ad is
   pinned to that box (absolute), so the creative is cropped to fit instead of making the row taller. */
.bz-rowtrack > bz-ad-slot { position: relative; }
.bz-rowtrack > bz-ad-slot > .bz-ad { position: absolute; inset: 0; }
.bz-rowtrack > bz-ad-slot .bz-ad__box { flex: 1; min-height: 0; position: relative; overflow: hidden; padding: 12px; }
.bz-rowtrack > bz-ad-slot .bz-ad__box img,
.bz-rowtrack > bz-ad-slot .bz-ad__box video,
.bz-rowtrack > bz-ad-slot .bz-ad__box canvas { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---- Carousel (featured hero) ---- */
bz-carousel { display: block; }
.bz-hero { position: relative; border-radius: 28px; overflow: hidden; background: var(--hero); color: #fff; }
.bz-hero__slide { display: flex; flex-wrap: wrap; }
.bz-hero__slide[hidden] { display: none; }
.bz-hero__copy { flex: 1 1 420px; min-width: 0; padding: 44px 48px 72px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.bz-hero__eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #FFC93C; }
.bz-hero__title { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(38px, 6vw, 64px); line-height: .95; }
.bz-hero__text { font-size: 18px; line-height: 1.5; color: var(--hero-text); max-width: 46ch; }
.bz-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bz-hero__tags span { padding: 6px 12px; border-radius: 999px; background: var(--hero-chip); font-size: 14px; color: #fff; }
.bz-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.bz-hero__cta .by { font-size: 15px; color: var(--hero-text); }
.bz-hero__art { flex: 1 1 420px; min-height: 340px; position: relative; }
.bz-hero__art > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bz-hero__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bz-hero__shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.bz-hero__shot.is-on { opacity: 1; }
.bz-hero__ctrl { position: absolute; left: 48px; bottom: 22px; display: flex; gap: 8px; align-items: center; }
.bz-hero__dot { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, 0.55); position: relative; }
.bz-hero__dot::after { content: ""; position: absolute; inset: -12px -4px; }
.bz-hero__dot[aria-current="true"] { width: 28px; background: #FFC93C; }
.bz-hero__pause { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.18); color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin-right: 6px; }
.bz-hero__pause .bz-icon { width: 14px; height: 14px; }
.bz-hero :focus-visible { outline-color: #FFC93C; }
@media (max-width: 720px) {
  .bz-hero { border-radius: 24px; }
  .bz-hero__slide { flex-direction: column-reverse; flex-wrap: nowrap; }
  .bz-hero__art { flex: none; min-height: 0; height: 170px; }
  .bz-hero__copy { flex: none; padding: 16px 20px 56px; gap: 10px; }
  .bz-hero__text, .bz-hero__tags { display: none; }
  .bz-hero__title { font-size: 38px; }
  .bz-hero__ctrl { left: auto; right: 20px; bottom: 26px; }
  .bz-hero__cta .bz-btn--play { font-size: 22px; padding: 12px 28px; }
  .bz-hero__cta .by { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bz-hero__shot { transition: none; } }

/* ---- Dialog ---- */
.bz-dialog { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: min(480px, calc(100vw - 32px)); width: 100%; overflow: visible; }
.bz-dialog::backdrop { background: rgba(11, 13, 30, 0.72); }
.bz-dialog__card { background: var(--surface); border-radius: 28px; padding: 32px; box-shadow: 0 24px 60px var(--card-shadow); display: flex; flex-direction: column; gap: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.bz-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bz-dialog__x { position: absolute; right: 12px; top: 12px; }

/* ---- Character ---- */
bz-character { display: block; perspective: 800px; cursor: grab; }
.bz-char { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.bz-char__bob { animation: bz-bob 3.2s ease-in-out infinite; transform-origin: 200px 440px; }
.bz-char__lids { animation: bz-blink 4.6s infinite; transform-origin: 200px 138px; transform-box: view-box; }
@keyframes bz-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes bz-blink { 0%, 94%, 100% { transform: scaleY(0); } 96%, 98% { transform: scaleY(1); } }

/* ---- Empty and offline states: friendly panels used when there is nothing to show yet ---- */
.bz-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.bz-empty > p { margin: 0; max-width: 60ch; line-height: 1.55; }
.bz-empty--hero { padding: 40px 44px; border-radius: 28px; background: var(--hero); color: #fff; }
.bz-empty--hero .bz-eyebrow { color: #FFC93C; }
.bz-empty--hero .bz-muted { color: var(--hero-text); }
.bz-empty--hero .bz-h1 { color: #fff; font-size: clamp(34px, 5vw, 56px); line-height: 1; }
.bz-empty--center { align-items: center; text-align: center; padding: 36px 20px; }
@media (max-width: 720px) { .bz-empty--hero { padding: 28px 22px; border-radius: 24px; } }
