$animationTime: 0.4s;

@mixin slideOutVertical($name, $width) {
  animation: slideOutV_#{$name} $animationTime ease-out;
  @keyframes slideOutV_#{$name} {
    0% {right: calc(-1 * #{$width})}
    100% {right: 0}
  }
}
@mixin slideInVertical($name, $width) {
  animation: slideInV_#{$name} $animationTime;
  @keyframes slideInV_#{$name} {
    0% {right: 0}
    100% {right: calc(-1 * #{$width})}
  }
}

@mixin slideOutHorizontal($name, $height) {
  animation: slideOutH_#{$name} $animationTime ease-out;
  @keyframes slideOutH_#{$name} {
    0% {
      bottom: -10%;
      opacity: 0;
    }
    100% {
      bottom: 0;
      opacity: 1;
    }
  }
}
@mixin slideInHorizontal($name, $height) {
  animation: slideInH_#{$name} $animationTime/2 ease-in;
  @keyframes slideInH_#{$name} {
    0% {
      bottom: 0;
      opacity: 1;
    }
    100% {
      bottom: -10%;
      opacity: 0;
    }
  }
}

.container {
  background: #fff;
  position: absolute;
  overflow: hidden;

  .header {
    height: 50px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;

    .leftItems {
      display: flex;
    }

    .cardTitle {
      display: flex;
      align-items: center;
      font-weight: bold;
      text-transform: uppercase;
      font-family: 'PT Sans', serif;
      font-size: 18px;
    }

    .extraItemsContainer {
      display: flex;
      align-items: center;
    }

    .leftExtraItemsContainer {
      :not(:empty) {
        margin-right: 5px;
      }
    }

  }

  .content {
    height: 100%;
    overflow: hidden;

    &.withTitle {
      height: calc(100% - 50px);
    }
  }

}

.lightTheme {
  background: #fff;
}

.darkTheme {
  background-color: #3b3b3b;
  color: #ababab;
}

.positionRight {
  bottom: 0;
  top: 55px;
  right: 0;

  &.sizeM {
    width: 400px;
    &.animationShow {
      @include slideOutVertical('m', 400px)
    }

    &.animationHide {
      @include slideInVertical('m', 400px)
    }
  }
  &.sizeL {
    width: 900px;
    &.animationShow {
      @include slideOutVertical('l', 900px)
    }

    &.animationHide {
      @include slideInVertical('l', 900px)
    }
  }
  &.sizeXl {
    width: calc(100vw - 200px);
    &.animationShow {
      @include slideOutVertical('xl', calc(100vw - 200px));
    }

    &.animationHide {
      @include slideInVertical('xl', calc(100vw - 200px));
    }
  }

  box-shadow: -2px 0px 15px 0px rgba(0,0,0,0.4);

  &.lightTheme {
    border-left: 1px solid silver;
  }

  &.darkTheme {
    border-left: 1px solid rgba(100,100,100,0.6);
  }
}

.positionBottom {
  bottom: 0;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  box-shadow: 0px 4px 14px 1px rgba(0, 0, 0, 0.5);

  &:not(.hasParent) {
    @media (max-width: 1100px) {
      left: 20px;
      right: 20px;
    }

    @media (min-width: 1101px) and (max-width: 1200px) {
      left: 60px;
      right: 60px;
    }

    @media (min-width: 1201px) and (max-width: 1600px) {
      left: 10%;
      right: 10%;
    }

    @media (min-width: 1601px) {
      width: 1400px;
      left: 50%;
      margin-left: -700px;
    }
  }

  &.sizeM {
    height: 600px;
    &.animationShow {
      @include slideOutHorizontal('m', 400px)
    }

    &.animationHide {
      @include slideInHorizontal('m', 400px)
    }
  }
  &.sizeL {
    height: 900px;
    max-height: calc(100vh - 220px);
    &.animationShow {
      @include slideOutHorizontal('l', 700px)
    }

    &.animationHide {
      @include slideInHorizontal('l', 700px)
    }
  }
  &.sizeXl {
    height: calc(100vh - 102px);
    &.animationShow {
      @include slideOutHorizontal('xl', calc(100vh - 110px))
    }

    &.animationHide {
      @include slideInHorizontal('xl', calc(100vh - 110px))
    }
  }

  &.noBackdrop {
    &.lightTheme {
      border: 1px solid silver;
    }

    &.darkTheme {
      border: 1px solid rgba(100,100,100,0.6);
    }
  }
}
