@import '../variable.less';

.bixi-notification {
  display: block;
  width: 376px;
  margin: -8px;
  color: @bixi-notification-text-color;

  p {
    margin-bottom: 0;
  }

  &-trigger-container {
    display: inline-block;
    cursor: pointer;
  }

  & > header {
    padding: 12px 12px 4px;
    font-weight: 500;
  }

  &-main {
    position: relative;
    width: 100%;
    height: 328px;
    overflow-y: auto;
  }

  &-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;

    &-title {
      margin-top: 6px;
    }

    &-desc {
      margin-top: 4px;
      color: @bixi-notification-description-color;
    }
  }

  > footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10.5px 12px;
    border-top: 1px solid @bixi-notification-border-color;

    > button {
      height: auto;
      padding: 0;
      line-height: 1;
    }

    button:last-child {
      color: @bixi-notification-text-color;
    }
  }
}

.bixi-notification-item {
  position: relative;
  width: 100%;

  &:hover {
    background-color: @bixi-notification-background-color;

    .bixi-notification-item-actions {
      display: block;
    }
  }

  &:hover &-desc {
    color: @bixi-notification-text-hover-color;
  }

  &:hover &-icon {
    display: inline-block;
  }

  &-header {
    display: flex;
    align-items: center;
    padding: 8px 12px 5px;

    .bixi-notification-item-avatar {
      display: inline-flex;
      flex: 0 0 18px;
      align-items: center;
      width: 18px;
      height: 20px;
      margin-right: 8px;
      text-align: center;

      svg {
        width: 100%;
        height: 100%;
      }
    }

    .bixi-notification-item-title {
      /* stylelint-disable-next-line value-no-vendor-prefix */
      display: -webkit-box;
      flex: 1 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
    }
  }

  &-content {
    /* stylelint-disable-next-line value-no-vendor-prefix */
    display: -webkit-box;
    padding: 0 12px 2px 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  &-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28.84px;
    padding: 0 12px 10px 38px;
    color: #919399;
    text-align: left;

    .bixi-notification-item-actions {
      display: none;
      cursor: pointer;
    }
  }

  &-line {
    position: absolute;
    bottom: 0;
    left: 12px;
    width: 349px;
    height: 1px;
    background-color: @bixi-notification-border-color;
  }
}
