/* ============================================================
   7 · Confirmation form
   ============================================================ */

.rsvp { padding-bottom: 1rem; }

@media (min-width: 900px) {
  .stem--rsvp-l { --h: 280px; --r: 30deg; left: -170px; bottom: 8%; }
  .stem--rsvp-r { --h: 240px; --r: -30deg; --flip: -1; right: -150px; bottom: 16%; }
}

.rsvp__title {
  margin-top: 0.6rem;
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 2.2rem + 3vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
}

.rsvp__lead {
  max-width: 24rem;
  margin-top: 0.8rem;
  font-style: italic;
  color: var(--wine);
}

.rsvp__form {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  width: 100%;
  max-width: 27rem;
  margin-top: 2.2rem;
  text-align: left;
}

.rsvp__form[hidden] { display: none; }

/* ---- Fields ---------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field[hidden] { display: none; }

.field__label {
  padding: 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--wine);
}

.field__optional { letter-spacing: 0.1em; text-transform: none; font-style: italic; color: var(--wine); }

.field__input {
  width: 100%;
  padding: 0.55rem 0.1rem;
  font-size: 1.15rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--blush);
  border-radius: 0;
  transition: border-color 220ms ease;
}

.field__input:focus { outline: none; border-bottom-color: var(--wine); }
.field__input--area { resize: vertical; min-height: 5.2rem; line-height: 1.5; }

/* ---- Attending choice ------------------------------------------------- */

.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice legend { margin-bottom: 0.6rem; }

.choice__option { position: relative; display: flex; cursor: pointer; }

.choice__option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
  padding: 1.1rem 0.6rem 1rem;
  text-align: center;
  border: 1px solid var(--blush-60);
  transition: border-color 220ms ease, background-color 220ms ease;
}

.choice__main { font-size: 1.12rem; font-weight: 500; line-height: 1.25; }
.choice__sub { font-size: 0.92rem; font-style: italic; color: var(--wine); }

.choice__check {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.1rem;
  height: 1.1rem;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 220ms ease, transform 320ms var(--ease-out);
}

.choice__option:hover .choice__card { border-color: var(--wine-40); }
.choice__option input:focus-visible + .choice__card { outline: 2px solid var(--blush); outline-offset: 3px; }
.choice__option input:checked + .choice__card { border-color: var(--wine); background: var(--blush-08); }
.choice__option input:checked + .choice__card .choice__check { opacity: 1; transform: none; }

/* ---- Guest count ------------------------------------------------------ */

.stepper { align-items: center; text-align: center; }

.stepper__controls {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 0.3rem;
}

.stepper__btn {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--blush);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.stepper__btn:hover:not(:disabled) { border-color: var(--wine); background: var(--blush-08); }
.stepper__btn:disabled { opacity: 0.35; cursor: default; }
.stepper__btn .icon { width: 1.1rem; height: 1.1rem; }

.stepper__num {
  min-width: 2.2rem;
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}

.stepper__hint { margin-top: 0.4rem; font-size: 0.95rem; font-style: italic; color: var(--wine); }
.stepper__hint[hidden] { display: none; }

/* ---- States ----------------------------------------------------------- */

.rsvp__error {
  padding: 0.8rem 1rem;
  font-size: 0.98rem;
  font-style: italic;
  border-left: 2px solid var(--blush);
  background: var(--blush-08);
}

.rsvp__error[hidden] { display: none; }

.rsvp__submit { margin-top: 0.4rem; }

.rsvp__done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  max-width: 24rem;
  margin-top: 2.2rem;
  animation: done-in 900ms var(--ease-out) both;
}

.rsvp__done[hidden] { display: none; }

.rsvp__done-title {
  margin-top: 0.4rem;
  font-family: var(--font-script);
  font-size: 2.8rem;
  line-height: 1.1;
}

.rsvp__done-text { font-style: italic; color: var(--wine); }
.rsvp__done .link-btn { margin-top: 0.8rem; }

@keyframes done-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
  .choice { grid-template-columns: 1fr; }
}
