@layer components {
/* Receipt view composite. Rows match the Figma receipt detail pattern:
   left icon/label group, right amount, 16px gap between row areas. */

.psw-receipt-view {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    width: 100%;
    margin: 0;
    padding: 0;
}

.psw-receipt-view__row {
    display: flex;
    align-items: flex-start;
    align-self: stretch;
    justify-content: space-between;
    gap: var(--space-4);
    width: 100%;
    min-width: 0;
}

.psw-receipt-view__main {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.psw-receipt-view__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--color-gray-500);
}

.psw-receipt-view__icon .psw-icon {
    color: currentColor;
}

.psw-receipt-view__main,
.psw-receipt-view__value {
    margin: 0;
    color: var(--color-content-high);
    font-family: var(--font-sans);
    font-size: var(--text-paragraph-md);
    font-weight: var(--font-weight-regular);
    line-height: var(--text-paragraph-md--line-height);
    letter-spacing: 0;
}

.psw-receipt-view__value {
    flex: 1 0 auto;
    min-width: max-content;
    text-align: right;
    white-space: nowrap;
}

/* Discount (credit) amounts render in positive green (Figma). Placed after the
   shared value rule so it overrides the content-high color at equal specificity. */
.psw-receipt-view__value--credit {
    color: var(--color-content-positive);
}

.psw-receipt-view__label-content {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    max-width: 100%;
    min-width: 0;
}

.psw-receipt-view__label-text {
    min-width: 0;
}

.psw-receipt-view__label-text--nowrap {
    white-space: nowrap;
}

.psw-receipt-view__label-content .psw-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}
}
