.pisell-sale-detail-summary {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;
  color: #eff6ff;
  background: #05070d;

  &__bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 10px 12px 8px;
  }

  &__top,
  &__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
  }

  &__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-width: 0;
    margin: 4px;
    padding: 2px 14px;
    overflow: hidden;
    border: 1px solid
      var(--pisell-sale-detail-summary-status-border, rgba(171, 239, 198, 0.46));
    border-radius: 999px;
    color: var(--pisell-sale-detail-summary-status-color, #abefc6);
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.02em;
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0)
      ),
      var(--pisell-sale-detail-summary-status-bg, rgba(171, 239, 198, 0.16));
    box-shadow:
      0 0 0 4px #05070d,
      0 0 0 5px
        var(--pisell-sale-detail-summary-status-outer-border, rgba(64, 90, 158, 0.48)),
      0 0 14px var(--pisell-sale-detail-summary-status-glow, rgba(171, 239, 198, 0.14));
  }

  &__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex: 1 1 auto;
    gap: 4px;
    min-width: 0;
    color: #a9c1ff;
    font-size: 14px;
    font-weight: 800;
    row-gap: 2px;

    > span {
      white-space: nowrap;
    }
  }

  &__item-count {
    color: #f5f8ff;
    font-weight: 900;
  }

  &__dot {
    flex: none;
    width: 3px;
    height: 3px;
    margin: 0 2px;
    border-radius: 999px;
    background: #7f90c5;
  }

  &__saved {
    flex: none;
    color: #12b76a;
    font-weight: 900;
  }

  &__payment-sc-note {
    flex: 0 1 auto;
    color: #a9c1ff;
  }

  &__detail-trigger {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0;
    border: 0;
    color: inherit;
    text-align: right;
    background: transparent;
    cursor: pointer;
  }

  &__detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 24px;
    border: 1px solid rgba(119, 132, 185, 0.62);
    border-radius: 9px;
    background: rgba(41, 47, 77, 0.42);
  }

  &__detail-chevron {
    width: 7px;
    height: 7px;
    border-top: 2px solid #a9b8ee;
    border-left: 2px solid #a9b8ee;
    transform: translateY(-2px) rotate(225deg);
  }

  &__detail-icon--open &__detail-chevron {
    transform: translateY(2px) rotate(45deg);
  }

  &__detail-text {
    color: #a9c1ff;
    font-size: 14px;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  &__balance {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
  }

  &__balance-label {
    color: #f5f8ff;
    font-size: 16px;
    font-weight: 400;
    white-space: nowrap;
  }

  &__amount {
    color: #eff6ff;
    font-size: 24px;
    font-weight: 900;
    white-space: nowrap;

    &--refund {
      color: #fda29b;
    }
  }

}

.pisell-sale-detail-summary__popover-overlay {
  padding: 0 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  max-width: calc(100vw - 32px);
}

.pisell-sale-detail-summary__popover-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 64px);
  overflow: hidden;
  background: #05070d;
}

.pisell-sale-detail-summary__popover-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 6px;
  border: 0;
  border-bottom: 1px solid rgba(169, 184, 238, 0.18);
  color: #ffffff;
  background: transparent;
  cursor: pointer;
}

.pisell-sale-detail-summary__popover-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pisell-sale-detail-summary__popover-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.pisell-sale-detail--phone {
  .pisell-sale-detail-summary {
    &__bar {
      gap: 8px;
      padding: 9px 10px 7px;
    }

    &__status {
      padding: 2px 12px;
      font-size: 12px;
    }

    &__meta {
      font-size: 12px;
    }

    &__detail-icon {
      width: 26px;
      height: 24px;
      border-width: 1px;
      border-radius: 9px;
    }

    &__detail-chevron {
      width: 8px;
      height: 8px;
      border-width: 2px;
    }

    &__detail-text {
      font-size: 14px;
      text-underline-offset: 3px;
    }

    &__balance-label {
      font-size: 16px;
    }

    &__amount {
      font-size: 24px;
    }
  }
}
