/* JSV 2.0.118 — Marketplace rail replacement, not a second rail.
 * The Marketplace feature rail becomes the only persistent left rail on every
 * Marketplace-family route. The global JustScribes rail remains available as
 * the mobile More drawer, but it reserves no desktop/tablet width here. */
body.jsv-marketplace-rail-takeover,
body.jsm-marketplace-family-page{
  --jsx-rail:0px!important;
  --jsf-bp-w:0px;
  --jsf-bp-mini:0px;
  --jsf-bp-gap:0px;
  --jsm-marketplace-available-width:100%;
}

/* DESKTOP/TABLET: remove the global blue rail itself, not the retired member drawer. */
@media (min-width:761px){
  body.jsv-marketplace-rail-takeover>.jsv-x-rail,
  body.jsm-marketplace-family-page>.jsv-x-rail,
  body.jsv-marketplace-rail-takeover #jsv-x-rail,
  body.jsm-marketplace-family-page #jsv-x-rail,
  body.jsv-marketplace-rail-takeover>.jsv-x-backdrop,
  body.jsm-marketplace-family-page>.jsv-x-backdrop{
    display:none!important;
    visibility:hidden!important;
    width:0!important;
    min-width:0!important;
    pointer-events:none!important;
  }

  body.jsv-marketplace-rail-takeover>.jsv-x-page,
  body.jsm-marketplace-family-page>.jsv-x-page{
    margin-left:0!important;
    width:calc(100% - var(--jsx-sponsor,0px))!important;
    max-width:none!important;
  }

  body.jsv-marketplace-rail-takeover .jsv-x-content,
  body.jsm-marketplace-family-page .jsv-x-content{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0 14px 28px 0!important;
  }

  /* Put the Marketplace rail on the exact left edge vacated by the global rail. */
  body.jsv-marketplace-rail-takeover .jsm-marketplace-hub,
  body.jsv-marketplace-rail-takeover .jsm-marketplace-workspace,
  body.jsv-marketplace-rail-takeover .jsm-marketplace-rewards-workspace,
  body.jsm-marketplace-family-page .jsm-marketplace-hub,
  body.jsm-marketplace-family-page .jsm-marketplace-workspace,
  body.jsm-marketplace-family-page .jsm-marketplace-rewards-workspace{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  body.jsv-marketplace-rail-takeover .jsm-mp-rail,
  body.jsm-marketplace-family-page .jsm-mp-rail{
    margin-left:0!important;
    border-radius:0 18px 18px 0!important;
  }

  /* Prevent an older theme Marketplace context rail from returning beside it. */
  body.jsv-marketplace-rail-takeover .jsf-context-shell.jsf-context-marketplace>.jsf-context-tools,
  body.jsv-marketplace-rail-takeover .jsf-context-shell.jsf-context-marketplace>.jsf-context-right,
  body.jsm-marketplace-family-page .jsf-context-shell.jsf-context-marketplace>.jsf-context-tools,
  body.jsm-marketplace-family-page .jsf-context-shell.jsf-context-marketplace>.jsf-context-right{
    display:none!important;
  }
  body.jsv-marketplace-rail-takeover .jsf-context-shell.jsf-context-marketplace>.jsf-context-main,
  body.jsm-marketplace-family-page .jsf-context-shell.jsf-context-marketplace>.jsf-context-main{
    width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;
  }
}

/* 761–900px: Marketplace's own rail becomes its swipeable app navigation.
   The global desktop rail must still stay gone. */
@media (min-width:761px) and (max-width:900px){
  body.jsv-marketplace-rail-takeover .jsv-x-content,
  body.jsm-marketplace-family-page .jsv-x-content{padding-right:0!important}
}

/* PHONE: preserve the global More drawer but never reserve a column for it.
   Marketplace itself owns the visible navigation and page canvas. */
@media (max-width:760px){
  body.jsv-marketplace-rail-takeover,
  body.jsm-marketplace-family-page{--jsx-rail:0px!important;--jsx-sponsor:0px!important;overflow-x:hidden!important}
  body.jsv-marketplace-rail-takeover>.jsv-x-page,
  body.jsm-marketplace-family-page>.jsv-x-page{margin:0!important;width:100%!important;max-width:none!important}
  body.jsv-marketplace-rail-takeover .jsv-x-content,
  body.jsm-marketplace-family-page .jsv-x-content{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  body.jsv-marketplace-rail-takeover .jsm-marketplace-hub,
  body.jsv-marketplace-rail-takeover .jsm-marketplace-workspace,
  body.jsv-marketplace-rail-takeover .jsm-marketplace-rewards-workspace,
  body.jsm-marketplace-family-page .jsm-marketplace-hub,
  body.jsm-marketplace-family-page .jsm-marketplace-workspace,
  body.jsm-marketplace-family-page .jsm-marketplace-rewards-workspace{width:100%!important;max-width:100%!important;margin:0!important}
}
