.pisell-sale-detail-booking-group-view {
  width: 100%;

  &__empty {
    padding: 12px 0;
    color: var(--pisell-line-item-text-muted, #98a2b3);
    font-size: 13px;
  }
}

.pisell-sale-detail-booking-group {
  width: 100%;

  & + & {
    margin-top: 16px;
  }

  &__shell {
    border: 1px solid rgba(127, 86, 217, 0.45);
    border-radius: 12px;
    overflow: hidden;
    background: var(--pisell-line-item-bg, #101828);
  }

  &__header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #6941c6 0%, #7f56d9 100%);
    color: #ffffff;
  }

  &__title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__badge {
    flex-shrink: 0;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
  }

  &__stats-wrap {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(16, 24, 40, 0.92);
  }

  &__body-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: rgba(16, 24, 40, 0.72);

    .pisell-group-view__body-stack {
      gap: 10px;
    }
  }

  &__item {
    width: 100%;
  }

  &__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(16, 24, 40, 0.96);
    color: var(--pisell-line-item-text-primary, #f9fafb);
    font-size: 13px;
    font-weight: 700;
  }

  &__footer-value {
    font-size: 14px;
    font-weight: 800;
  }
}

.pisell-sale-detail-compact-booking-card {
  width: 100%;
  border: 1px solid rgba(127, 86, 217, 0.45);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(16, 24, 40, 0.86);
  color: var(--pisell-line-item-text-primary, #f9fafb);

  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(127, 86, 217, 0.32);
    background: rgba(105, 65, 198, 0.22);
  }

  &__headline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  &__booking-id {
    font-size: 14px;
    font-weight: 800;
    color: #f9fafb;
  }

  &__time {
    min-width: 0;
    overflow: hidden;
    color: var(--pisell-line-item-text-secondary, #d0d5dd);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 2px 10px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;

    &:disabled {
      cursor: default;
      opacity: 0.9;
    }
  }

  &__body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px 4px;
  }

  &__info {
    flex: 1;
    min-width: 0;
  }

  &__booking-for {
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
  }

  &__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: var(--pisell-line-item-text-secondary, #d0d5dd);
    font-size: 12px;
  }

  &__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;

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

  &__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  &__action {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    background: rgba(16, 24, 40, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  &__action--primary {
    border-color: transparent;
    background: #7f56d9;
  }

  &__products {
    padding: 4px 10px 8px;
  }

  &__product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 22px;
    color: var(--pisell-line-item-text-secondary, #d0d5dd);
    font-size: 12px;
  }

  &__product-row--main {
    color: var(--pisell-line-item-text-primary, #f9fafb);
    font-weight: 600;
  }

  &__product-row--detail {
    padding-left: 12px;
  }

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

  &__product-row--detail &__product-name {
    &::before {
      content: '— ';
    }
  }

  &__product-amount {
    flex-shrink: 0;
    color: var(--pisell-line-item-text-secondary, #d0d5dd);
    font-weight: 700;
  }

  &__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
    padding: 8px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
  }
}

.pisell-sale-detail-booking-group-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;

  &__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--pisell-line-item-text-secondary, #d0d5dd);
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }

  &__item--all {
    color: var(--pisell-line-item-text-primary, #f9fafb);
    font-weight: 700;
  }

  &__label {
    opacity: 0.88;
  }

  &__count {
    min-width: 14px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--pisell-line-item-text-primary, #f9fafb);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
  }

  &__item:not(&__item--all) &__count {
    background: color-mix(
      in srgb,
      var(--pisell-booking-group-stats-accent, #98a2b3) 24%,
      transparent
    );
  }
}
