@import '../../scss/variables';

.drawer-toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px!important;
  color: $light;
  text-align: center;
  border-radius: $radius;
  padding: 16px!important;
  position: fixed;
  z-index: 1;
  right: 50%;
  transform: translateX(50%);
  top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;

  svg {
    width: 18px;
    height: 18px;
  }

  &.show {
    visibility: visible;
    animation: fadein 0.5s;
  }

  &.neutral {
    background-color: rgba(51, 51, 51, 0.7);
  }

  &.error, &.danger {
    background-color: rgba(182, 57, 35, 0.7 );
    color: #000;
  }

  &.warning {
    background-color: rgba(182, 145, 42, 0.7);
    color: #000;
  }

  &.info {
    background-color: rgba(71, 130, 207, 0.7);
    color: #000;
  }

  &.hide {
    animation: fadeout 0.5s;
  }
}

@keyframes fadein {
  from {
    top: 0;
    opacity: 0;
  }
  to {
    top: 30px;
    opacity: 1;
  }
}

@keyframes fadeout {
  from {
    top: 30px;
    opacity: 1;
  }
  to {
    top: 0;
    opacity: 0;
    visibility: hidden;
  }
}
