/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

:root {
  --doc-sidebar-width: 300px;
}

@media (min-width: 997px) {
  .docPage {
    display: flex;
  }

  .docSidebarContainer {
    width: var(--doc-sidebar-width);
    margin-top: calc(-1 * var(--ifm-navbar-height));
    border-right: 1px solid var(--ifm-toc-border-color);
    will-change: width;
    transition: width var(--ifm-transition-fast) ease;
    clip-path: inset(0);
  }

  .docSidebarContainerHidden {
    width: 30px;
    cursor: e-resize;
  }

  .collapsedDocSidebar {
    position: sticky;
    top: 0;
    height: 100%;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--ifm-transition-fast) ease;
  }

  .collapsedDocSidebar:hover,
  .collapsedDocSidebar:focus {
    background-color: var(--ifm-color-emphasis-200);
  }

  html[data-theme='dark'] .collapsedDocSidebar:hover,
  html[data-theme='dark'] .collapsedDocSidebar:focus {
    background-color: var(--collapse-button-bg-color-dark);
  }

  .docMainContainer {
    flex-grow: 1;
  }

  .docItemWrapperEnhanced {
    max-width: calc(var(--ifm-container-width) + var(--doc-sidebar-width));
  }
}

@media (max-width: 996px) {
  .docPage {
    display: inherit;
  }

  .docSidebarContainer {
    margin-top: 0;
  }
}

@media (min-width: 997px) and (max-width: 1320px) {
  .docItemWrapper {
    max-width: calc(
            var(--ifm-container-width) - var(--doc-sidebar-width) -
            var(--ifm-spacing-horizontal) * 2
    );
  }

  .docItemWrapperEnhanced {
    max-width: calc(
            var(--ifm-container-width) - var(--ifm-spacing-horizontal) * 2
    );
  }
}

@media (min-width: 1739px) {
  .docMainContainer {
    margin-left: calc(
            var(--doc-sidebar-width) * -1
    ); /* To take full width without using a absolute view*/
  }

  .docItemWrapper {
    max-width: var(--ifm-container-width);
  }
}

:global(.table-of-contents) {
  border-left-width: 3px;
}

:global(.table-of-contents li) {
  position: relative;
}

:global(.table-of-contents__link--active::before) {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -19px;
  width: 3px;
  content: " ";
  background: var(--ifm-color-primary-lightest);
}

:global(.table-of-contents__link--active) {
  color: var(--ifm-color-primary-lightest);
  font-weight: bold;
}

ul ul :global(.table-of-contents__link--active::before) {
  left: -35px;
}
