/* =====================================================================
   The folding side menu, shared by the three redesigned sites (owner,
   28 Oct 2026: "most have a switch on the left menu that will shorten the
   left menu to just the icon, with a mouseover title"). The switch and
   tooltip come from site-redesign--rail; each site sets --lb-panel,
   --lb-panel-2, --lb-rule, --lb-text, --lb-text-2, --lb-accent and
   --lb-accent-line on its body class, and narrows its own rail width under
   .lb-rail-collapsed. Each site's homepage layout is its own, in its own
   sheet. Loaded after the site sheet.
   ===================================================================== */
/* The side-menu switch and its tooltip (site-redesign--rail). */
.rd-site .lb-rail-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 12px 0 0 14px;
  padding: 0;
  border: 1px solid var(--lb-rule);
  border-radius: 8px;
  background: var(--lb-panel);
  color: var(--lb-text-2);
  cursor: pointer;
}

/* In the header, left of the logo (a site that gives it a [data-rail-toggle-slot]). */
.rd-site .lb-rail-toggle.lb-rail-toggle--header {
  margin: 0;
}

.rd-site .lb-rail-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.rd-site .lb-rail-toggle:hover,
.rd-site .lb-rail-toggle:focus-visible {
  border-color: var(--lb-accent-line);
  color: var(--lb-accent);
}

.rd-site .lb-rail-tip {
  position: fixed;
  z-index: 2000;
  padding: 6px 10px;
  border: 1px solid var(--lb-accent-line);
  border-radius: 6px;
  background: var(--lb-panel-2);
  color: var(--lb-text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}

.rd-site .lb-rail-tip[hidden] {
  display: none;
}

@media (min-width: 1200px) {
  .rd-site .lb-rail-toggle {
    display: flex;
  }

  /* The header slot the fold button moves into ([data-rail-toggle-slot], left of the logo or the menu): one rule for
     every redesigned site (3 Nov 2026). A homepage without a rail hides its slot in its own sheet. */
  .rd-site .main-wrpper > header .lb-rail-toggle-slot {
    display: flex;
    align-items: center;
    margin: 0 16px 0 0;
  }

  .rd-site .main-wrpper > header .lb-rail-toggle-slot:empty {
    display: none;
  }

  .rd-site.lb-rail-collapsed aside.sidebar .navsports h2,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus h3,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus h4,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus a i.fa-chevron-right,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus .pm-nav-new,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-section-header,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-category-chevron,
  .rd-site.lb-rail-collapsed aside.sidebar .my_prpofile_name_side,
  .rd-site.lb-rail-collapsed aside.sidebar .my_balance_box,
  /* the favourites drop-down is a text button with a star that switches favourites OFF on click: folded, the word
     ran out past the rail as "FAVO" (owner's screenshot, 3 Nov 2026) and the star alone would be a trap */
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar_faves,
  /* the prediction-market reference links are text-only: folded, they would be blank rows */
  .rd-site.lb-rail-collapsed aside.sidebar li:has(> .pm_menu_ref),
  .rd-site.lb-rail-collapsed aside.sidebar .pm_menu_ref,
  /* and their card, when it holds nothing else (else it would stay as an empty gap) */
  .rd-site.lb-rail-collapsed aside.sidebar .card_sidebar:has(> li > .pm_menu_ref):not(:has(> li > :not(.pm_menu_ref))) {
    display: none;
  }

  /* Folded labels stay readable to screen readers; only the eye loses them. */
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus a span,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-category-header span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-category-header {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus ul li a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus ul li a img,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus ul li a i {
    margin: 0;
  }

  /* Folded, the Propose a Market pill has no room for its label: it drops its colour and shows its icon shaded like
     every other row (owner, 4 Nov 2026). */
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus a.pm_menu_cta,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus li.active a.pm_menu_cta,
  .rd-site.lb-rail-collapsed aside.sidebar .sidebar-menus li a.pm_menu_cta:hover {
    background: transparent !important;
    box-shadow: none !important;
  }

  .rd-site.lb-rail-collapsed .lb-rail-toggle:not(.lb-rail-toggle--header) {
    margin-left: 15px;
  }
}
