/* ============================================================
   SIDEBAR — desktop: fixed panel | tablet/mobile: drawer
   ============================================================ */

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
}

/* ----------------------------------------------------------
   LOGO (desktop only)
   ---------------------------------------------------------- */

.sidebar__logo-wrap {
  display: flex;
  align-items: center;
  height: var(--nav-bar-h);
  flex-shrink: 0;
  cursor: pointer;
}

/* ----------------------------------------------------------
   TABLET + MOBILE (≤ 999px): drawer overrides
   These must live here, after the base rules above, because
   sidebar.css loads after layout.css — same-specificity rules
   in layout.css media queries would otherwise be overridden
   by sidebar.css base rules.
   ---------------------------------------------------------- */

@media (max-width: 999px) {
  .sidebar {
    height: auto; /* top + bottom constraints size the drawer; 100vh base is wrong here */
  }

  .sidebar__logo-wrap {
    display: none; /* drawer shows only nav + footer, no logo */
  }
}

.sidebar__logo {
  height: 56px;
  width: auto;
}

/* ----------------------------------------------------------
   BODY — nav + footer, packed to bottom
   ---------------------------------------------------------- */

.sidebar__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  gap: var(--inner-gap);
  overflow: hidden;
}

/* ----------------------------------------------------------
   FOOTER CREDITS
   ---------------------------------------------------------- */

.sidebar__footer {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-beausite);
  font-weight: 400;
  font-size: var(--text-credits);
  letter-spacing: -0.24px;
  color: var(--color-credits);
}

.sidebar__credits-main {
  line-height: 20px;
  white-space: nowrap;
}

.sidebar__footer p:not(.sidebar__credits-main) {
  line-height: 1.2;
}

/* ----------------------------------------------------------
   1000px – 1439px: prevent SVG logo from flex-shrinking
   The SVG canvas is 356px wide (matches 1440px sidebar exactly).
   At narrower sidebars the default flex-shrink scales it down.
   flex-shrink: 0 holds it at full size; overflow: hidden clips
   the transparent right portion so it stays within the sidebar.
   ---------------------------------------------------------- */

/* ----------------------------------------------------------
   MOBILE (≤ 440px): full-screen drawer — nav at top, footer at bottom
   ---------------------------------------------------------- */

@media (max-width: 440px) {
  .sidebar__body {
    justify-content: space-between;
    padding-top: 24px;
  }
}

@media (min-width: 1000px) and (max-width: 1439px) {
  .sidebar__logo-wrap {
    overflow: hidden;
  }

  .sidebar__logo {
    flex-shrink: 0;
  }
}

/* ----------------------------------------------------------
   1920px
   ---------------------------------------------------------- */

@media (min-width: 1920px) {
  .sidebar__logo-wrap {
    height: 89px;
  }

  .sidebar__logo {
    height: 89px;
  }

  .sidebar__footer {
    font-size: 16px;
    letter-spacing: -0.32px;
  }
}
