@import (reference) "./../styles/variables/zindex.less";
@import (reference) "./../styles/less/mixins/_logical-properties.less";

.sliding-panel {
  .translateX(-100%);

  transition: transform cubic-bezier(0, 0.94, 0.62, 1) 350ms;
  background: var(--color-background-elevated);
  z-index: @zindex-navbar-fixed;
  position: absolute;

  &.sliding-panel--fixed {
    position: fixed;
  }

  &.sliding-panel--open-right,
  &.sliding-panel--open-left {
    top: 0;
    bottom: 0;
  }

  &.sliding-panel--open-right {
    .translateX(100%);

    .right(0);
  }

  &.sliding-panel--open-left {
    .translateX(-100%);

    .left(0);
  }

  &.sliding-panel-enter-done {
    &.sliding-panel--open-right,
    &.sliding-panel--open-left {
      transform: translateX(0);
    }

    &.sliding-panel--open-top,
    &.sliding-panel--open-bottom {
      transform: translateY(0);
    }
  }

  &.sliding-panel--open-top,
  &.sliding-panel--open-bottom {
    .right(0);

    .left(0);

    width: 100%;
  }

  &.sliding-panel--open-top {
    transform: translateY(-100%);
    top: 0;
  }

  &.sliding-panel--open-bottom {
    transform: translateY(100%);
    bottom: 0;
  }

  &.sliding-panel--border-top {
    box-shadow: inset 0 -1px 0 0 rgb(226 230 232);
  }

  &.sliding-panel--border-right {
    box-shadow: inset 1px 0 0 0 rgb(226 230 232);
  }

  &.sliding-panel--border-bottom {
    box-shadow: inset 0 1px 0 0 rgb(226 230 232);
  }

  &.sliding-panel--border-left {
    box-shadow: inset -1px 0 0 0 rgb(226 230 232);
  }

  .np-theme-personal & {
    &.sliding-panel--border-top {
      box-shadow: inset 0 -1px 0 0 var(--color-border-neutral);
    }

    &.sliding-panel--border-right {
      box-shadow: inset 1px 0 0 0 var(--color-border-neutral);
    }

    &.sliding-panel--border-bottom {
      box-shadow: inset 0 1px 0 0 var(--color-border-neutral);
    }

    &.sliding-panel--border-left {
      box-shadow: inset -1px 0 0 0 var(--color-border-neutral);
    }
  }
}
