/* ---- Rewards ------------------------------------------------------------ */

/*
 * The shop and the wallet. Reasoning is in Convoro's
 * docs/design/2026-08-20-points-you-can-spend.md.
 *
 * 🚨 Ships WITH the extension and is served through its own controller —
 * extensions/ sits above the document root, so a stylesheet written into
 * core's convoro.css would leave core carrying CSS for something it does not
 * have, and a site installing this would get unstyled pages.
 *
 * The avatar decorations themselves are core's: the attribute is a plain user
 * field and the avatar partial draws it whether this extension is here or not.
 */
.reward-lede { color: var(--c-text-muted); margin-bottom: 1rem; }
.reward-heading { font-size: 1rem; font-weight: 650; margin: 1.75rem 0 0.6rem; }

.reward-note {
    padding: 0.75rem 1rem;
    border: 1px solid var(--c-success-line);
    border-left: 3px solid var(--c-success);
    border-radius: var(--radius);
    background: var(--c-success-soft);
    color: var(--c-success-text);
    margin-bottom: 1rem;
}

.reward-note.is-problem {
    border-color: var(--c-danger-line);
    border-left-color: var(--c-danger);
    background: var(--c-danger-soft);
    color: var(--c-danger-text);
}

/* ---- the balance, in the header ---- */

.reward-balance {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    background: var(--c-surface);
    text-decoration: none;
    color: inherit;
}

.reward-balance:hover { border-color: var(--c-border-strong); text-decoration: none; }
.reward-balance-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.reward-balance-w { font-size: 0.8rem; color: var(--c-text-muted); }

/* ---- the shelf ---- */

.reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.9rem;
}

.reward-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    min-width: 0;
}

/* Sold out reads as a state of the shelf, not as something broken. */
.reward-card.is-gone { background: var(--c-inset); color: var(--c-text-muted); }

.reward-card-name { font-size: 1.05rem; font-weight: 650; margin: 0; }
.reward-card-kind { margin: 0; font-size: 0.8rem; color: var(--c-text-muted); }
.reward-card-what { margin: 0.25rem 0 0; font-size: 0.9rem; }
.reward-card-meta { margin: 0; font-size: 0.82rem; color: var(--c-text-muted); }

.reward-card-held {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--c-success-chip-ink);
}

.reward-buy {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--c-border);
}

.reward-buy label { font-size: 0.8rem; color: var(--c-text-muted); }

/* ---- the wallet ---- */

.reward-figures {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.reward-figure {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    min-width: 8rem;
}

.reward-figure-n {
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.reward-figure-w { font-size: 0.8rem; color: var(--c-text-muted); }

.reward-in { color: var(--c-success-text); }
.reward-out { color: var(--c-text-muted); }

