/* KC-RSVP Diamond · Boleto de la noche vaquera (Azula XV)
   Viste los nodos que arma gala-rsvp-bridge.ts en KC-Center: placa de reserva, campos extra, pase y despedida.
   El formulario vive dentro de la card de pergamino (tinta sobre papel); el pase es la noche marina con canto de oro,
   la herradura arriba y el nombre del invitado en la letra del «SE BUSCA» del Gate.
   Todo va anclado a #rsvp, salvo .kc-rsvp-capture-clean, que el bridge pone en <html> antes de rasterizar el PNG.
   Sin KC-Center estos nodos no existen y nada de esto pinta. Rutas url() directas (no dentro de custom properties). */

#rsvp {
  --dm-oro-metal: linear-gradient(135deg, #F3DFA6 0%, #E8CF8E 30%, #B8862F 62%, #E8CF8E 100%);
  --dm-grabado: 0 1px 0 rgba(255, 250, 235, .7);
}

/* ══════════ Placa de reserva: el nombre del invitado, como en el cartel del Gate ══════════ */
#rsvp .kc-rsvp-reservation {
  position: relative;
  max-width: 420px;
  margin: var(--kc-space-3) auto var(--kc-space-4);
  padding: 30px 20px 22px;
  border: 1px solid rgba(184, 134, 47, .75);
  background: rgba(255, 250, 235, .55);
  color: var(--an-ink);
  text-align: center;
  box-shadow: inset 0 0 0 4px rgba(255, 250, 235, .6), inset 0 0 0 5px rgba(31, 68, 163, .35);
}
/* Clavo de oro arriba: de ahí cuelga la placa */
#rsvp .kc-rsvp-reservation::before {
  content: ''; position: absolute; left: 50%; top: -7px;
  width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F3DFA6, #B8862F 70%, #7A5A1E);
  box-shadow: 0 2px 3px rgba(10, 20, 48, .45);
}
#rsvp .kc-rsvp-reservation-eyebrow {
  margin: 0;
  font-family: var(--an-font-western); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; text-wrap: balance;
  color: var(--an-rey);
}
#rsvp .kc-rsvp-reservation-name {
  margin: .22em 0 .2em;
  font-family: var(--an-font-western); font-size: clamp(1.45rem, 6.2vw, 1.8rem); line-height: 1.15; letter-spacing: .03em;
  color: var(--an-medianoche);
  overflow-wrap: anywhere; text-wrap: balance;
}
#rsvp .kc-rsvp-reservation-passes,
#rsvp .kc-rsvp-ticket-host .kc-ticket-passes {
  display: inline-block; margin: 0; padding: 7px 16px;
  border: 1px solid #B8862F;
  background: rgba(232, 207, 142, .22);
  font-family: var(--an-font-western); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  color: var(--an-medianoche);
}

