/*
 * RSVP page — luxury wedding styling.
 * Palette derived from the invitation artwork:
 *   deep emerald greens, gold accents, burgundy/rose accents, off-white cards.
 */

.rsvp-body {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background:
    radial-gradient(120% 90% at 88% -8%, rgba(201, 169, 106, 0.12), transparent 55%),
    radial-gradient(120% 95% at 8% 108%, rgba(164, 65, 79, 0.16), transparent 55%),
    linear-gradient(160deg, #14231b 0%, #0f1a13 55%, #18271d 100%);
  color: #f6f1e7;
  overflow-x: hidden;
}

.rsvp-shell {
  width: 100%;
  max-width: 560px;
  margin: auto;
}

.rsvp-card {
  position: relative;
  padding: clamp(26px, 6vw, 46px) clamp(18px, 5vw, 42px);
  background: linear-gradient(180deg, #fffdf7, #f7f1e6);
  border: 1px solid rgba(201, 169, 106, 0.45);
  border-radius: 26px;
  box-shadow: 0 44px 90px -34px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.rsvp-card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, transparent, #c9a96a, transparent);
}

/* ---------- steps ---------- */

.step {
  animation: step-in 0.5s ease both;
}

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

.step-center {
  text-align: center;
}

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

/* ---------- header ---------- */

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

.rsvp-title {
  font-family: "Amiri", "Tajawal", serif;
  font-weight: 700;
  font-size: clamp(30px, 7vw, 42px);
  color: #1d3327;
  margin: 0 0 10px;
}

.rsvp-sub {
  margin: 0;
  color: #5c6d64;
  font-size: clamp(14px, 3.8vw, 16px);
  font-weight: 500;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ornament::before,
.ornament::after {
  content: "";
  height: 1px;
  width: 64px;
}

.ornament::before {
  background: linear-gradient(90deg, transparent, #c9a96a);
}

.ornament::after {
  background: linear-gradient(90deg, #c9a96a, transparent);
}

.ornament .diamond {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: #c9a96a;
  opacity: 0.85;
}

/* ---------- choices ---------- */

.choice-grid {
  display: grid;
  gap: 14px;
}

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

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 20px 18px;
  border-radius: 18px;
  border: 1.5px solid transparent;
  font-family: "Tajawal", sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-align: right;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.choice:hover {
  transform: translateY(-3px);
}

.choice:active {
  transform: scale(0.98);
}

.choice-confirm {
  background: linear-gradient(135deg, #2e5740, #1a2f24);
  color: #f6f1e7;
  border-color: rgba(201, 169, 106, 0.5);
  box-shadow: 0 18px 34px -18px rgba(20, 35, 27, 0.75);
}

.choice-decline {
  background: #fffdf7;
  color: #8c2f3d;
  border-color: rgba(140, 47, 61, 0.35);
  box-shadow: 0 16px 30px -20px rgba(140, 47, 61, 0.4);
}

.choice-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.choice-confirm .choice-icon {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(201, 169, 106, 0.55);
}

.choice-decline .choice-icon {
  background: rgba(140, 47, 61, 0.1);
  border: 1px solid rgba(140, 47, 61, 0.35);
}

.choice-icon svg {
  width: 22px;
  height: 22px;
}

/* ---------- name step ---------- */

.step-title {
  font-family: "Amiri", "Tajawal", serif;
  font-weight: 700;
  font-size: clamp(22px, 5.4vw, 28px);
  color: #1d3327;
  text-align: center;
  margin: 0 0 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  margin: 0 0 24px;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
}

.status-pill.status-confirmed {
  background: rgba(46, 87, 64, 0.12);
  color: #1d5b3c;
  border: 1px solid rgba(46, 87, 64, 0.28);
}

.status-pill.status-declined {
  background: rgba(140, 47, 61, 0.1);
  color: #8c2f3d;
  border: 1px solid rgba(140, 47, 61, 0.28);
}

#stepName .status-pill {
  display: flex;
  justify-content: center;
  margin-inline: auto;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #3b4b43;
  margin-bottom: 8px;
}

#guestName {
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1.5px solid #d8d1c0;
  background: #ffffff;
  font-size: 16px;
  color: #20302a;
  text-align: right;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

#guestName::placeholder {
  color: #9a9387;
}

#guestName:focus {
  outline: none;
  border-color: #2e5740;
  box-shadow: 0 0 0 4px rgba(46, 87, 64, 0.16);
}

#guestName[aria-invalid="true"] {
  border-color: #a4414f;
  box-shadow: 0 0 0 4px rgba(164, 65, 79, 0.13);
}

.field-error {
  color: #a4414f;
  font-size: 13.5px;
  margin: 10px 4px 0;
  font-weight: 500;
}

/* honeypot: invisible to humans */
.honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- primary button ---------- */

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 15px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2e5740, #1a2f24);
  color: #f8f4ea;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 16px 30px -14px rgba(20, 35, 27, 0.8);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px -16px rgba(20, 35, 27, 0.9);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- loading ---------- */

.spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 3px solid rgba(46, 87, 64, 0.18);
  border-top-color: #2e5740;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- error ---------- */

.error-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(164, 65, 79, 0.12);
  color: #a4414f;
}

.error-icon svg {
  width: 26px;
  height: 26px;
}

/* ---------- success ---------- */

.success-icon {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.success-check {
  background: radial-gradient(circle at 30% 30%, #3a6b4c, #1d3327);
  border: 2px solid rgba(201, 169, 106, 0.6);
  box-shadow: 0 24px 48px -20px rgba(20, 35, 27, 0.7);
}

.success-decline {
  background: radial-gradient(circle at 30% 30%, #b05461, #8c2f3d);
  border: 2px solid rgba(201, 169, 106, 0.45);
  box-shadow: 0 24px 48px -20px rgba(140, 47, 61, 0.55);
}

.success-icon svg {
  width: 50px;
  height: 50px;
}

.success-icon circle {
  fill: none;
  stroke: #c9a96a;
  stroke-width: 2.5;
}

.success-icon path {
  fill: none;
  stroke: #f8f4ea;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* draw-on animation */
@media (prefers-reduced-motion: no-preference) {
  .success-icon.animate {
    animation: success-pop 0.5s 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
  }

  .success-icon.animate circle {
    stroke-dasharray: 63;
    stroke-dashoffset: 63;
    animation: draw 0.7s ease-out forwards;
  }

  .success-icon.animate path {
    stroke-dasharray: 18.5;
    stroke-dashoffset: 18.5;
    animation: draw 0.5s 0.6s ease-out forwards;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes success-pop {
  from {
    transform: scale(0.55);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-family: "Amiri", "Tajawal", serif;
  font-weight: 700;
  font-size: clamp(24px, 6vw, 32px);
  color: #1d3327;
  margin-bottom: 8px;
}

.success-sub {
  margin: 0 0 24px;
  color: #5c6d64;
  font-size: 15.5px;
  font-weight: 500;
}

.btn-back {
  background: transparent;
  border: 1.5px solid rgba(46, 87, 64, 0.35);
  color: #2e5740;
  padding: 11px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-back:hover {
  background: rgba(46, 87, 64, 0.07);
  transform: translateY(-2px);
}

.btn-back:active {
  transform: scale(0.98);
}
