@import "../../styles/color.module";
@import "../../styles/font.module";

.alert {
  max-width: 356px;
  width: 100%;
  padding: 20px 60px;
  border-radius: 8px;
  font-weight: 400;
  font-size: 14px;
  line-height: 16px;
  z-index: 15;
  border-left: solid 8px $grey100;
  background: $white;
  overflow: hidden;
  text-overflow: ellipsis;
  color: $lynch;
  box-sizing: border-box;
  position: relative;
  margin-bottom: 15px;
  font-family: $fontPrimary;

  &[data-full-width="true"] {
    max-width: 100%;
  }

  // Align

  &.left {
    margin-right: auto;
  }

  &.center {
    margin-left: auto;
    margin-right: auto;
  }

  &.right {
    margin-left: auto;
  }

  // Theme

  &.success {
    border-color: $success;

    .icon {
      svg {
        color: $success;
      }
    }
  }

  &.info {
    border-color: $dodgerBlue;

    .icon {
      svg {
        color: $dodgerBlue;
      }
    }
  }

  &.warning {
    border-color: $alert;

    .icon {
      svg {
        color: $alert;
      }
    }
  }

  &.error {
    border-color: $errorSecondary;

    .icon {
      svg {
        color: $errorSecondary;
      }
    }
  }

  // Icon

  .icon {
    width: 15px;
    height: 15px;
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    margin: auto;

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


  // Close button

  .close {
    background: transparent;
    border: 0;
    padding: 5px;
    position: absolute;
    right: 20px;
    top: 0;
    bottom: 0;
    outline: 0;
    box-sizing: border-box;
    cursor: pointer;
    line-height: 0;
    width: 32px;
    height: 32px;
    margin: auto;

    svg {
      color: $ultraMarine;
      height: 20px;
      width: 20px;
    }
  }
}