@sale-detail-prefix: pisell-sale-detail;

.@{sale-detail-prefix}-summary-financial {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;

  &__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 6px;
    border: 1px solid rgba(119, 133, 160, 0.32);
    border-radius: 10px;
    color: #eef4ff;
    background: #080d18;
    box-shadow: 0 8px 18px rgba(2, 8, 23, 0.24);

    &--payment {
      border-color: rgba(127, 86, 217, 0.58);
      box-shadow: inset 0 2px 0 rgba(127, 86, 217, 0.45);
    }

    &--promotion {
      border-color: rgba(23, 178, 106, 0.58);
      box-shadow: inset 0 2px 0 rgba(23, 178, 106, 0.55);
    }
  }

  &__card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #f5f7ff;
    font-size: 16px;
    font-weight: 800;

    .iconfont {
      flex: none;
      color: #9db4d4;
      font-size: 16px;
    }

    > span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  &__rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }

  &__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    color: #d8e6ff;
    font-size: 14px;
    font-weight: 800;

    &--deduction {
      .@{sale-detail-prefix}-summary-financial__row-value {
        color: #ff8da1;
      }
    }

    &--highlight {
      padding-top: 6px;
      border-top: 1px solid rgba(119, 133, 160, 0.18);
      color: #b8a3ff;
      font-size: 14px;

      .@{sale-detail-prefix}-summary-financial__row-value {
        color: #b8a3ff;
      }
    }
  }

  &__row-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__row-value {
    flex: none;
    color: #f5f7ff;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
  }

  &__adjustment-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
  }

  &__adjustment {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 6px 0;

    & + & {
      border-top: 1px dashed rgba(119, 133, 160, 0.26);
    }
  }

  &__adjustment-main,
  &__adjustment-meta,
  &__adjustment-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }

  &__adjustment-title {
    min-width: 0;
    overflow: hidden;
    color: #f5f7ff;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__adjustment-amount {
    flex: none;
    color: #f5f7ff;
    font-size: 14px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;

    &--addition {
      color: #86efac;
    }
  }

  &__adjustment-meta {
    color: #a8c7ff;
    font-size: 14px;
    font-weight: 700;
  }

  &__adjustment-subtitle {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__adjustment-balance {
    flex: none;
    color: #cdd7ff;

    > span:last-child {
      color: #f5f7ff;
      font-weight: 900;
    }
  }

  &__payment-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }

  &__payment {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;

    &--refund {
      .@{sale-detail-prefix}-summary-financial__payment-amount {
        color: #ff8da1;
      }
    }
  }

  &__payment-date {
    min-width: 0;
    overflow: hidden;
    color: #a8c7ff;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__payment-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }

  &__payment-sub-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding-left: 16px;
  }

  &__payment-title,
  &__payment-sub-title {
    min-width: 0;
    overflow: hidden;
    color: #f5f7ff;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__payment-amount,
  &__payment-sub-amount {
    flex: none;
    color: #f5f7ff;
    font-size: 14px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
  }
}
