@use '../icon/variables' as icon-variables;

.mdc-alert {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 16px;
  border-radius: 2px;
  transition: opacity 0.15s linear;

  .mdc-alert__icon {
    margin-right: 8px;
  }

  @each $key, $value in icon-variables.$types {
    &.mdc-alert--#{$key} {
      background-color: rgba($value, 0.12);
      border: 1px solid rgba($value, 0.5);
    }
  }

  &.mdc-alert--closed {
    opacity: 0;
  }
}

.mdc-alert__content {
  flex: 1;
}

.mdc-alert__close-button {
  font-size: 18px;
  color: rgba(0, 0, 0, 0.45);
  transition: color 0.3s;

  &:hover {
    color: rgba(0, 0, 0, 0.75);
  }
}
