/* ==========================================================================
   RSVP — the reply card that opens over the invitation.
   Colours and fonts come from theme.css.
   ========================================================================== */
.rsvp-dialog {
  width: min(92vw, 420px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--noise), var(--card);
  color: var(--ink);
  font-family: var(--body);
  box-shadow: 0 40px 80px -30px rgba(40,50,30,.55), 0 10px 24px -10px rgba(40,50,30,.35);
  overflow: auto;
}
.rsvp-dialog [hidden] { display: none !important; }
.rsvp-dialog::backdrop { background: rgba(35,45,30,.45); backdrop-filter: blur(2px); }
.rsvp-dialog[open] { animation: rsvp-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes rsvp-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }

.rsvp-inner {
  position: relative;
  padding: 34px 30px 28px;
  display: grid;
  gap: 18px;
}
.rsvp-inner::before {          /* gold double frame, like the card */
  content: "";
  position: absolute; inset: 10px;
  border: 1px solid var(--gold);
  outline: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  outline-offset: 3px;
  pointer-events: none;
}

.rsvp-close {
  position: absolute; top: 16px; right: 18px;
  width: 36px; height: 36px;
  border: 0; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink-soft);
  z-index: 1;
}
.rsvp-head { text-align: center; display: grid; gap: 4px; }
.rsvp-head h2 { margin: 0; font-family: var(--script); font-weight: 400; font-size: 44px; line-height: 1.05; color: var(--green); }
.rsvp-head p { margin: 0; font-family: var(--caps); font-size: 13px; letter-spacing: .18em; color: var(--ink-soft); }