/* ══════════ Campos que suma el bridge: tinta sobre pergamino ══════════ */
#rsvp .kc-rsvp-extra { margin-top: var(--kc-space-3); }
#rsvp .kc-rsvp-field-group { margin-bottom: var(--kc-space-4); }
#rsvp .kc-rsvp-field-group label {
  display: block; margin-bottom: var(--kc-space-2);
  color: var(--an-ink); font-size: 1rem; font-weight: 600;
}
#rsvp .kc-rsvp-field-group input,
#rsvp .kc-rsvp-field-group textarea {
  display: block; width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid rgba(31, 68, 163, .55); border-radius: var(--kc-radius-md);
  background: rgba(255, 250, 235, .7); color: var(--an-ink);
  font-family: var(--kc-font-body); font-size: 16px; line-height: 1.5;
  -webkit-appearance: none; appearance: none;
}
#rsvp .kc-rsvp-field-group textarea { min-height: 96px; resize: vertical; }
#rsvp .kc-rsvp-field-group :is(input, textarea)::placeholder { color: rgba(20, 26, 46, .5); font-style: italic; }
#rsvp .kc-rsvp-field-group :is(input, textarea):focus-visible { outline: 2px solid var(--an-rey); outline-offset: 2px; }
/* Adultos y niños: controles claros, como botones de la noche marina. */
#rsvp .kc-rsvp-headcount-title {
  margin: 0 0 var(--kc-space-3);
  color: var(--an-ink); font-size: 1rem; font-weight: 600;
}
#rsvp .kc-rsvp-headcount-cells { display: grid; /* Cada celda pide 124px (44+4+28+4+44): en tarjetas angostas (320px) se apilan en vez de encimarse. */
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: var(--kc-space-3); }
#rsvp .kc-rsvp-headcount-cell { min-width: 0; text-align: center; }
#rsvp .kc-rsvp-headcount input[type="hidden"] { display: none; }
#rsvp .kc-rsvp-headcount-label {
  display: block; margin-bottom: var(--kc-space-2);
  font-family: var(--an-font-western); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--an-rey);
}
#rsvp .kc-rsvp-headcount-stepper { display: flex; align-items: center; justify-content: center; gap: 4px; }
#rsvp .kc-rsvp-headcount-btn {
  display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0;
  border: 1px solid #B8862F; border-radius: 50%;
  background: linear-gradient(180deg, #1F44A3, #13285C); color: var(--an-parchment);
  font-size: 1.3rem; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(232, 207, 142, .55);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer; transition: transform .14s var(--kc-ease);
}
#rsvp .kc-rsvp-headcount-btn:disabled { opacity: .35; cursor: default; }
#rsvp .kc-rsvp-headcount-btn:focus-visible { outline: 2px solid var(--an-rey); outline-offset: 2px; }
#rsvp .kc-rsvp-headcount-btn:active:not(:disabled) { transform: scale(.94); }
#rsvp .kc-rsvp-headcount-value {
  min-width: 2ch; text-align: center;
  font-family: var(--an-font-western); font-size: 1.6rem; color: var(--an-medianoche);
}
#rsvp #kc-rsvp-headcount-total,
#rsvp #kc-rsvp-x-children_count-hint {
  margin: var(--kc-space-2) 0 0; color: var(--an-ink-soft); font-style: italic; font-size: .95rem;
}
#rsvp #kc-rsvp-headcount-total,
#rsvp #kc-rsvp-x-children_count-hint { text-align: center; }

/* ══════════ Confirmar / Actualizar ══════════ */
#rsvp #kc-rsvp-submit,
#rsvp .kc-rsvp-update {
  display: block; width: 100%; min-height: 52px; margin-top: var(--kc-space-4);
  border: 1px solid var(--an-medianoche); border-radius: var(--kc-radius-md);
  background: linear-gradient(180deg, #1F44A3, #13285C);
  color: var(--an-parchment);
  font-family: var(--an-font-western); font-size: .9rem; letter-spacing: .14em; text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(232, 207, 142, .55), 0 6px 14px rgba(10, 20, 48, .35);
  cursor: pointer;
  transition: transform .18s var(--kc-ease);
}
#rsvp #kc-rsvp-submit:active:not(:disabled), #rsvp .kc-rsvp-update:active { transform: scale(.98); }
#rsvp #kc-rsvp-submit:focus-visible, #rsvp .kc-rsvp-update:focus-visible { outline: 2px solid var(--an-rey); outline-offset: 3px; }
#rsvp form[aria-busy="true"] #kc-rsvp-submit {
  cursor: progress;
  background: linear-gradient(105deg, #13285C 0%, #13285C 38%, #2D55B8 50%, #13285C 62%, #13285C 100%) 0 0 / 260% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  #rsvp form[aria-busy="true"] #kc-rsvp-submit { animation: anBrilloEspera 1.4s linear infinite; }
}
@keyframes anBrilloEspera { from { background-position: 100% 0; } to { background-position: -160% 0; } }
#rsvp .kc-rsvp-update { max-width: 400px; margin-inline: auto; background: transparent; color: var(--an-medianoche); box-shadow: inset 0 0 0 1px rgba(184, 134, 47, .8); }

