/* ============================================================
   12-RSVP.css — CONFIRMA TU ASISTENCIA (formulario)
   ============================================================
   Sección con encabezado y formulario para que los invitados
   confirmen su asistencia: nombre, asistencia, restricciones, etc.
   ============================================================ */

.rsvp { text-align: center; }

/* Encabezado de la sección */
.rsvp__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.9rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.rsvp__icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  /* Convierte el PNG negro a blanco para que contraste con el fondo dorado */
  filter: brightness(0) invert(1);
}
.rsvp__title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.rsvp__title::after { display: none; }
.rsvp__subtitle {
  font-family: var(--script);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--accent);
  line-height: 1;
  margin: 0.4rem 0 1.5rem;
}
.rsvp__intro {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 2rem;
}
.rsvp__pase {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2rem;
}
.rsvp__pase strong {
  color: var(--ink);
  font-weight: 500;
}

/* FORMULARIO */
.rsvp__form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 540px;
  margin: 0 auto;
  text-align: left;
}
.rsvp__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Wrapper de los campos de acompañante (solo visible en URL ?p=1) */
.rsvp__plusone {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.rsvp__plusone[hidden] {
  display: none;
}
.rsvp__field-label {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: none;
}
.rsvp__form input,
.rsvp__form select,
.rsvp__form textarea {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  padding: 0.85rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rsvp__form textarea {
  border-radius: 18px;
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}
.rsvp__form input::placeholder,
.rsvp__form textarea::placeholder {
  color: var(--accent);
  opacity: 0.55;
}
.rsvp__form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23b08d57' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  padding-right: 2.5rem;
  color: var(--accent);
}
.rsvp__form input:focus,
.rsvp__form select:focus,
.rsvp__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.12);
}

.rsvp__submit {
  align-self: center;
  margin-top: 1rem;
  padding: 0.85rem 2.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
}
.rsvp__submit:hover { background: var(--ink); }

.rsvp__msg {
  text-align: center;
  font-size: 0.9rem;
  color: var(--accent);
  min-height: 1.2rem;
  margin-top: 0.5rem;
}

/* ────────────────────────────────────────────────────────────
   MÓVIL — la mayoría confirma desde el celular, así que el
   formulario se optimiza para pantallas chicas:
   - encabezado más compacto para llegar antes a los campos
   - botón "Enviar" a todo el ancho = objetivo de toque claro
   - campos cómodos para el pulgar
   ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .rsvp__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 0.7rem;
  }
  .rsvp__icon img { width: 34px; height: 34px; }

  .rsvp__title { letter-spacing: 0.22em; }
  .rsvp__subtitle { margin-bottom: 1.1rem; }

  .rsvp__intro,
  .rsvp__pase { margin-bottom: 1.4rem; }

  .rsvp__form { gap: 0.95rem; }

  /* Campos un poco más altos: más fáciles de tocar con el pulgar */
  .rsvp__form input,
  .rsvp__form select,
  .rsvp__form textarea {
    padding: 0.95rem 1.1rem;
  }

  /* Botón a todo el ancho y bien alto: el call-to-action principal */
  .rsvp__submit {
    align-self: stretch;
    width: 100%;
    padding: 1.05rem 2rem;
  }
}

/* ────────────────────────────────────────────────────────────
   MODO DEMO (landing) — activado con ?demo=1 (ver script.js).
   La confirmación se ve completa pero queda deshabilitada:
   los campos se atenúan y un aviso explica que es un ejemplo.
   ──────────────────────────────────────────────────────────── */
.rsvp__form--demo input,
.rsvp__form--demo select,
.rsvp__form--demo textarea,
.rsvp__form--demo .rsvp__submit {
  opacity: 0.5;
  cursor: not-allowed;
}
.rsvp__form--demo .rsvp__msg {
  opacity: 1;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  background: rgba(176, 141, 87, 0.06);
}
