/* ============================================================
 * RSVP — styling owned by Claude Code, not Claude Design.
 * Linked from index.html so Claude Design HTML drops never
 * have to carry these styles. Uses palette vars (--clay, --cream,
 * --ink, --line, --green-deep, --ink-soft) defined by index.html's
 * :root block — those vars are stable across design iterations.
 * ============================================================ */

/* ============ RSVP — greeting line ============ */
/* .invited is flex row by default; stack our greeting above the existing
   "You're cordially..." line by switching the section to column. */
.invited{ flex-direction: column; }
/* Selector boosted to `.invited p.invited-greeting` so it beats the Claude
   Design rule `.invited p { margin: 0 }` (same source, higher specificity). */
.invited p.invited-greeting{
  font-family: "Caveat", cursive;
  font-weight: 500;
  color: var(--clay);
  font-size: clamp(22px, 2.4vw, 34px);
  /* Bottom margin scales with viewport so the breathing room stays right
     against the very large parents' line (clamp(36px, 5.4vw, 78px)). */
  margin: 0 0 clamp(20px, 5vw, 72px);
  letter-spacing: 0.01em;
}
.invited p.invited-greeting:empty{ display: none; margin: 0; }

/* ============ RSVP — banner (soft-fail for bad/missing token) ============ */
.rsvp-banner{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 12px 44px 12px 20px;
  background: var(--clay);
  color: var(--cream);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 6px 18px rgba(40,30,20,0.18);
}
.rsvp-banner-text{ max-width: 720px; text-align: center; }
.rsvp-banner-close{
  position: absolute;
  top: 50%; right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--cream);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.8;
}
.rsvp-banner-close:hover{ opacity: 1; }

/* ============ RSVP — dialog ============ */
.rsvp-dialog{
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  max-width: 540px;
  width: calc(100% - 32px);
}
.rsvp-dialog::backdrop{
  background: rgba(20, 18, 15, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.rsvp-dialog #rsvpForm{
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 28px 22px;
  box-shadow: 0 24px 60px rgba(40,30,20,0.25);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.rsvp-head{ margin: 0 0 18px; text-align: center; }
.rsvp-eyebrow{
  font-family: "Caveat", cursive;
  color: var(--clay);
  font-size: 20px;
  margin: 0 0 4px;
}
.rsvp-title{
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 4vw, 36px);
  margin: 0;
  letter-spacing: -0.01em;
}
.rsvp-rows{ display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; }
.rsvp-row{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.rsvp-row:hover{
  border-color: var(--clay);
}
.rsvp-row.is-open{
  background: rgba(255, 253, 246, 0.5);
  box-shadow: 0 4px 14px rgba(40,30,20,0.06);
}

/* Toggle: full-width clickable header. Name centered, status muted below,
   chevron tucked into the top-right corner. */
.rsvp-row-toggle{
  position: relative;
  width: 100%;
  display: block;
  padding: 16px 44px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: center;
  cursor: pointer;
  font: inherit;
  border-radius: 14px;
  transition: background .2s ease;
}
.rsvp-row-toggle:hover{ background: rgba(111,117,83,0.04); }
.rsvp-row-toggle:focus-visible{
  outline: 2px solid var(--clay);
  outline-offset: -3px;
}
.rsvp-row.is-open .rsvp-row-toggle:hover{ background: transparent; }
/* Open rows drop the status line under the name, so pull the body up close. */
.rsvp-row.is-open .rsvp-row-toggle{ padding-bottom: 6px; }

.rsvp-row-name{
  display: block;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.1;
}
.rsvp-row-summary{
  display: block;
  margin-top: 6px;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: opacity .2s ease;
}
/* When open, fully collapse the status line (don't just fade it) so it stops
   reserving the empty band between the name and the first event. */
.rsvp-row.is-open .rsvp-row-summary{
  opacity: 0;
  height: 0;
  margin-top: 0;
  overflow: hidden;
}

.rsvp-row-chevron{
  position: absolute;
  right: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--ink-soft);
  opacity: 0.55;
  transition: transform .25s ease, opacity .2s ease;
}
.rsvp-row-toggle:hover .rsvp-row-chevron{ opacity: 1; }
.rsvp-row.is-open .rsvp-row-chevron{
  transform: translateY(-50%) rotate(180deg);
  opacity: 0.8;
}

/* Collapsed by default; the toggle on .rsvp-row reveals the body. */
.rsvp-row-body{
  display: none;
  padding: 4px 18px 16px;
}
.rsvp-row.is-open > .rsvp-row-body{ display: block; }

.rsvp-event{ margin-top: 12px; }
.rsvp-event:first-of-type{ margin-top: 4px; }
.rsvp-event-label{
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.rsvp-toggles{ display: flex; gap: 10px; margin-top: 6px; }
.rsvp-toggle{
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.rsvp-toggle input[type="radio"]{ accent-color: var(--clay); }
.rsvp-toggle:has(input:checked){
  background: var(--clay);
  color: var(--cream);
  border-color: var(--clay);
}
.rsvp-dietary{ display: block; margin-top: 12px; }
.rsvp-dietary-hint{
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.rsvp-dietary textarea{
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
}
.rsvp-dietary textarea:focus{ outline: 2px solid var(--clay); outline-offset: 1px; }
.rsvp-status{
  min-height: 1.2em;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  text-align: center;
  margin: 6px 0 10px;
}
.rsvp-status[data-kind="error"]{ color: #8a3a1f; }
.rsvp-status[data-kind="success"]{ color: var(--clay); }
.rsvp-status[data-kind="info"]{ color: var(--ink-soft); }
.rsvp-foot{ display: flex; gap: 10px; justify-content: flex-end; }
.rsvp-btn{
  font-family: "Inter", sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
}
.rsvp-btn-ghost{
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.rsvp-btn-ghost:hover{ color: var(--ink); border-color: var(--clay); }
.rsvp-btn-primary{
  background: var(--clay);
  color: var(--cream);
}
.rsvp-btn-primary:hover{ background: var(--green-deep); }
.rsvp-btn[disabled]{ opacity: 0.6; cursor: default; }

@media (max-width: 600px){
  .rsvp-dialog #rsvpForm{ padding: 22px 18px 18px; border-radius: 14px; }
  .rsvp-toggles{ flex-direction: column; }
}