/* ══════════ El pase: boleto de la noche marina con canto de oro ══════════ */
#rsvp .kc-rsvp-ticket-host { max-width: 400px; margin: var(--kc-space-4) auto 0; text-align: center; }
#rsvp .kc-rsvp-ticket-host .kc-ticket {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 0; padding: 66px 24px 28px;
  border-radius: 10px;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(143, 166, 214, .28), rgba(143, 166, 214, 0) 70%),
    radial-gradient(1.5px 1.5px at 18% 14%, rgba(232, 207, 142, .9), transparent 2px),
    radial-gradient(1.5px 1.5px at 82% 22%, rgba(143, 166, 214, .9), transparent 2px),
    radial-gradient(1px 1px at 70% 8%, rgba(232, 207, 142, .8), transparent 2px),
    linear-gradient(180deg, #13285C 0%, #0A1430 100%);
  color: var(--an-parchment);
  /* Doble filete: oro por fuera, cielo por dentro, como el canto de la placa de música */
  box-shadow:
    inset 0 0 0 6px #0A1430, inset 0 0 0 7px rgba(232, 207, 142, .85),
    inset 0 0 0 10px #0A1430, inset 0 0 0 11px rgba(143, 166, 214, .45),
    0 4px 10px rgba(10, 20, 48, .35), 0 22px 48px rgba(10, 20, 48, .45);
}
/* La herradura cuelga arriba del pase (la suerte no se cae) */
#rsvp .kc-rsvp-ticket-host .kc-ticket::before {
  content: ''; position: absolute; left: 50%; top: 16px; z-index: 2;
  width: 36px; height: 40px; margin-left: -18px;
  /* SVG en data URI: sobrevive a la captura PNG (una url externa en un pseudo se pierde en dom-to-image) */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 132'%3E%3Cdefs%3E%3ClinearGradient id='o' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23F3DFA6'/%3E%3Cstop offset='.5' stop-color='%23E8CF8E'/%3E%3Cstop offset='1' stop-color='%23B8862F'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M8 8H34L35 14V70A25 25 0 0 0 85 70V14L86 8H112L110 14V70A50 50 0 0 1 10 70V14Z' fill='url(%23o)' stroke='%237A5A1E' stroke-width='2.5' stroke-linejoin='round'/%3E%3Cg fill='%230A1430' fill-opacity='.75'%3E%3Crect x='19' y='26' width='5' height='10' rx='2'/%3E%3Crect x='19' y='48' width='5' height='10' rx='2'/%3E%3Crect x='96' y='26' width='5' height='10' rx='2'/%3E%3Crect x='96' y='48' width='5' height='10' rx='2'/%3E%3Crect x='30' y='96' width='5' height='10' rx='2' transform='rotate(-40 32 101)'/%3E%3Crect x='85' y='96' width='5' height='10' rx='2' transform='rotate(40 88 101)'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
#rsvp .kc-rsvp-ticket-host .kc-ticket-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; border-radius: inherit; }
#rsvp .kc-rsvp-ticket-host .kc-tp { display: none; }
#rsvp .kc-rsvp-ticket-host .kc-ticket-particles::after {
  content: ''; position: absolute; inset: -10% -60%;
  background: linear-gradient(105deg, transparent 42%, rgba(232, 207, 142, .35) 50%, transparent 58%);
  transform: translateX(-100%); opacity: 0;
}
#rsvp .kc-rsvp-ticket-host .kc-ticket > :not(.kc-ticket-particles) { position: relative; z-index: 2; }

