/* ───────── formulario RSVP (viene del proyecto RSVP; guarda en Supabase) ─────────
   Todo va adentro de .rsvp para que no choque con los estilos de la invitación. */

.rsvp {
  --bg: #faf5eb;
  --surface: #fffdfa;
  --surface-2: #f4e8de;
  --ink: #2b1c20;
  --muted: #8a6f6a;
  --line: #e3d1c4;
  --accent: #7a1f2e;
  --accent-ink: #ffffff;
  --accent-soft: #f3ded9;
  --good: #1a8f52;
  --good-soft: #e5f7ec;
  --bad: #c4392f;
  --bad-soft: #fbe9e7;
  --shadow: 0 1px 2px rgba(33, 20, 20, .06), 0 8px 24px -8px rgba(33, 20, 20, .18);

  width: 100%;
  display: flex;
  justify-content: center;
  color: #484848;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  line-height: normal;
}

.rsvp * { box-sizing: border-box; }
.rsvp ::selection { background: var(--accent-soft); }

.rsvp .tarjeta {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 36px 30px 34px;
}

.rsvp .encabezado {
  text-align: center;
  margin-bottom: 30px
}

.rsvp .novios {
  font-family: "Feltpen", "Iowan Old Style", Georgia, serif;
  font-size: 46px;
  font-weight: 400;
  letter-spacing: 0;
  text-wrap: balance;
  margin: 0 0 8px;
  color: var(--accent);
}

.rsvp .evento-lugar {
  color: var(--accent);
  font-family: "The Seasons", Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  margin: 0
}

.rsvp .evento-fecha {
  color: var(--muted);
  font-family: "The Seasons", Georgia, serif;
  font-size: 18px;
  margin: 2px 0 0
}

.rsvp h2.paso-titulo {
  font-size: 16.5px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 6px;
  letter-spacing: -.005em;
}

.rsvp p.paso-ayuda {
  font-size: 14px;
  color: #858585;
  text-align: center;
  margin: 0 0 26px;
  line-height: 1.5;
}

.rsvp .fila-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px
}

.rsvp label.campo-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink);
}

.rsvp input[type="text"],
.rsvp textarea {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;                 /* 16px o más: si no, el iPhone hace zoom al tocar el campo */
  padding: 8px 2px;
  transition: border-color .15s;
}

.rsvp textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.5
}

.rsvp input[type="text"]::placeholder,
.rsvp textarea::placeholder {
  color: var(--muted);
  opacity: .7
}

.rsvp input[type="text"]:focus,
.rsvp textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
}

.rsvp button {
  font-family: inherit;
  cursor: pointer
}

.rsvp .btn-primario {
  width: 100%;
  border: none;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15.5px;
  font-weight: 700;
  padding: 14px 20px;
  transition: filter .15s, transform .05s;
}

.rsvp .btn-primario:hover {
  filter: brightness(1.08)
}

.rsvp .btn-primario:active {
  transform: scale(.99)
}

.rsvp .btn-primario:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: none
}

.rsvp .btn-texto {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 16px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rsvp .btn-texto:hover {
  color: var(--ink)
}

/* stepper cantidad */
.rsvp .stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 20px;
  width: 180px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.rsvp .stepper button {
  flex: 0 0 52px;
  height: 52px;
  border: none;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
}

.rsvp .stepper button:disabled {
  opacity: .35;
  cursor: not-allowed
}

.rsvp .stepper .valor {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* lista de invitados */
.rsvp .lista-invitados {
  border-top: 1px solid var(--line);
  margin-top: 4px
}

.rsvp .fila-invitado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
}

.rsvp .fila-invitado .nombre-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0
}

.rsvp .fila-invitado .nombre {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsvp .lapiz {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  flex: 0 0 auto;
  padding: 2px;
  line-height: 1;
}

.rsvp .lapiz:hover {
  color: var(--accent)
}

.rsvp .nombre-input {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: 7px;
  padding: 5px 8px;
  min-width: 0;
  width: 100%;
  max-width: 190px;
}

.rsvp .nombre-input:focus {
  outline: none
}

.rsvp .estado-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--good);
  font-size: 13.5px;
  font-weight: 700;
  flex: 0 0 auto;
}

.rsvp .btn-responder {
  flex: 0 0 auto;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: none;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 16px;
}

.rsvp .btn-responder:hover {
  background: var(--accent-soft)
}

.rsvp .acciones-lista {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 26px;
  font-size: 13.5px;
  font-weight: 600;
}

.rsvp .acciones-lista button {
  background: none;
  border: none;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rsvp .acciones-lista button:hover {
  text-decoration: underline
}

.rsvp .acciones-lista button:disabled {
  opacity: .4;
  cursor: not-allowed;
  text-decoration: none
}

/* preguntas por invitado */
.rsvp .respondiendo-por {
  font-size: 15.5px;
  font-weight: 700;
  text-align: left;
  margin: 0 0 4px;
}

.rsvp .linea {
  border: none;
  border-top: 1px solid var(--line);
  margin: 18px 0 22px
}

.rsvp .pregunta {
  margin-bottom: 22px;
  animation: rsvp-aparecer .35s ease both
}

@keyframes rsvp-aparecer {
  from {
    opacity: 0;
    transform: translateY(6px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.rsvp .pregunta-num {
  font-size: 13.5px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #484848;
  ;
}

.rsvp .pregunta-num .req {
  color: var(--bad);
  font-weight: 700
}

.rsvp .opciones-si-no {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.rsvp .opcion-si-no {
  width: 100%;
  text-align: center;
  border: 1.5px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 18px;
  transition: border-color .15s, background .15s;
}

.rsvp .opcion-si-no:hover {
  border-color: var(--accent)
}

.rsvp .opcion-si-no.elegida {
  border-color: var(--ink);
  border-width: 2px;
  font-weight: 700;
}

.rsvp .opcion-si-no.elegida.si {
  border-color: var(--good);
  background: var(--good-soft);
  color: var(--good)
}

.rsvp .opcion-si-no.elegida.no {
  border-color: var(--bad);
  background: var(--bad-soft);
  color: var(--bad)
}

.rsvp .req-nota {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  margin: 16px 0 0
}

/* thank you */
.rsvp .icono-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--good-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.rsvp .icono-check svg {
  width: 26px;
  height: 26px
}

.rsvp .resumen-grupo {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 22px 0;
}

.rsvp .resumen-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 7px 0;
}

.rsvp .resumen-fila+.resumen-fila {
  border-top: 1px solid var(--line)
}

.rsvp .chip-estado {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.rsvp .chip-estado.si {
  background: var(--good-soft);
  color: var(--good)
}

.rsvp .chip-estado.no {
  background: var(--bad-soft);
  color: var(--bad)
}

.rsvp .estado-carga,
.rsvp .estado-error {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  padding: 40px 10px;
}

.rsvp .estado-error {
  color: var(--bad)
}

.rsvp [hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .rsvp .pregunta { animation: none; }
}
