$prefix: "adui-channels-message";

.#{$prefix} {
  &-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-index-message);
    width: 100vw;
    opacity: 0;
    transform: translate3d(
      var(--message-offset-x),
      calc(-56px + var(--message-offset-y)),
      0
    );
    transition: all var(--motion-duration-base) var(--ease-in-out);
  }
  &-base {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 16px;
    padding-right: 12px;
    min-width: 230px;
    height: 40px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.13);
    transition: all var(--motion-duration-base) var(--ease-in-out);
  }
  &-hasActions {
    padding-right: 4px;
  }
  &-icon {
    flex: none;
    margin-right: 8px;
  }
  &-content {
    font-size: 14px;
    line-height: 20px;
    color: rgba(0, 0, 0, 0.9);
  }
  &-actions {
    flex: none;
    display: flex;
    align-items: center;
    margin-left: 12px;
  }
  &-action {
    &:not(:last-child) {
      position: relative;
      margin-right: 9px;

      &::after {
        content: "";
        position: absolute;
        top: 50%;
        right: -5px;
        margin-top: -8px;
        width: 1px;
        height: 16px;
        background-color: #6b6b6b;
        opacity: 0.2;
      }
    }
  }
  &-primary,
  &-success,
  &-warning,
  &-danger {
    .#{$prefix}-icon {
      fill: #fff;
    }

    .#{$prefix}-actions {
      button {
        color: rgba(255, 255, 255, 0.5) !important;

        svg {
          fill: #fff !important;
          opacity: 0.5;
          transition: all var(--motion-duration-base) var(--ease-in-out);
        }

        &::after {
          background-color: #fff !important;
        }

        &:hover {
          color: #fff !important;

          svg {
            opacity: 1;
          }
        }
      }
    }

    .#{$prefix}-action {
      &::after {
        background-color: #fff;
      }
    }
  }
}
