@import 'src/styles/variables';

.notifications {
  position: fixed;
  top: 12px;
  right: 0;
  z-index: 4;
  display: inline-block;

  &_item {
    position: relative;

    display: block;
    width: 300px;
    padding: var(--space-xxl) var(--space-xxl) var(--space-xxl) 56px;
    margin: 0 12px 12px;

    box-sizing: border-box;
    box-shadow: 2px 2px 3px var(--color-grey);
    border: none;
    border-radius: var(--border-radius-s);
    background-color: var(--color-white);

    animation: notification_item 0.5s linear 3s forwards;

    &_icon {
      position: absolute;
      top: 16px;
      left: 12px;

      display: block;
      width: 32px;
      height: 32px;
    }

    &_error {
      background-color: var(--color-12);
    }

    &_warning {
      background-color: var(--color-32);
    }

    &_success {
      background-color: #35D081;
    }

    &_info {
      background-color: #F1F4FC;
    }

    &_title,
    &_description {
      font-size: var(--font-m);
      font-weight: 100;
      padding: 0;
      text-align: left;
      color: var(--color-white);
      animation: notification_title 0.5s linear 3s forwards;
    }

    &_title {
      margin: 0;
    }

    &_description {
      margin: 0 0 4px 0;
    }
  }
}

@keyframes notification_item {
  80% {
    overflow: hidden;
    padding: var(--space-xxl) var(--space-xxl) var(--space-xxl) 56px;
    opacity: 1;
  }
  to {
    padding: 0 var(--space-xxl) 0 64px;
    opacity: 0;
  }
}

@keyframes notification_title {
  80% {
    font-size: var(--font-m);
  }
  to {
    font-size: 2px;
  }
}
