/* Allow the RSVP form body to scroll when the guest list is long.
   Override savethedate.css which sets height: 100vh and align-items: center. */
body.rsvp-form-body {
  height: auto;
  min-height: 100vh;
  padding: 2rem 1rem;
  box-sizing: border-box;
  overflow-y: auto;
  align-items: flex-start;
}

@media (max-width: 400px) {
  body.rsvp-form-body {
    padding: 1rem 0.5rem;
  }
}

/* Card sizing for the RSVP form */
.rsvp-card {
  width: 95%;
  max-width: 560px;
  margin: 0 auto;
}

/* Stop savethedate.css #inside-line from vertically centering long form content */
.rsvp-form-body #inside-line {
  justify-content: flex-start;
  height: auto;
}

/* ── Party heading ───────────────────────────────────────────────────────── */

.rsvp-form-title {
  margin: 0 0 0.75em;
  font-variant: small-caps;
  opacity: 0.65;
}

/* Name input: override inline-block from button-link so it fills the container */
#name-search {
  width: 100%;
  box-sizing: border-box;
}

/* ── Search results list ─────────────────────────────────────────────────── */

#search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

#search-results li {
  list-style: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#search-results li.no-results {
  padding: 0.65em 0.9em;
  opacity: 0.65;
  font-style: italic;
  font-family: "Ppeiko Light", serif;
  font-size: 1rem;
}

.search-result-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  width: 100%;
  padding: 0.75em 0.9em;
  background: transparent;
  border: 2px solid #000;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  box-sizing: border-box;
}

.search-result-btn::after {
  content: "›";
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.5;
}

.search-result-btn:hover,
.search-result-btn:focus-visible {
  background: #000;
  color: #ffa400;
  outline: none;
}

.search-result-btn:hover .search-result-guests,
.search-result-btn:focus-visible .search-result-guests {
  opacity: 1;
}

.search-result-text {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.search-result-name {
  font-family: "Ppeiko Medium", sans-serif;
  font-variant: small-caps;
  font-size: 1rem;
}

.search-result-guests {
  font-family: "Ppeiko Light", serif;
  font-variant: small-caps;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ── Guest cards ─────────────────────────────────────────────────────────── */

#guest-list {
  width: 100%;
}

.guest-card {
  border: 2px solid rgba(0, 0, 0, 0.35);
  padding: 1em;
  margin: 0.75em 0;
  box-sizing: border-box;
  text-align: left;
}

.guest-card .guest-name {
  margin: 0 0 0.6em 0;
  font-family: "Ppeiko Medium", sans-serif;
  font-size: 1.1rem;
  font-variant: small-caps;
}

/* ── Read-only RSVP summary ──────────────────────────────────────────────── */

.guest-card--readonly {
  opacity: 0.92;
}

.rsvp-summary {
  display: flex;
  align-items: center;
  gap: 0.75em;
  flex-wrap: wrap;
}

.rsvp-badge {
  font-family: "Ppeiko Light", serif;
  font-variant: small-caps;
  font-size: 1rem;
}

.rsvp-badge--yes::before {
  content: "✓ ";
}

.rsvp-badge--yes {
  color: #000;
}

.rsvp-badge--no::before {
  content: "✗ ";
}

.rsvp-badge--no {
  color: #555;
}

.rsvp-badge--none {
  opacity: 0.45;
  font-style: italic;
}

.rsvp-dietary {
  font-family: "Ppeiko Light", serif;
  font-size: 0.9rem;
  opacity: 0.65;
  font-style: italic;
}

/* ── Attending toggle ────────────────────────────────────────────────────── */

.attend-toggle {
  display: flex;
  gap: 0.5em;
}

.attend-btn {
  flex: 1;
  padding: 0.5em;
  min-height: 44px; /* comfortable touch target */
  font-size: 0.9rem;
  font-family: "Ppeiko Light", serif;
  font-variant: small-caps;
  border: 2px solid #000;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* Attending — selected: inverted (black bg, orange text) */
.attend-btn.attend-yes {
  background: #000;
  color: #ffa400;
}

/* Not attending — selected: dark neutral */
.attend-btn.attend-no {
  background: #444;
  color: #fff;
  border-color: #444;
}

/* ── Dietary restrictions ────────────────────────────────────────────────── */

.dietary-row {
  margin-top: 0.6em;
}

.dietary-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.95rem;
  padding: 0.5em 0.8em;
  margin-top: 0.6em;
}

/* ── Status & actions ────────────────────────────────────────────────────── */

#rsvp-status {
  min-height: 1.4em;
  margin: 0.5em 0 0;
  font-size: 1rem;
}

.rsvp-actions {
  display: flex;
  gap: 0.75em;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.25em;
}

@media (max-width: 480px) {
  .rsvp-actions {
    flex-direction: column;
  }

  .rsvp-actions .button-link {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ── Confirmation page ───────────────────────────────────────────────────── */

#rsvp-confirmation {
  text-align: center;
  padding: 2em 1em;
}

#rsvp-confirmation h3 {
  margin-bottom: 0.5em;
}

#rsvp-confirmation p {
  margin-bottom: 1.5em;
}
