.pwv-NavigationPanel {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  .pwv-WebViewer--md & {
    width: 0;
    padding-left: 2px;
  }
  .pwv-WebViewer--lg & {
    width: 0;
    padding-left: 2px;
  }
  .pwv-WebViewer--sm & {
    display: none;
    border-top: solid 1px $viewer__BackgroundColor;
  }

  transition: width 0.5s;
  &--open {
    transition: width 0.5s;
    .pwv-WebViewer--md & {
      width: 260px;
    }
    .pwv-WebViewer--lg & {
      width: 320px;
    }
    .pwv-WebViewer--sm & {
      display: flex;
      height: 280px;
      min-height: 50%;
      max-height: 50vh;
      .pwv-Toolbar {
        min-height: auto;
      }
    }
  }
  &__Box {
    flex: 1;
    display: flex;
    flex-direction: column;

    .pwv-WebViewer--md & {
      width: 260px;
    }
    .pwv-WebViewer--lg & {
      width: 320px;
    }
  }
  &__Content {
    margin-top: 2px;
    background-color: $toolbarItem__BackgroundColor;
    display: flex;
    position: relative;
    flex: 1;
    overflow: auto;

    .pwv-WebViewer--md & {
      width: 260px;
    }
    .pwv-WebViewer--lg & {
      width: 320px;
    }
    > div {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
    .pwv-WebViewer--sm & {
      margin-top: 0;
    }
  }

  &__NoItems {
    text-align: center;
    margin-top: 2rem;
    font-size: 1rem;
    color: var(--pwv-text-muted-color);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

.pwv-ItemLoader {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: auto;
  &:before {
    content: ' ';
    width: 18px;
    height: 18px;
    border: 2px solid $loader-color-1;
    border-top-color: $loader-color-2;
    border-radius: 50%;
    animation: rotate 0.9s infinite linear;
  }
}
@keyframes pageRotationFadeInDelay {
  0%,
  75% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.pwv-thumbnail-navigation {
  ul {
    list-style: none;
    margin: 18px 0 30px 0;
    padding: 0;
  }
  li {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 260px;
    position: relative;
    .pwv-page-nr {
      color: var(--pwv-text-color);
      font-weight: 400;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 0.75rem;
    }
    .pwv-page-placeholder {
      height: 200px;
      width: 145px;
      background-color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .pwv-page-placeholder,
    img {
      max-width: 200px;
      max-height: 200px;
      box-sizing: content-box;
      box-shadow: var(--pwv-drop-shadow-1);
      transition: box-shadow 0.25s;

      .pwv-WebViewer--sm &,
      .pwv-WebViewer--md & {
        max-width: 180px;
        max-height: 180px;
      }

      cursor: pointer;
      &:hover {
        transition: box-shadow 0.25s;
        box-shadow: var(--pwv-drop-shadow-2);
      }
    }
    &.pwv-selected {
      .pwv-page-placeholder,
      img {
        border: 2px solid $toolbarItem__SelectedTextColor;
      }
    }
    .pwv-page-rotation {
      position: absolute;
      bottom: 2rem;
      opacity: 0;
      transition: opacity 0.25s;
      background-color: $toolbarItem__BackgroundColor;
      box-shadow: var(--pwv-drop-shadow-2);

      // border: 2px solid $toolbar__TextColor;
      button {
        background-color: transparent;
        border: none;
        outline: none;
        color: $toolbarItem__TextColor;
        height: 40px;
        min-height: 40px;
        &:hover {
          color: $toolbarItem__HoverTextColor;
        }
        svg {
          height: $toolbarItem__IconSize;
        }
      }
    }
    &:hover .pwv-page-rotation {
      animation: pageRotationFadeInDelay 0.5s ease-in;
      opacity: 1;
    }
  }
  &-img-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 200px;
  }
}

.pwv-outline-navigation {
  font-size: 1rem;
  font-weight: 400;

  padding: 1rem;
  .pwv-WebViewer--sm &,
  .pwv-WebViewer--md & {
    font-size: 0.9rem;
  }
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
    ul {
      padding-left: 14px;
    }
  }
  li {
    margin: 0;
    padding: 0;
    > div {
      display: flex;
      padding: 8px 2px;
    }
  }
}

.pwv-outline-tree-indent,
.pwv-outline-tree-btn-expand,
.pwv-outline-tree-btn-collapse {
  display: block;
  flex-shrink: 0;
  text-align: center;
  height: 16px;
  width: 18px;
  box-sizing: border-box;
  padding: 0;
  margin: 0 2px 0 0;
  border: none;
}
.pwv-outline-tree-btn-expand,
.pwv-outline-tree-btn-collapse {
  cursor: pointer;
  .pwv-icon {
    height: 12px;
    svg {
      height: 12px;
    }
  }
}
.pwv-outline-tree-btn-collapse {
  .pwv-icon {
    svg {
      fill: $toolbarItem__SelectedTextColor;
    }
  }
}
.pwv-outline-tree-lnk {
  display: block;
  cursor: pointer;
  transition: 0.15s;
  &:hover {
    transition: 0.15s;
    color: $toolbarItem__SelectedTextColor;
  }
}

.pwv-annotation-navigation {
  padding: 1rem;
  margin: 0;
  ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
  }
  h4 {
    margin: 12px 0 8px 4px;
  }
}

.pwv-annotation-navigation-item {
  position: relative;
  margin: 10px 0;
  padding: 6px 0 6px 0;
  background-color: #ffffff;
  border: solid 2px transparent;
  transition: box-shadow 0.3s;
  cursor: pointer;
  box-shadow: var(--pwv-drop-shadow-1);
  &.pwv-selected {
    border: solid 2px $toolbarItem__SelectedTextColor;
  }
  &.pwv-deleted {
    opacity: 0.5;
  }
  &:hover {
    transition: box-shadow 0.3s;
    box-shadow: var(--pwv-drop-shadow-2);
  }
  > div {
    margin: 8px 10px;
  }
  > div:first-child {
    display: flex;
    align-items: center;
    .pwv-icon {
      height: 18px;
      width: 24px;
      margin-right: 4px;
      svg {
        height: 18px;
      }
    }
  }

  time {
    font-style: italic;
    font-size: 0.9rem;
    display: inline-block;
  }
  .pwv-author {
    font-style: italic;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    margin-right: 4px;
    &:after {
      content: ',';
    }
  }
  p,
  h5 {
    padding: 0;
    margin: 0 0 4px 0;
    font-size: 16px;
  }
  .pwv-icon {
    height: 18px;
    svg {
      height: 18px;
    }
    &.pwv-locked-icon {
      position: absolute;
      bottom: 4px;
      right: 4px;
      svg {
        fill: $toolbar__TextMutedColor;
      }
    }
  }
  .pwv-ms-custom-history-list {
    border-top: solid 1px $toolbar__TextColor;
    ul {
      list-style: none;
      margin: 0;
      padding: 0;
    }
    li {
      margin: 12px 0;
      > div:first-child {
        display: flex;
        color: $toolbar__TextMutedColor;
      }
      .pwv-icon {
        height: 13px;
        width: 17px;
        margin-right: 6px;
        svg {
          width: 17px;
          height: 13px;
        }
      }
    }
  }
  .pwv-ms-custom-history-content {
    margin-left: 23px;
  }
}

.pwv-overflow-ellipsis {
  padding-bottom: 5px;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
