/* Covozi v1.68 — public Creator Profile navigation + Broadcast rail parity.
 * Keeps the v1.67 shared masthead/sidebar contract intact, removes historical
 * Broadcast full-bleed offsets, and makes the Broadcast feed occupy the same
 * centred Creator Profile body rail as Paths, Mentioned Links, Courses, FAQ,
 * Gallery and Resources.
 */

/* --------------------------------------------------------------------------
   Broadcast feed/reader: use the same centred desktop rail as creator pages.
   v1.58 intentionally escaped an older theme container by using full-width
   document geometry; now that v1.67 owns the public shell, that escape makes
   Broadcasts visually wider and vertically tighter than its sibling routes.
   -------------------------------------------------------------------------- */
@media (min-width: 901px) {
  body.stanloop-broadcast-shell-feed .stanloop-loop-page--broadcast-public,
  body.stanloop-broadcast-shell-reader .stanloop-loop-page--broadcast-public {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 22px 18px 36px !important;
  }

  body.stanloop-broadcast-shell-feed .stanloop-loop-shell--broadcast-public,
  body.stanloop-broadcast-shell-reader .stanloop-loop-shell--broadcast-public {
    width: min(1280px, calc(100% - 80px)) !important;
    max-width: 1280px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: 226px minmax(0, 1fr) !important;
    gap: 18px !important;
    align-items: start !important;
  }

  body.stanloop-broadcast-shell-feed .stanloop-loop-main--broadcast-public,
  body.stanloop-broadcast-shell-reader .stanloop-loop-main--broadcast-public {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  /* Restore the normal public footer rail instead of the v1.58 near-viewport
   * width. This makes Broadcasts enter/exit on the same visual axis as every
   * other creator destination. */
  body.stanloop-broadcast-shell-feed .stanloop-loop-site-footer,
  body.stanloop-broadcast-shell-reader .stanloop-loop-site-footer {
    width: min(1480px, calc(100% - 36px)) !important;
    max-width: 1480px !important;
    margin: 0 auto 28px !important;
  }
}

/* Tablet/phone continue to use the v1.67 finite creator navigation contract.
 * Explicitly cancel the old Broadcast viewport margins without introducing a
 * horizontal rail or swipe dependency. */
@media (max-width: 900px) {
  body.stanloop-broadcast-shell-feed .stanloop-loop-page--broadcast-public,
  body.stanloop-broadcast-shell-reader .stanloop-loop-page--broadcast-public {
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px 10px 32px !important;
  }

  body.stanloop-broadcast-shell-feed .stanloop-loop-shell--broadcast-public,
  body.stanloop-broadcast-shell-reader .stanloop-loop-shell--broadcast-public {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body.stanloop-broadcast-shell-feed .stanloop-loop-site-footer,
  body.stanloop-broadcast-shell-reader .stanloop-loop-site-footer {
    width: calc(100% - 20px) !important;
    max-width: none !important;
    margin: 0 10px 18px !important;
  }
}
