/* Wire · h9315b · Topic Hub Sidebar Top + Gap Parity
 *
 * The independent /topic/... document uses the canonical shared sidebar
 * component directly under <body>, not under .wire-app.
 *
 * h9288b's current three-zone desktop geometry is scoped to .wire-app > ...,
 * so its top-dock / menu-scroll / bottom-profile row ownership does not attach
 * to the independent Topic Hub shell.
 *
 * This Topic-only bridge applies the SAME three-zone geometry to that already
 * existing shared component. No sidebar markup is cloned or rewritten.
 */

@media (min-width:821px){
  /* Exact h9288b three-zone rail contract for the independent Topic shell. */
  body.sports-topic-hub-body
  > .wire-main-sidebar-303f1h213,
  body.sports-topic-hub-body
  > .left-rail.wire-main-sidebar-303f1h213{
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    overflow:hidden!important;
    overflow-x:hidden!important;
    overflow-y:hidden!important;
    border-top-left-radius:0!important;
    border-top-right-radius:0!important;
  }

  body.sports-topic-hub-body
  > .wire-main-sidebar-303f1h213
  > .wire-main-sidebar-top-dock-303f1h9288b,
  body.sports-topic-hub-body
  > .left-rail.wire-main-sidebar-303f1h213
  > .wire-main-sidebar-top-dock-303f1h9288b{
    grid-row:1!important;
    min-width:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0 20px!important;
    overflow:hidden!important;
    background:#03090e!important;
    z-index:45!important;
  }

  /*
   * Reassert the visible Home top-dock dimensions on Topic pages. These are
   * the current h9288b dimensions, not the older 72px Topic-brand box.
   */
  body.sports-topic-hub-body
  .wire-main-sidebar-top-dock-303f1h9288b
  .wire-main-sidebar-brand-303f1h213{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    height:58px!important;
    min-height:58px!important;
    margin:0 8px 4px!important;
    padding:0!important;
    border-bottom:0!important;
  }

  body.sports-topic-hub-body
  .wire-main-sidebar-top-dock-303f1h9288b
  .wire-main-sidebar-brand-303f1h213 img{
    display:block!important;
    height:58px!important;
    margin:0!important;
  }

  body.sports-topic-hub-body
  .wire-main-sidebar-top-dock-303f1h9288b
  .wire-main-sidebar-create-303f1h213{
    margin:6px 8px 12px!important;
  }

  /*
   * This removes the awkward dead air below Create Post. It mirrors the
   * current Home menu-only middle row, including the earlier zero-top-padding
   * correction.
   */
  body.sports-topic-hub-body
  > .wire-main-sidebar-303f1h213
  > .wire-main-sidebar-scroll-303f1h213,
  body.sports-topic-hub-body
  > .left-rail.wire-main-sidebar-303f1h213
  > .wire-main-sidebar-scroll-303f1h213{
    grid-row:2!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    margin-top:0!important;
    padding-top:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
    box-sizing:border-box!important;
  }

  body.sports-topic-hub-body
  > .wire-main-sidebar-303f1h213
  > .wire-main-sidebar-scroll-303f1h213::-webkit-scrollbar,
  body.sports-topic-hub-body
  > .left-rail.wire-main-sidebar-303f1h213
  > .wire-main-sidebar-scroll-303f1h213::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }

  body.sports-topic-hub-body
  > .wire-main-sidebar-303f1h213
  > .wire-main-sidebar-profile-303f1h213,
  body.sports-topic-hub-body
  > .left-rail.wire-main-sidebar-303f1h213
  > .wire-main-sidebar-profile-303f1h213{
    grid-row:3!important;
    align-self:end!important;
    position:relative!important;
    inset:auto!important;
    flex:0 0 auto!important;
    background:#03090e!important;
    z-index:40!important;
  }

  /*
   * Topic Hub is an independent document and therefore misses h9305a's
   * .wire-app-qualified Admin-bar seam owner. Match it only when the real
   * Admin access bar is present. Visible controls stay in the same place:
   * outer rail moves up 30px; 30px is restored as internal top padding.
   */
  body.sports-topic-hub-body.wire-admin-access-visible-303f1h297
  > .wire-main-sidebar-303f1h213,
  body.sports-topic-hub-body.wire-admin-access-visible-303f1h297
  > .left-rail.wire-main-sidebar-303f1h213,
  body.sports-topic-hub-body:has(.wire-admin-access-bar-303f1h297)
  > .wire-main-sidebar-303f1h213,
  body.sports-topic-hub-body:has(.wire-admin-access-bar-303f1h297)
  > .left-rail.wire-main-sidebar-303f1h213{
    margin-top:-30px!important;
    top:0!important;
    height:100vh!important;
    min-height:100vh!important;
    max-height:100vh!important;
    padding-top:30px!important;
    box-sizing:border-box!important;
    border-top-left-radius:0!important;
    border-top-right-radius:0!important;
  }
}


@media (min-width:821px) and (max-width:1180px){
  body.sports-topic-hub-body
  > .wire-main-sidebar-303f1h213
  > .wire-main-sidebar-top-dock-303f1h9288b,
  body.sports-topic-hub-body
  > .left-rail.wire-main-sidebar-303f1h213
  > .wire-main-sidebar-top-dock-303f1h9288b{
    padding-left:8px!important;
    padding-right:8px!important;
  }

  body.sports-topic-hub-body
  .wire-main-sidebar-top-dock-303f1h9288b
  .wire-main-sidebar-brand-303f1h213{
    margin-left:0!important;
    margin-right:0!important;
  }

  body.sports-topic-hub-body
  .wire-main-sidebar-top-dock-303f1h9288b
  .wire-main-sidebar-create-303f1h213{
    margin-left:4px!important;
    margin-right:4px!important;
  }
}

@supports (height:100dvh){
  @media (min-width:821px){
    body.sports-topic-hub-body.wire-admin-access-visible-303f1h297
    > .wire-main-sidebar-303f1h213,
    body.sports-topic-hub-body.wire-admin-access-visible-303f1h297
    > .left-rail.wire-main-sidebar-303f1h213,
    body.sports-topic-hub-body:has(.wire-admin-access-bar-303f1h297)
    > .wire-main-sidebar-303f1h213,
    body.sports-topic-hub-body:has(.wire-admin-access-bar-303f1h297)
    > .left-rail.wire-main-sidebar-303f1h213{
      height:100dvh!important;
      min-height:100dvh!important;
      max-height:100dvh!important;
    }
  }
}
