/* Live stream spot (inc/stream.php, assets/js/stream.js).
 * Desktop (>=1151px): .zc-stream--sidebar, top of the sidebar in place of the
 *   sticky ad, same sticky behaviour (assets/js/sticky-toc.js keeps it clear of
 *   the "On this page" nav).
 * Phones/tablets (<=1150px): .zc-stream--top, directly below the site header,
 *   black band the header's width, player 16:9 (full width, 720px max).
 * Class names carry no ad-related words so blocker cosmetic lists leave it alone.
 * z-index: Twitch only autoplays a player nothing covers, and main.paper::before
 * (the page frame, z-index 2) spans the page, so the player sits above it.
 */
.zc-stream {
  font-family: "Lora", Georgia, serif;
}
.zc-stream__title {
  margin: 0 0 8px;
  font: 700 1.15rem/1.25 "Crimson Pro", Georgia, serif;
  color: var(--ink, #1d1a14);
  text-align: center;
}
.zc-stream__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.zc-stream__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.zc-stream__watch {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #e8d9b6;
  font-weight: 700;
  text-decoration: none;
}
.zc-stream__watch:hover,
.zc-stream__watch:focus-visible {
  text-decoration: underline;
}
.zc-stream__frame.is-playing > .zc-stream__watch {
  display: none;
}

/* Desktop: top of the sidebar. */
.zc-stream--sidebar {
  width: 100%;
  margin: 30px 0 0;
}
.zc-stream--sidebar .zc-stream__frame {
  /* Outline drawn outside the box so the player keeps the full rail width
     (Twitch will not autoplay a player narrower than about 300 px). */
  box-shadow: 0 0 0 1px var(--rule, #bba16b66);
}
@media (min-width: 1151px) {
  /* theme.css gives other rail children position:relative + paper background; keep this one sticky. */
  :is(.content-rail, .homepage-rail, .oracle-rail) > .zc-stream--sidebar {
    position: sticky !important;
    top: 24px;
    z-index: 0 !important;
    margin-top: 0;
    background: none !important;
  }
  :is(.content-rail, .homepage-rail, .oracle-rail):has(> .zc-stream--sidebar) {
    position: relative;
    z-index: 3; /* above the page frame layer, below the header (10) */
  }
  :is(.content-rail, .homepage-rail, .oracle-rail) > .zc-stream--sidebar + * {
    margin-top: 32px;
  }
  .zc-stream--top {
    display: none;
  }
}
@media (min-width: 1151px) and (max-height: 340px) {
  :is(.content-rail, .homepage-rail, .oracle-rail) > .zc-stream--sidebar {
    position: static !important;
  }
}

/* Phones and tablets: below the header. */
@media (max-width: 1150px) {
  .zc-stream.zc-stream--sidebar {
    display: none;
  }
  .zc-stream--top {
    display: block;
    position: relative;
    z-index: 9; /* above the page frame layer, below the header (10) */
    width: 100%;
    background: #000;
  }
  .zc-stream--top .zc-stream__title {
    margin: 0;
    padding: 6px 12px;
    color: #e8d9b6;
    font-size: 1rem;
  }
  .zc-stream--top .zc-stream__frame {
    max-width: 720px;
    margin: 0 auto;
  }
}
@media print {
  .zc-stream {
    display: none !important;
  }
}
