/* Not My Event: the two little buttons under an envelope invitation card (RSVP, and a dish), and the pop-up each one opens. The behaviour is /assets/card-reply.js.
   Everything takes the colors and fonts of the design it is in (--paper, --ink, --ink-soft, --accent, --display, --body, set on body.d-<name>), so a Gold Seal card has gold-and-burgundy buttons
   and a Midnight Diya card has navy-and-gold ones. */

/* The pills sit UNDER the card, never on it: a gap of 5% of the card's height below its bottom edge, in the design's own colors (each design below names a fill, a lettering and an edge that go with its page and its envelope).
   They fade in once the card has settled: RSVP first, the food one half a second later. To make room, a screen's card is a little smaller and sits a little higher (by --rp-r, the room kept below it); while the host is
   editing, the card is sized for the strip above the guide instead. */
body.k-invite { --rp-r: clamp(56px, 11svh, 80px); --rp-h: 44px; }
html:not(.nme-edit) body.k-invite .scene { --H: calc(100svh - var(--rp-r)); bottom: var(--rp-r); }
html.nme-edit body.k-invite .scene { --H: calc(54svh - var(--rp-r)); }
.rp-acts { position: absolute; z-index: 8; left: 0; right: 0; top: calc(50% + var(--ch) / 2 + var(--ch) * .05); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; padding: 0 16px; pointer-events: none; }
.rp-acts[hidden] { display: none; }
.rp-pill { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: var(--rp-h); padding: 0 26px; border-radius: 999px; border: 2px solid var(--rp-edge, var(--accent, #c9a24b)); background: var(--rp-bg, var(--ink, #222)); color: var(--rp-fg, var(--paper, #fff)); font-family: var(--body, system-ui, sans-serif); font-weight: 700; font-size: 15px; letter-spacing: .02em; line-height: 1; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .9, .3, 1.2), filter .2s; -webkit-tap-highlight-color: transparent; }
.rp-pill[hidden] { display: none; }
.rp-acts.in .rp-pill { opacity: 1; transform: none; }
.rp-acts.in #rp-food { transition-delay: .5s, .5s, 0s; }
.rp-pill svg { width: 18px; height: 18px; flex: none; color: inherit; }
.rp-pill:hover { filter: brightness(1.1); }
.rp-pill:focus-visible { outline: 3px solid var(--rp-edge, var(--accent, #c9a24b)); outline-offset: 3px; }
@media (max-width: 380px) { .rp-pill { padding: 0 18px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .rp-pill { transform: none; transition: opacity .01ms, filter .2s; } .rp-acts.in #rp-food { transition-delay: 0s; } }
/* Each design's pills: a fill, the lettering on it and a thin edge, picked to stand out on that design's page and to belong to its envelope */
body.d-gold { --rp-bg: #d9b24a; --rp-fg: #3a0914; --rp-edge: #f6e4a6; }
body.d-emerald { --rp-bg: #d8bd78; --rp-fg: #071f18; --rp-edge: #efdca0; }
body.d-kraft { --rp-bg: #b8372f; --rp-fg: #fffaf0; --rp-edge: #efdfb4; }
body.d-crayon { --rp-bg: #d9402b; --rp-fg: #fff4b8; --rp-edge: #783200; }
body.d-marigold { --rp-bg: #f59e0b; --rp-fg: #2a0d04; --rp-edge: #ffc83d; }
body.d-midnight { --rp-bg: #f4d58b; --rp-fg: #101b3d; --rp-edge: #f4dc9a; }
body.d-rangoli { --rp-bg: #e5408f; --rp-fg: #2b0f4a; --rp-edge: #ffffff; }
body.d-mithai { --rp-bg: #f6e3a0; --rp-fg: #2a0a1e; --rp-edge: #ffd678; }

/* The pop-up */
.rp-scrim { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(8, 5, 12, .64); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: rp-fade .25s ease; }
@keyframes rp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rp-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
/* The panel gives the food board the variables it expects, worked out from the paper and the ink of the design */
.rp-panel { --cream: var(--ink, #222); --muted: var(--ink-soft, color-mix(in srgb, var(--ink, #222) 72%, var(--paper, #fff))); --line: color-mix(in srgb, var(--ink, #222) 28%, transparent); --f-bg: color-mix(in srgb, var(--ink, #222) 6%, var(--paper, #fff)); --f-ink: var(--ink, #222); --row-bg: color-mix(in srgb, var(--ink, #222) 8%, var(--paper, #fff)); --chip-bg: color-mix(in srgb, var(--ink, #222) 8%, var(--paper, #fff)); --accent-d: var(--accent, #c9a24b); --ok: var(--ink, #222); --bad: #d64a3a;
  position: relative; width: min(460px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; padding: 28px 22px 22px; border-radius: 18px; background: var(--paper, #fff); color: var(--ink, #222); font-family: var(--body, system-ui, sans-serif); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), inset 0 0 0 1.5px var(--accent, #c9a24b); animation: rp-rise .3s cubic-bezier(.2, .9, .3, 1.1); outline: none; text-align: left; }
.rp-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink, #222); font-size: 28px; line-height: 1; }
.rp-x:hover { background: color-mix(in srgb, var(--ink, #222) 10%, transparent); }
.rp-h { margin: 0 40px 4px 0; font-family: var(--display, Georgia, serif); font-weight: 400; font-size: clamp(25px, 6vw, 31px); line-height: 1.1; }
.rp-sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.rp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rp-form { display: grid; gap: 14px; }
.rp-f { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: var(--muted); }
.rp-f small { font-weight: 600; font-size: 12px; }
.rp-f[hidden], .rp-err[hidden] { display: none; }
.rp-f input, .rp-f textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--f-bg); color: var(--f-ink); font: inherit; font-size: 16px; font-weight: 500; }
.rp-f textarea { min-height: 78px; resize: vertical; }
.rp-f input:focus, .rp-f textarea:focus { outline: 2px solid var(--accent, #c9a24b); outline-offset: 1px; }
.rp-ans { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.rp-ans label { position: relative; display: block; }
.rp-ans input { position: absolute; opacity: 0; pointer-events: none; }
.rp-ans span { display: flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 700; cursor: pointer; transition: border-color .2s, background .2s; }
.rp-ans input:checked + span { border-color: var(--accent, #c9a24b); background: color-mix(in srgb, var(--accent, #c9a24b) 20%, var(--paper, #fff)); }
.rp-ans input:focus-visible + span { outline: 3px solid var(--accent, #c9a24b); outline-offset: 2px; }
.rp-step { display: flex; align-items: center; gap: 16px; }
.rp-step button { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--accent, #c9a24b); background: transparent; color: var(--ink, #222); font-size: 24px; line-height: 1; }
.rp-step output { min-width: 2ch; text-align: center; font-size: 22px; font-weight: 800; color: var(--ink, #222); }
.rp-go { min-height: 52px; padding: 0 22px; border: 1.5px solid var(--accent, #c9a24b); border-radius: 999px; background: var(--ink, #222); color: var(--paper, #fff); font: inherit; font-weight: 800; font-size: 16px; }
.rp-go:disabled { opacity: .6; }
.rp-err { margin: 0; color: var(--bad); font-weight: 700; font-size: 14px; }
.rp-done { display: grid; gap: 12px; text-align: center; padding: 4px 0; }
.rp-done[hidden], .rp-form[hidden] { display: none; }
.rp-done h3 { margin: 0; font-family: var(--display, Georgia, serif); font-weight: 400; font-size: 28px; line-height: 1.1; }
.rp-done p { margin: 0; color: var(--muted); line-height: 1.4; }
.rp-more { display: grid; gap: 4px; justify-items: center; margin-top: 6px; }
.rp-more .rp-go { width: 100%; }
.rp-link { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink, #222); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* The food board draws itself (packs.js); here it only takes the card's paper, ink and accent */
.rp-board .db h3 { font-family: var(--display, Georgia, serif); font-weight: 400; }
.rp-board .pk-btn:not(.ghost), .rp-board .db-tab[aria-selected="true"] { background: var(--ink, #222); border-color: var(--accent, #c9a24b); color: var(--paper, #fff); }
.rp-board .pk-btn.ghost { color: var(--ink, #222); }
.rp-board .db-list li.mine { background: color-mix(in srgb, var(--accent, #c9a24b) 24%, var(--paper, #fff)); }
@media (prefers-reduced-motion: reduce) { .rp-scrim, .rp-panel { animation: none; } }
