html,
body {
  box-sizing: border-box;
  height: 100%;
  width: 100%;
}

body {
  --sidebarWidth: 300px;
  --sidebarMinWidth: 300px;
  --sidebarTransitionDuration: 0.3s;
  background-color: var(--background);
  color: var(--textBody);
  font-size: 16px;
  font-family: var(--sansFontFamily);
  line-height: 1.6875em;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

.body-wrapper {
  display: flex;
  height: 100%;
}

.sidebar {
  display: flex;
  flex-direction: column;
  width: var(--sidebarWidth);
  min-width: var(--sidebarMinWidth);
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  resize: horizontal;
}

.sidebar-button {
  padding: 26px 12px 18px 19px;
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  will-change: transform;
}

.sidebar-toggle--animated.sidebar-button {
  transition: transform var(--sidebarTransitionDuration) ease-in-out;
}

.content {
  width: calc(100% - var(--sidebarWidth));
  left: var(--sidebarWidth);
  height: 100%;
  position: absolute;
}

.content .content-inner {
  max-width: var(--content-width);
  min-height: 100%;
  margin: 0 auto;
  padding: 0 var(--content-gutter) 10px;
}

.content-inner:focus {
  outline: none;
}

body:is(.sidebar-opening, .sidebar-opened) .sidebar-button {
  transform: translateX(calc(var(--sidebarWidth) - 100%));
}

body.sidebar-opening-start .sidebar {
  left: calc(-1 * var(--sidebarWidth));
}

body.sidebar-opening-start .content {
  width: 100%;
  left: 0;
}

body.sidebar-opening .sidebar {
  left: 0;
  transition: left var(--sidebarTransitionDuration) ease-in-out;
}

body.sidebar-opening .content {
  width: calc(100% - var(--sidebarWidth));
  left: var(--sidebarWidth);
  transition: all var(--sidebarTransitionDuration) ease-in-out;
}

body.sidebar-closing .sidebar-button {
  transform: translateX(0);
}

body.sidebar-closing .sidebar {
  left: calc(-1 * var(--sidebarWidth));
  transition: left var(--sidebarTransitionDuration) ease-in-out;
}

body.sidebar-closing .content {
  width: 100%;
  left: 0;
  transition: all var(--sidebarTransitionDuration) ease-in-out;
}

body.sidebar-closed .sidebar {
  left: calc(-1 * var(--sidebarWidth));
  display: none;
}

body.sidebar-closed .content {
  width: 100%;
  left: 0;
}

@media screen and (max-width: 768px) {
  .content,
  body.sidebar-opening .content {
    left: 0;
    width: 100%;
  }

  body.sidebar-closed .sidebar-button {
    position: absolute;
  }
}
