/* Shared desktop layout; themes supply paint through the existing tokens. */
.mx-theater-toggle,
.mx-theater-toggle[hidden] {
  display: none;
}
@media screen and (min-width: 1281px) {
  .mx-theater-toggle:not([hidden]) {
    display: inline-flex;
    flex-basis: auto;
    width: auto;
    gap: 0.45rem;
    padding: 0 0.5rem 0 calc((var(--mx-status-action-size) - 16px) / 2);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
    white-space: nowrap;
  }
  .mx-theater-toggle::after {
    content: none;
  }
  .mx-theater-toggle svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
  }
  /* The dimmer sits behind the viewing area and never intercepts controls. */
  #watch::before {
    content: ""; position: absolute; inset: 0; z-index: 0;
    background: rgba(0, 0, 0, 0.6); opacity: 0; pointer-events: none;
    transition: opacity 180ms ease;
  }
  body.mx-theater #watch::before { opacity: 1; }
  /* Expand only Watch. Other section widths and the video node stay intact. */
  body.mx-theater #watch {
    margin-left: calc(0px - var(--mx-sidebar-width));
    width: calc(100% + var(--mx-sidebar-width));
    min-height: var(--mx-theater-viewport-height, 100dvh);
  }
  body.mx-theater #wrapper #watch .live-stage {
    --mx-live-player-width: var(--mx-theater-player-width, 100%);
    position: relative;
    z-index: 1;
    min-height: var(--mx-theater-viewport-height, 100dvh);
    width: 100%;
    max-width: none;
    padding: 1rem;
  }
  body.mx-theater #sidebar {
    visibility: hidden;
  }
  /* Keep Exit available even while broadcast status is being checked. */
  body.mx-theater #watch .site-now-playing {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) { #watch::before { transition: none; } }
