/* P-05: existing Workshop palette and controls. */
.pending-payment-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    padding: 14px;
    border: 2px solid var(--brass-edge);
    border-radius: 14px;
    background: var(--wood-dark);
    box-shadow: var(--press);
}
.pending-payment-banner div { display: grid; gap: 5px; }
.pending-payment-banner strong { color: var(--cream); font-family: var(--display); font-size: 14px; }
.pending-payment-banner span { color: var(--hint); font-size: 12px; }
.pending-payment-banner .secondary-action { flex: 0 0 auto; width: auto; }

#profilePanel.history-open > section:not(#paymentHistory) { display: none !important; }
.purchase-history-link { margin-top: 18px; }
.purchase-history { margin-top: 0; }
.purchase-history .section-heading { margin: 20px 0 16px; }
.purchase-history-list { display: grid; gap: 12px; }
.purchase-history-card {
    padding: 12px;
    border: 2px solid var(--brass-edge);
    border-radius: 14px;
    background: var(--wood-dark);
    box-shadow: var(--press);
}
.purchase-history-card-head { display: flex; justify-content: space-between; gap: 10px; }
.purchase-history-card-head strong { color: var(--cream); font-family: var(--display); font-size: 14px; }
.purchase-history-card-head b { flex: 0 0 auto; color: var(--accent); font-size: 14px; }
.purchase-history-card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; margin-top: 8px; font-size: 12px; }
.purchase-history-card-meta time, .purchase-history-card-meta span { color: var(--hint); }
.purchase-history-card-meta [data-status="COMPLETED"] { color: var(--healthy); }
.purchase-history-card-meta [data-status="PENDING"],
.purchase-history-card-meta [data-status="CREATED"] { color: var(--warning); }
.purchase-history-card-meta [data-status="REJECTED"],
.purchase-history-card-meta [data-status="REFUNDED"] { color: var(--danger); }
.purchase-history-card .secondary-action { margin-top: 10px; }
#morePayments { margin-top: 16px; }

@media (max-width: 520px) {
    .pending-payment-banner { align-items: stretch; flex-direction: column; }
    .pending-payment-banner .secondary-action { width: 100%; }
}

#profilePanel.gifts-open > section:not(#giftHistory) { display: none !important; }
#giftHistory { display: grid; gap: 20px; }
#giftHistory[hidden] { display: none; }
#giftHistory > .section-heading, #giftHistory > p { margin: 0; }
#giftHistory > .muted { max-width: 60ch; font: 400 15px/1.6 var(--body); }
#giftHistory > .primary-action { justify-self: start; }
#giftHistory .purchase-history-card { display: grid; gap: 12px; padding: 18px; overflow-wrap: anywhere; }
#giftHistory .purchase-history-card p, #giftHistory .purchase-history-card small { margin: 0; line-height: 1.6; }
#selectedPlanDescription:empty { display: none; }

.purchase-history-card .purchase-details { white-space: pre-line; line-height: 1.6; margin-block: 12px; }
