/* Occasions: the festive look (2026-11-04, backlog row 100, proposed; record 01-decisions/product/occasions.md). One recipe for both audiences: the
   learner app wears it on <html data-occasion="diwali">, the portal's editor draws it inside a preview box with the same attribute, the website carries
   only the mark's motif (data-occasion-mark). The look is three things and nothing else: (1) the accent families (tiles, chips, settings rows, tags that
   fall back to the primary) take the occasion's accent; the primary, the buttons, the nav and every text colour are untouched; (2) the mark wears a small
   motif at its corner; (3) the greeting card on Today. Certificates, payments, checkout and the portal's own chrome never carry data-occasion.
   The colours are the tokens' category families (components.css .acc-cat-*) and the reward gold: the occasion names a family, never a colour. In dark mode
   the family's text token (tokens 1.5: 4.6:1 on a 20 % tint) is used for the icon as well, so the tile stays readable on navy (the owner's contrast rule). */

/* the accent override: a scope that sets --accent itself (.acc-*, inline style) still wins, so a bento tile keeps its own colour */
[data-occasion] { --accent: var(--occasion-accent, var(--primary)); --accent-text: var(--occasion-accent-text, var(--primary-text)); }
:root[data-theme="dark"] [data-occasion], :root[data-theme="dark"][data-occasion] { --accent: var(--occasion-accent-text, var(--primary-text)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [data-occasion], :root:not([data-theme="light"])[data-occasion] { --accent: var(--occasion-accent-text, var(--primary-text)); } }

/* the motif at the mark's corner: a disc of the surface so it reads on the rail, on the canvas and on the website's dark hero; the glyph is a mask so it takes the family's text colour */
[data-occasion] .pb-logo, [data-occasion-mark] .pb-logo { position: relative; }
[data-occasion] .pb-logo::after, [data-occasion-mark] .pb-logo::after { content: ''; position: absolute; inset-inline-end: -6%; bottom: -6%; width: 46%; height: 46%; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
[data-occasion] .pb-logo::before, [data-occasion-mark] .pb-logo::before { content: ''; position: absolute; inset-inline-end: 3%; bottom: 3%; width: 28%; height: 28%; z-index: 1; background: var(--occasion-accent-text, var(--primary-text)); -webkit-mask: var(--occasion-motif) center / contain no-repeat; mask: var(--occasion-motif) center / contain no-repeat; }

/* the greeting card (PbOccasionCard): the mark with its motif, the greeting line, one line from everyone at PrepBuddy, the round dismiss; one padding per canvas card (16 dp, radius 20) */
.occ-card { display: flex; align-items: flex-start; gap: 12px; }
.occ-card .occ-mark { flex-shrink: 0; width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent, var(--primary)) 16%, transparent); }
.occ-card .occ-mark .pb-logo { width: 36px; height: 36px; }
.occ-card .occ-tx { flex: 1; min-width: 0; }
.occ-card .occ-tx b { display: block; font-size: calc(17px * var(--font-scale)); font-weight: 800; line-height: 1.25; color: var(--text-primary); }
.occ-card .occ-tx p { margin: 4px 0 0; font-size: calc(14px * var(--font-scale)); line-height: 1.45; color: var(--text-primary); }
.occ-card .occ-tx small { display: block; margin-top: 6px; font-size: calc(12px * var(--font-scale)); color: var(--accent-text, var(--text-secondary)); font-weight: 600; }
.occ-card .tbtn { flex-shrink: 0; margin: -6px -6px 0 0; }

/* the sticker row: inside Adda's reaction picker and the chat's emoji sheet, a labelled row of 44 dp sticker buttons; the stickers are the Media library's small images (purpose OCCASION_STICKER), drawn here as glyphs in the family's colour */
.occ-stk { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 4px 2px; border-top: 1px solid var(--border); margin-top: 6px; }
.occ-stk .occ-lbl { flex-basis: 100%; font-size: calc(12px * var(--font-scale)); font-weight: 700; color: var(--text-secondary); padding: 0 6px 2px; }
.occ-stk button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--accent-text, var(--primary-text)); cursor: pointer; }
.occ-stk button:hover, .occ-stk button:focus-visible { background: color-mix(in srgb, var(--accent, var(--primary)) 14%, transparent); outline: none; }
.occ-stk button svg, .occ-stk-g { width: 28px; height: 28px; fill: currentColor; display: inline-block; vertical-align: middle; }
.occ-stk-g.sm { width: 18px; height: 18px; }
/* inside Adda's reaction picker (feed.css .rxp, a pill of four): on an occasion the pill becomes a two-row panel, the stickers on the second row */
.occ-rxp { flex-wrap: wrap; border-radius: 20px; max-width: calc(100% - 16px); }
.occ-rxp .occ-stk { flex-basis: 100%; }
.occ-rxp .occ-stk button { width: 44px; height: 44px; border-radius: 12px; flex-direction: row; font-size: inherit; }

/* the moment: a 2 s canvas over everything, never catching a tap; removed by the script; never drawn under reduced motion or ?device=low */
.occ-moment { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .occ-moment { display: none; } }

/* the portal's preview (admin/config 08): the Today card and the mark at a phone width (360) and a web width (720), drawn inline from this same recipe; the box carries data-occasion so the accent is scoped to it and the portal's chrome stays as it is */
.occ-prev { display: flex; flex-direction: column; gap: 12px; }
.occ-prev .occ-frame { border-radius: 20px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); padding: 12px; overflow: hidden; }
.occ-prev .occ-frame .occ-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 800; font-size: calc(15px * var(--font-scale)); }
.occ-prev .occ-frame .occ-bar .pb-logo { width: 32px; height: 32px; }
.occ-prev .occ-frame.occ-phone { max-width: 360px; }
.occ-prev .occ-frame.occ-web { max-width: 720px; }
.occ-prev .occ-frame .card { padding: 16px; border-radius: 20px; }
.occ-swatch { width: 18px; height: 18px; border-radius: 999px; flex-shrink: 0; display: inline-block; vertical-align: middle; background: var(--accent, var(--primary)); margin-inline-end: 8px; }
.occ-motif-24 { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent-text, var(--primary-text)); flex-shrink: 0; }
.occ-motif-24 svg { width: 20px; height: 20px; fill: currentColor; }