#rsvp .kc-ticket-header { margin: 0 0 8px; }
#rsvp .kc-ticket-crown-ornament {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--an-font-western); font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; white-space: nowrap;
  color: var(--an-champan);
}
#rsvp .kc-ticket-crown-ornament::before,
#rsvp .kc-ticket-crown-ornament::after { content: ''; width: 22px; height: 1px; background: linear-gradient(90deg, transparent, var(--an-champan)); }
#rsvp .kc-ticket-crown-ornament::after { transform: scaleX(-1); }
#rsvp .kc-ticket-status { margin: 0; font-family: var(--an-font-serif); font-style: italic; font-size: 1.02rem; color: var(--an-cielo); }
#rsvp .kc-ticket-event {
  margin: 6px 0 0;
  font-family: var(--an-font-western); font-weight: 400; font-size: clamp(1.9rem, 8.6vw, 2.4rem); line-height: 1.1;
  color: var(--an-parchment); text-shadow: 0 2px 0 rgba(10, 20, 48, .8);
  overflow-wrap: anywhere; text-wrap: balance;
}
#rsvp .kc-ticket-celebrant {
  margin: 6px 0 0;
  font-family: var(--an-font-western); font-size: .7rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--an-champan);
}
/* Regla con estrella de oro (el texto del contrato queda como respaldo invisible) */
#rsvp .kc-ticket-rule {
  position: relative; width: 210px; height: 11px; margin: 18px auto;
  background: linear-gradient(to right, transparent, var(--an-oro-viejo) 20%, var(--an-champan) 50%, var(--an-oro-viejo) 80%, transparent) center / 100% 1px no-repeat;
}
#rsvp .kc-ticket-rule span {
  display: block; width: 11px; height: 11px; margin: 0 auto;
  overflow: hidden; font-size: 0; color: transparent;
  background: var(--an-champan);
  clip-path: polygon(50% 0, 61% 36%, 100% 38%, 69% 60%, 80% 100%, 50% 76%, 20% 100%, 31% 60%, 0 38%, 39% 36%);
}
#rsvp .kc-ticket-guest-label {
  margin: 0;
  font-family: var(--an-font-western); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--an-cielo);
}
#rsvp .kc-ticket-guest {
  margin: 6px 0 12px;
  font-family: var(--an-font-western); font-size: clamp(1.7rem, 7.4vw, 2.1rem); line-height: 1.15;
  color: var(--an-champan); text-shadow: 0 2px 0 rgba(10, 20, 48, .8);
  overflow-wrap: anywhere; text-wrap: balance;
}
#rsvp .kc-rsvp-ticket-host .kc-ticket-passes { color: var(--an-parchment); border-color: rgba(232, 207, 142, .8); background: rgba(232, 207, 142, .12); }
#rsvp .kc-ticket-date {
  margin: 14px 0 0;
  font-family: var(--an-font-western); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--an-parchment);
}
/* QR: panel de pergamino limpio con canto de oro. Los módulos no se tocan. */
#rsvp .kc-ticket-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 20px auto 0; }
#rsvp .kc-ticket-qr-frame {
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; width: 206px; height: 206px; padding: 0;
  border: 1px solid #B8862F; border-radius: 4px; background: #F2E6CC;
  box-shadow: 0 0 0 3px #0A1430, 0 0 0 4px rgba(232, 207, 142, .85), 0 10px 22px rgba(0, 0, 0, .35);
}
#rsvp .kc-ticket-qr-img { display: block; width: 180px; height: 180px; }
#rsvp .kc-ticket-qr-img svg { display: block; width: 100%; height: 100%; }
#rsvp .kc-ticket-qr-hint {
  margin: 0;
  font-family: var(--an-font-serif); font-style: italic; font-size: .9rem;
  color: var(--an-cielo);
}
#rsvp .kc-ticket-id {
  margin: 14px 0 0;
  font-family: var(--an-font-western); font-size: .56rem; letter-spacing: .2em; text-transform: uppercase; font-variant-numeric: tabular-nums;
  color: rgba(242, 230, 204, .72);
}
#rsvp .kc-ticket-brand {
  margin: 8px 0 0;
  font-family: var(--an-font-western); font-size: .5rem; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(143, 166, 214, .75);
}
/* Guardar pase: placa de oro (no entra a la captura) */
#rsvp .kc-ticket-share { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
#rsvp .kc-ticket-share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: min(100%, 17rem); min-height: 50px; padding: 12px 24px;
  border: 0; border-radius: var(--kc-radius-md);
  background: var(--dm-oro-metal);
  color: var(--an-medianoche);
  font-family: var(--an-font-western); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 250, 232, .7), inset 0 -2px 3px rgba(90, 66, 26, .35), 0 8px 18px rgba(10, 20, 48, .35);
  cursor: pointer;
}
#rsvp .kc-ticket-share-btn:focus-visible { outline: 2px solid var(--an-rey); outline-offset: 3px; }
#rsvp .kc-ticket-share-btn:active { transform: scale(.98); }
#rsvp .kc-ticket-share .kc-open-reload { background: transparent; color: var(--an-medianoche); box-shadow: inset 0 0 0 1px rgba(184, 134, 47, .8); }

