@import "../../app/style";

.panel {
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border: none;
  position: absolute;
  height: 220px;
  width: 360px;
  background-image: $panelBackground;
  background-repeat: repeat;

  button {
    z-index: 3;
    cursor: pointer;
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--foreground);
    background-color: unset;
    transition: width 0.2s;

    &:hover {
      background-color: var(--foreground);
    }

    &:focus {
      outline: none;
    }
  }

  &--bottom {
    bottom: -220px;
    width: 100%;
    transition: bottom 0.5s;

    .panel-border {
      position: absolute;
      z-index: 3;
      top: -10px;
      min-width: 100%;
      background-image: $borderRight;
      background-repeat: repeat;
      height: 16px;
    }

    button {
      left: 50%;
      transform: translateX(-50%);
      top: -10px;
      width: 50px;
    }

    &--shown {
      bottom: 0;

      button {
        height: 25px;
        top: -25px;
      }
    }
  }

  &--left {
    left: -360px;
    flex-direction: column;
    height: 100%;
    transition: left 0.5s;

    .panel-border {
      position: absolute;
      z-index: 3;
      right: -8px;
      min-height: 100%;
      background-image: $borderTop;
      background-repeat: repeat;
      width: 16px;
    }

    button {
      top: 50%;
      transform: translateY(-50%);
      right: -10px;
      height: 50px;
    }

    &--shown {
      left: 0;

      button {
        width: 25px;
        right: -25px;
      }
    }
  }
}