.rsvp-form { display: grid; gap: 18px; }
.rsvp-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.rsvp-label, .rsvp-form legend, .rsvp-events legend {
  padding: 0;
  font-family: var(--caps);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* step 2: brunch and walking tour */
.rsvp-step { font-family: var(--caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }
.rsvp-step[hidden] { display: none; }
.rsvp-events { display: grid; gap: 18px; }
.rsvp-events fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.rsvp-events legend { color: var(--green); }
.rsvp-invite { padding-bottom: 16px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); gap: 5px; }
.rsvp-head .rsvp-invite-lede { margin-top: 10px; font-family: var(--body); font-size: 21px; font-style: italic; letter-spacing: 0; line-height: 1.3; color: var(--ink-soft); text-wrap: balance; }
.rsvp-invite-date { font-family: var(--caps); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.rsvp-invite-rule { width: 36px; height: 1px; margin: 8px auto; background: var(--gold); }
.rsvp-invite-events { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rsvp-invite-events div { display: grid; align-content: start; gap: 3px; }
.rsvp-invite-events b { font-family: var(--caps); font-weight: 400; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--green); }
.rsvp-invite-events span { font-size: 17px; }
.rsvp-invite-events em { font-size: 15px; line-height: 1.25; color: var(--ink-soft); }
.rsvp-invite-events .rsvp-invite-date { font-size: 14px; letter-spacing: .1em; text-wrap: balance; }
.rsvp-invite-events small { font-size: 14px; font-style: italic; line-height: 1.3; color: var(--ink-soft); }
.rsvp-invite-events small:empty { display: none; }
/* brunch only: one centred block, a little larger */
.rsvp-invite-events.one div { gap: 5px; }
.rsvp-invite-events.one b { font-size: 18px; letter-spacing: .2em; }
.rsvp-invite-events.one em { font-size: 21px; color: var(--ink); }
.rsvp-invite-events.one small { margin-top: 8px; font-size: 17px; text-wrap: balance; }
.rsvp-divider { height: 1px; background: color-mix(in srgb, var(--gold) 40%, transparent); }
.rsvp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rsvp-foot .rsvp-submit { justify-self: auto; padding-inline: 34px; }
.rsvp-back::before { content: "← "; }
[dir="rtl"] .rsvp-back::before { content: "→ "; }

/* yes / no choice */
.rsvp-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp-choice { position: relative; }
.rsvp-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rsvp-choice span {
  display: grid; place-items: center;
  height: 100%;
  min-height: 56px;
  padding: 10px 8px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  border-radius: 6px;
  font-size: 18px;
  font-style: italic;
  text-align: center;
  color: var(--green);
  background: color-mix(in srgb, var(--card) 70%, var(--paper));
  transition: background .25s, color .25s, border-color .25s, transform .15s;
}
.rsvp-choice input:checked + span { background: var(--green); color: var(--card); border-color: var(--green); }
.rsvp-choice-maybe { grid-column: 1 / -1; }
.rsvp-choice-maybe span { min-height: 46px; font-size: 17px; }
.rsvp-choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.rsvp-choice input:active + span { transform: scale(.98); }

/* one row per person: name, then Coming / Not coming */
.rsvp-people { display: grid; gap: 10px; }
.rsvp-person {
  display: grid;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.rsvp-person:last-child { border-bottom: 0; padding-bottom: 0; }
.rsvp-person-name { font-size: 20px; color: var(--ink); }
.rsvp-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rsvp-seg label { position: relative; }
.rsvp-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rsvp-seg span {
  display: grid; place-items: center;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  border-radius: 6px;
  font-size: 17px;
  font-style: italic;
  color: var(--green);
  background: color-mix(in srgb, var(--card) 70%, var(--paper));
  transition: background .25s, color .25s, border-color .25s;
}
.rsvp-seg input:checked + span { background: var(--green); color: var(--card); border-color: var(--green); }
.rsvp-seg input[value="no"]:checked + span { background: var(--ink-soft); border-color: var(--ink-soft); }
.rsvp-seg.three { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rsvp-seg.three span { padding: 6px 4px; font-size: 16px; line-height: 1.1; text-align: center; }
.rsvp-seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.rsvp-stepper { display: flex; align-items: center; gap: 14px; }
.rsvp-stepper button {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--green);
  background: none;
  color: var(--green);
  font-size: 22px; line-height: 1;
  cursor: pointer;
}
.rsvp-stepper button:disabled { opacity: .3; cursor: default; }
.rsvp-stepper button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.rsvp-count { font-family: var(--caps); font-size: 26px; min-width: 1.5ch; text-align: center; color: var(--green); font-variant-numeric: tabular-nums; }
.rsvp-of { font-style: italic; color: var(--ink-soft); font-size: 17px; }

.rsvp-field { display: grid; gap: 6px; }
.rsvp-field input, .rsvp-field textarea {
  width: 100%;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  padding: 6px 2px;
  border-radius: 0;
  resize: vertical;
}
.rsvp-field textarea { min-height: 64px; }
.rsvp-field input:focus, .rsvp-field textarea:focus { outline: none; border-bottom-color: var(--gold); box-shadow: 0 1px 0 var(--gold); }
.rsvp-field ::placeholder { color: color-mix(in srgb, var(--ink-soft) 70%, transparent); font-style: italic; }

.rsvp-error { margin: 0; min-height: 1.2em; font-size: 16px; color: #8a3b2e; text-align: center; }

.rsvp-submit {
  justify-self: center;
  font-family: var(--caps);
  font-size: 15px;
  letter-spacing: .2em;
  padding: 12px 44px;
  border: 2px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: var(--card);
  cursor: pointer;
  transition: opacity .2s;
}
.rsvp-submit:disabled { opacity: .6; cursor: progress; }
.rsvp-submit:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* thank-you state */
.rsvp-thanks { display: grid; justify-items: center; gap: 12px; text-align: center; padding-block: 10px 6px; }
.rsvp-thanks[hidden] { display: none; }
.rsvp-thanks h2 { margin: 0; font-family: var(--script); font-weight: 400; font-size: 44px; color: var(--green); }
.rsvp-thanks p { margin: 0; font-size: 19px; font-style: italic; color: var(--ink-soft); max-width: 28ch; text-wrap: balance; }
.rsvp-stamp {
  width: 84px; aspect-ratio: 1;
  border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 36% 30%, var(--seal-hi), var(--green) 58%, var(--seal-lo) 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,.3), inset 0 -3px 5px rgba(0,0,0,.3);
  display: grid; place-items: center;
  color: color-mix(in srgb, var(--gold) 85%, white);
  font-family: var(--monogram);
  font-size: 28px;
  padding: .11em .26em 0 0;          /* optical centring for the script monogram */
  animation: stamp-in .6s cubic-bezier(.3,1.6,.5,1) both;
}
/* our photo, as a small tilted print, at the top of every thank-you */
.rsvp-photo {
  width: 62%; margin: 4px 0 6px;
  padding: 7px 7px 22px;
  background: #fffdf8;
  border-radius: 2px;
  box-shadow: 0 6px 16px rgba(46, 60, 34, .22), 0 1px 2px rgba(0,0,0,.12);
  rotate: -2.5deg;
  animation: photo-in .7s cubic-bezier(.3,1.4,.5,1) both;
}
.rsvp-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
@keyframes photo-in { from { opacity: 0; translate: 0 14px; rotate: 3deg; scale: .94; } }
.rsvp-thanks h2 { animation: rise .6s .25s both; }
.rsvp-thanks p, .rsvp-thanks button { animation: rise .6s .4s both; }
@keyframes stamp-in { from { transform: scale(2.2) rotate(-18deg); opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

.rsvp-link {
  min-height: 44px;
  padding: 0 4px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--caps); font-size: 12px; letter-spacing: .2em;
  color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 4px;
}

/* "not sure yet": come back and update */
.rsvp-maybe-note {
  margin: 0;
  padding: 10px 14px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--gold) 13%, transparent);
  color: var(--olive);
  font-size: 16px;
  font-style: italic;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
  animation: rise .4s both;
}

/* thank-you: what we got */
.rsvp-summary {
  width: 100%;
  margin: 4px 0 0;
  padding: 12px 4px;
  border-block: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  text-align: start;
  animation: rise .6s .5s both;
}
.rsvp-summary:empty { display: none; }
.rsvp-summary dt {
  padding-top: 3px;
  font-family: var(--caps); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--green);
}
.rsvp-summary dd { margin: 0; display: grid; gap: 2px; font-size: 17px; line-height: 1.3; color: var(--ink); }
.rsvp-summary .nm { white-space: nowrap; }
.rsvp-summary dd b { font-weight: 400; font-style: italic; color: var(--ink-soft); }
.rsvp-thanks .rsvp-maybe-note { width: 100%; max-width: none; box-sizing: border-box; animation: rise .6s .6s both; }

/* thank-you: the way on to the rest of the page */
.rsvp-onward { display: grid; justify-items: center; gap: 8px; margin-top: 6px; animation: rise .6s .7s both; }
.rsvp-continue { padding-inline: 22px; max-width: 100%; letter-spacing: .1em; font-size: 14px; line-height: 1.35; text-wrap: balance; }
.rsvp-continue.down::after { content: "↓"; display: inline-block; margin-inline-start: 10px; font-family: var(--body); letter-spacing: 0; animation: nudge 2.4s ease-in-out 1.4s infinite; }
.rsvp-next { font-family: var(--caps); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.rsvp-next[hidden] { display: none; }
.rsvp-thanks .rsvp-link { margin-top: -4px; animation: rise .6s .8s both; }

/* status line under the RSVP button after replying */
.replied { font-size: 15px; font-style: italic; color: var(--green); }

@media (prefers-reduced-motion: reduce) {
  .rsvp-dialog[open], .rsvp-photo, .rsvp-thanks h2, .rsvp-thanks p, .rsvp-thanks button,
  .rsvp-summary, .rsvp-onward, .rsvp-maybe-note, .rsvp-continue.down::after { animation: none; }
}

/* step 2 with a single event (brunch only) */
.rsvp-invite-events.one { grid-template-columns: 1fr; }

/* visually hidden, still read by screen readers */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- one view (20 Nov 2026): a heading for each event on the reply card ---- */
.rsvp-ev-head { text-align: center; display: grid; gap: 2px; }
.rsvp-ev-head .ev-eyebrow { font-family: var(--caps); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); }
.rsvp-ev-head .ev-title { font-family: var(--caps); font-size: 20px; letter-spacing: .12em; color: var(--green); }
.rsvp-ev-head .ev-date { font-family: var(--caps); font-size: 13px; letter-spacing: .06em; color: var(--green); }
.rsvp-ev-head .ev-place { font-style: italic; font-size: 16px; color: var(--ink-soft); }
.rsvp-ev { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); }
.rsvp-ev[hidden], .rsvp-person[hidden] { display: none; }
.rsvp-people.solo .rsvp-person-name { display: none; }
:lang(he) .rsvp-ev-head .ev-eyebrow { font-size: 13px; letter-spacing: .06em; }
:lang(he) .rsvp-ev-head .ev-date { font-size: 15px; letter-spacing: 0; }
:lang(he) .rsvp-ev-head .ev-title { font-size: 22px; letter-spacing: 0; }