/* La apertura: el boleto baja colgado de la herradura y pasa un brillo de oro. Una sola vez. */
@media (prefers-reduced-motion: no-preference) {
  #rsvp .kc-rsvp-ticket-host .kc-ticket { animation: anBoletoCuelga 1.1s cubic-bezier(.22, 1, .36, 1) both; transform-origin: 50% 0; }
  #rsvp .kc-rsvp-ticket-host .kc-ticket-particles::after { animation: anBrilloOro 1.5s ease-in-out .9s both; }
  #rsvp .kc-ticket-share { animation: anSubeSuave .6s var(--kc-ease) 1s both; }
}
@keyframes anBoletoCuelga {
  0% { opacity: 0; transform: translateY(-14px) rotate(-3deg); }
  55% { opacity: 1; transform: translateY(2px) rotate(1.2deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes anBrilloOro { 0% { transform: translateX(-100%); opacity: 1; } 100% { transform: translateX(100%); opacity: 1; } }
@keyframes anSubeSuave { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ══════════ Despedida (declinó): pergamino con canto marino, sin QR ══════════ */
#rsvp .kc-rsvp-farewell {
  max-width: 400px; margin: var(--kc-space-4) auto 0; padding: 26px 22px;
  border: 1px solid rgba(31, 68, 163, .55);
  background: rgba(255, 250, 235, .55);
  text-align: center; color: var(--an-ink);
  box-shadow: inset 0 0 0 4px rgba(255, 250, 235, .6), inset 0 0 0 5px rgba(184, 134, 47, .5);
}
#rsvp .kc-rsvp-farewell-eyebrow { margin: 0; font-family: var(--an-font-western); font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--an-rey); }
#rsvp .kc-rsvp-farewell-guest { margin: 10px 0 6px; font-family: var(--an-font-western); font-size: clamp(1.4rem, 6vw, 1.7rem); line-height: 1.15; letter-spacing: .03em; color: var(--an-medianoche); overflow-wrap: anywhere; }
#rsvp .kc-rsvp-farewell-body { margin: 0; font-family: var(--an-font-serif); font-style: italic; font-size: 1.08rem; line-height: 1.55; }
#rsvp .kc-rsvp-farewell-brand { margin: 14px 0 0; font-family: var(--an-font-western); font-size: .5rem; letter-spacing: .22em; text-transform: uppercase; opacity: .6; }

/* ══════════ Galería (la inyecta KC-Center en #captura) ══════════ */
#captura .kc-gallery-cta__link {
  border: 1px solid rgba(232, 207, 142, .8); border-radius: var(--kc-radius-md);
  background: rgba(10, 20, 48, .5); color: var(--an-parchment); opacity: 1;
  font-family: var(--an-font-western); letter-spacing: .14em; text-transform: uppercase;
}

/* ══════════ Captura del PNG: sin sombras exteriores, sin animación, sin filtros, sin spread ══════════ */
.kc-rsvp-capture-clean #rsvp .kc-rsvp-ticket-host .kc-ticket {
  animation: none !important; transform: none !important;
  outline: 1px solid rgba(232, 207, 142, .85); outline-offset: -8px;
  box-shadow: none !important;
}
.kc-rsvp-capture-clean #rsvp .kc-ticket-particles { display: none !important; }
.kc-rsvp-capture-clean #rsvp .kc-ticket-qr-frame { box-shadow: none !important; outline: 1px solid rgba(232, 207, 142, .85); outline-offset: 3px; }
