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

.@{sale-detail-prefix}-sale-overview {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  margin: 0;
  padding: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f 0%, #172554 52%, #1e293b 100%);

  &__main {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
  }

  &__meta {
    display: flex;
    justify-content: space-between;
    padding-right: 6px;
    color: rgba(255, 255, 255, 0.70);
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 18px;
  }

  &__order-number {
    color: #fff;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 32px;
  }

  &__shop-order-number {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
  }

  &__order-number-separator {
    font-size: 14px;
    margin-left: 6px;
    margin-right: 4px;
  }

  &__status {
    position: absolute;
    top: 12px;
    right: 10px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  &__status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 12px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 18px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  }

  &__status-badge--payment {
    border-color: var(--pisell-sale-detail-overview-payment-color, #d0d5dd);
    color: #101828;
    background: var(--pisell-sale-detail-overview-payment-color, #d0d5dd);
  }

  &__status-badge--order {
    border-color: var(--pisell-sale-detail-overview-order-border-color, #1570ef);
    color: var(--pisell-sale-detail-overview-order-text-color, #175cd3);
    background: rgba(255, 255, 255, 0.04);
  }

  &__skeleton {
    display: inline-block;
    overflow: hidden;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.32) 50%,
      rgba(255, 255, 255, 0.16) 100%
    );
    background-size: 200% 100%;
    border-radius: 999px;
    animation: pisell-sale-detail-sale-overview-skeleton 1.4s ease-in-out infinite;
  }

  &__skeleton--title {
    width: min(360px, 58%);
    height: 32px;
  }

  &__skeleton--meta {
    width: 180px;
    height: 18px;
  }

  &__skeleton--meta-secondary {
    width: 160px;
  }

  &__skeleton--badge {
    width: 86px;
    height: 28px;
  }
}

@keyframes pisell-sale-detail-sale-overview-skeleton {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.@{sale-detail-prefix}--phone {
  .@{sale-detail-prefix}-sale-overview {
    padding-bottom: 6px;

    &__main {
      gap: 10px;
    }

    &__order-number {
      font-size: 24px;
    }

    &__shop-order-number {
      font-size: 14px;
      line-height: 28px;
    }

    &__order-number-separator {
      font-size: 14px;
      line-height: 28px;
    }

    &__meta {
      flex-direction: column;
      gap: 4px;
      padding-right: 0;
      font-size: 12px;
      line-height: 18px;
    }

    &__status {
      top: 12px;
      right: 16px;
      gap: 6px;
    }

    &__status-badge {
      padding: 3px 8px;
      font-size: 12px;
      line-height: 18px;
    }

    &__skeleton--title {
      width: min(260px, 62%);
    }

    &__skeleton--meta {
      width: 150px;
    }

    &__skeleton--meta-secondary {
      width: 120px;
    }

    &__skeleton--badge {
      width: 72px;
    }
  }
}
