/*
 * The public form page (/rsvp/<slug>, /form/<slug>), 8 October 2026. Everything a form needs
 * is already in theme.css: .form, .form__plate, .field, .check, .hp, .form__send, .form__done,
 * .form__err. This file only lays out what is particular to this page: the title beside its
 * photograph, the date and place, the seats line and the preview bar. Same tokens, same type,
 * square corners and thin rules, so it reads as one more page of the gallery's site.
 */

.fp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (min-width: 900px) {
  .fp-grid:has(.fp-photo) { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .fp-photo { position: sticky; top: calc(var(--hdr, 72px) + 24px); }
}
.fp-main { min-width: 0; max-width: 46rem; }
.fp-kicker { margin: 0 0 10px; }
.fp-title { margin: 0 0 18px; text-wrap: balance; }

.fp-facts { margin: 0 0 22px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.fp-facts p { margin: 0; line-height: 1.5; }
.fp-when { font-family: var(--f-display); font-size: var(--t-lead, 21px); color: var(--ink); }
.fp-where { color: var(--ink-2); }
.fp-seats { margin-top: 6px !important; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.fp-seats--full { color: var(--muted); }

.fp-intro { margin: 0 0 28px; color: var(--ink-2); }
.fp-intro p { margin: 0 0 14px; max-width: 62ch; }
.fp-intro p:last-child { margin-bottom: 0; }

.fp-photo { margin: 0; }
.fp-photo img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; background: var(--sunk); }
@media (max-width: 899px) {
  /* On a phone the picture comes first and stays short, so the form is never far away. */
  .fp-photo { order: -1; }
  .fp-photo img { max-height: 46vh; object-fit: cover; }
}

.fp-preview {
  margin: 0 0 22px; padding: 12px 16px; border: 1px dashed var(--rule-2); background: var(--sunk);
  font-size: var(--t-minor); color: var(--ink);
}
.fp-full { margin: 0 0 22px; color: var(--ink); }
.fp-closed { margin: 0; }

/* 16px or more in every box, so iPhone does not zoom the page when a box is tapped. */
.fp .field input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.fp .field select,
.fp .field textarea { font-size: max(16px, 1em); }
.fp .field textarea { min-height: 120px; }
.fp-guests { max-width: 9rem; }
.fp-choices { display: grid; gap: 2px; }
.fp-choices .check, .fp .fp-q > .check { min-height: 44px; align-items: center; margin: 0; }
.fp .fp-q > .check input { margin-top: 0; }

/* A problem is said in words under its box, with the box drawn heavier, never by color alone. */
.fp-err { margin: 8px 0 0; font-size: var(--t-minor); }
.fp-err::before { content: "Needs a look: "; font-weight: 600; }
.fp .field--bad > legend { color: #8f2118; }

.fp-summary { margin: 0 0 24px; }
.fp-summary:focus { outline: 2px solid #8f2118; outline-offset: 3px; }
.fp-summary__t { margin: 0 0 6px; font-weight: 600; }
.fp-summary ul { margin: 0; padding-left: 20px; }
.fp-summary a { color: inherit; }

.fp-done { margin: 0 0 24px; }
.fp-done--bad .form__done-t { color: var(--ink); }
.fp-cancel .form__done-t { margin-bottom: 12px; }
.fp-cancel .form__send { margin-top: 18px; }

@media (max-width: 560px) {
  .fp .form__plate { padding: 20px 16px; }
  .fp .form__send .btn--lg { width: 100%; justify-content: center; }
}

/* The guest's own reply, opened from the private link in their email to change it. */
.fp-edit { margin: 0 0 18px; }
.fp-edit .form__done-t { margin-bottom: 8px; }
.fp-editcancel { margin: 14px 0 0; }
.fp-form input[readonly] { background: transparent; border-style: dashed; }

/*
 * An RSVP inline on an event or exhibition page (rsvp-inline.js), 9 October 2026. The same
 * questions as the form's own page, in a quieter frame: the event row or the exhibition text is
 * already the heading, so the form's title is set at the lead size, not as a second page title.
 */
.rsvp-slot[hidden] { display: none; }
.rsvp-slot__fallback { margin: 12px 0 0; }
.fp-inline { margin: 0; max-width: 46rem; }
.fp-inline .fp-kicker { margin: 0 0 6px; }
.fp-inline__t { margin: 0 0 14px; font-family: var(--f-display); font-size: var(--t-lead, 21px); line-height: 1.25; color: var(--ink); }
.fp-inline .fp-facts { margin: 0 0 18px; padding: 10px 0; }
.fp-inline .fp-when { font-family: var(--f-body); font-size: var(--t-small, 16px); }
.fp-inline__state { margin: 0 0 18px; font-weight: 600; color: var(--ink); }
.fp-inline .fp-closed { padding: 16px 20px; }
.fp-inline__open > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; }
.fp-inline__open > summary::-webkit-details-marker { display: none; }
.fp-inline__open[open] > summary { margin-bottom: 18px; }

/* On the events list the RSVP belongs to the row above it: no rule between the two, and on a
   wide screen it starts where the row's words start, past the thumbnail. */
.evlist .row:has(+ .rsvp-slot:not([hidden])) { border-bottom: 0; }
.evlist .rsvp-slot { padding: 0 0 22px; border-bottom: 1px solid var(--rule); }
@media (min-width: 861px) {
  .evlist .rsvp-slot { padding-left: calc(88px + clamp(18px, 2.2vw, 34px)); }
}
.ex-rsvp { padding-top: 0; }
.ex-rsvp .fp-inline { padding-top: clamp(18px, 2vw, 26px); border-top: 1px solid var(--rule); }
