.dds-alert {
  position: relative;
  margin-bottom: 5px;
  min-height: 32px;
  padding: 3px 0;
  border: 1px solid;
  border-radius: 0;
  color: $dds-color-carbon-darkest;

  &.dds-alert-global {
    display: flex !important;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    border: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 500;

    &.alert-info {
      @include global-alert-style($dds-color-white, $dds-color-primary-light);
    }

    &.alert-warning {
      @include global-alert-style($dds-color-carbon-darkest, $dds-color-warning);

      .btn-alert-action {
        color: $dds-color-carbon-darkest !important;
        border: 1px solid $dds-color-carbon-darkest !important;
      }
    }

    &.alert-major {
      @include global-alert-style($dds-color-white, $dds-color-orange);
    }

    &.alert-danger {
      @include global-alert-style($dds-color-white, $dds-color-danger);
    }

    .alert-content-wrapper {
      .alert-content {
        .btn-alert-action {
          background-color: transparent;
          color: $dds-color-white;
          border: 1px solid $dds-color-white;
          margin-left: 16px;
        }
      }
    }
  }

  &.dds-alert-inline, &.dds-alert-multi {
    &.alert-info {
      @include inline-alert-style($dds-color-brand-blue, $alert-info-bg);
    }

    &.alert-success {
      @include inline-alert-style($dds-color-success, $alert-success-bg);
    }

    &.alert-warning {
      @include inline-alert-style($dds-color-warning, $alert-warning-bg);
    }

    &.alert-major {
      @include inline-alert-style($dds-color-orange, $alert-major-bg);
    }

    &.alert-danger {
      @include inline-alert-style($dds-color-danger, $alert-danger-bg);
    }

    .alert-action-tertiary {
      font-weight: 400;
    }
  }

  &.dds-alert-multi {
    width: fit-content;

    .dds-alert {
      border: 0;

      .alert-icon {
        &.color-info {
          i {
            color: $dds-color-brand-blue;
          }
        }
        &.color-success {
          i {
            color: $dds-color-success;
          }
        }
        &.color-warning {
          i {
            color: $dds-color-warning;
          }
        }
        &.color-major {
          i {
            color: $dds-color-orange;
          }
        }
        &.color-danger {
          i {
            color: $dds-color-danger;
          }
        }
      }

      &.expanded-alert {
        margin-left: -15px;

        > span {
          &:first-child {
            color: $dds-color-carbon;
            position: relative;
            top: 4px;
            left: 4px;
          }
        }

        .cursor-pointer {
          cursor: pointer;
        }
      }
    }

    .alert-action-tertiary {
      font-weight: $dds-font-weight-medium;
    }

    .alert-close {
      position: absolute;
      right: 0;
      top: 8px;
    }

    .dds-alert-expanded-list {
      list-style-type: none;
      padding-left: 15px;
      margin: 5px 0;

      li {
        &::before {
          content: "–";
          position: absolute;
          margin-left: -15px;
        }
      }
    }
  }

  &.dds-alert-validation {
    display: flex;
    justify-content: center;
    height: 40px;
    align-items: center;

    &.alert-info {
      @include global-alert-style($dds-color-brand-blue, $alert-info-bg);
    }

    &.alert-success {
      @include global-alert-style($dds-color-success, $alert-success-bg);
    }

    &.alert-warning {
      @include global-alert-style($dds-color-warning, $alert-warning-bg);
    }

    &.alert-major {
      @include global-alert-style($dds-color-orange, $alert-major-bg);
    }

    &.alert-danger {
      @include global-alert-style($dds-color-danger, $alert-danger-bg);
    }

    .alert-content {
      color: $dds-color-carbon-darkest;
    }
  }

  &.alert-with-title {
    padding: 15px 0;
    .alert-icon, .alert-close {
      width: 44px;
    }

    .alert-content {
      margin-top: 7px;
    }
  }

  .alert-icon, .alert-close {
    position: relative;
    top: 4px;
    flex-shrink: 0;
    text-align: center;
    width: 35px;
    color: $dds-color-carbon;
    font-size: 10px;
  }

  .alert-close {
    i {
      cursor: pointer;
    }
  }

  .alert-content-wrapper {
    font-size: 14px;
    line-height: 20px;
    padding: 2px 0;
    margin-right: 40px;

    .alert-title {
      font-size: 16px;
      line-height: 24px;
    }
  }

}
