.panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 30;
  display: block;
  padding: 0 20px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #fff;
  box-sizing: border-box;

  .disabled {
    opacity: 0.2;
    pointer-events: none;
  }
  
  &:global(.slide-enter-active),
  &:global(.slide-leave-active) {
    transition: transform .2s ease;
  }

  &:global(.slide-enter),
  &:global(.slide-leave-to) {
    transform: translateY(-150px);
  }

  &:global(.size--compact) {
    .bottom {
      height: 58px;
    }

    .button {
      height: 28px;
      border-radius: 4px;
    }
  }
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  /* height: 58px; */
  border-bottom: 1px solid #dfdfdf;
  :global(.size--compact) & {
    display: none;
  }
}

.cross {
  font-size: 24px;
  transition: color 0.3s;
  color: rgba(29, 29, 27, 0.5);
  &:hover{
    /* color: #dfdfdf; */
    color: var(--primary-color);
  }
}

.bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  /* height: 58px; */
  transition: height 0.3s ease;
  /* :global(.size--compact) & {
    height: 58px;
  } */
}

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

.tool {
  margin-right: 20px;
}

.undoredo {
  display: flex;
  align-items: center;
  font-size: 30px;
  user-select: none;
}

.undo {
  margin-right: 9px;
}

.redo {

}

.actions {
  display: flex;
  align-items: center;
  & > div:not(:last-child) {
    margin-right: 10px;
  }
}

.button {
  display: flex;
  font-size: 14px;
  padding: 0 17px;
  height: 40px;
  display: flex;
  align-items: center;
  /* padding: 5px 13px; */
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0);
  transition: color 0.1s ease-in;
  position: relative;
  span {
    position: relative;
    z-index: 2;
  }

  &:before {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 1);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
  }
  &:hover,
  &:focus,
  &.active {
    &:before {
      opacity: 0.05;
    }
  }

  &.type--default {
    &.gradient {
      border-color:  var(--primary-color);
      background: var(--button-gradient);
      &:hover {
        color: #fff;
      }

    }
    /* border-color: #4543e8;
    color: #4543e8; */
    color:  var(--primary-color);
    border-color:  var(--primary-color);
    background: #fff;
    &:hover {
      color: #fff;
      background: var(--button-gradient);
      padding: 0 18px;
      border: unset;
    }
  }

  &.type--highlighted {
    color: #fff;
    background: var(--button-gradient);
    border: none;
  }

  &.type--grey {
    background: #efefef;
    color: #7c7c7c;
  }
  &.disabledBtn {
    pointer-events: none;
    opacity: 0.3;
  }
}


:global(.dir--rtl) {
  .undoredo {
    flex-direction: row-reverse;
  }
  .actions {
    & > div:not(:last-child) {
      margin-right: unset;
      margin-left: 15px;
    }
  }
}
