/* ============ RSVP Modal ============ */
.rsvp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(42, 48, 34, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.rsvp-overlay.active {
  opacity: 1;
  visibility: visible;
}

.rsvp-modal {
  background: #f4efe4;
  width: 92%;
  max-width: 420px;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(40, 46, 34, 0.35);
  position: relative;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rsvp-overlay.active .rsvp-modal {
  transform: translateY(0) scale(1);
}

/* Header */
.rsvp-modal__header {
  background: #4a5340;
  padding: 28px 28px 24px;
  text-align: center;
}

.rsvp-modal__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 28px;
  color: #f4efe4;
  margin: 0;
}

.rsvp-modal__subtitle {
  font-family: 'Mulish', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: #cdd2bb;
  margin-top: 6px;
}

/* Close button */
.rsvp-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(244, 239, 228, 0.15);
  color: #f4efe4;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 1;
}

.rsvp-modal__close:hover {
  background: rgba(244, 239, 228, 0.3);
}

/* Body */
.rsvp-modal__body {
  padding: 28px 28px 32px;
  overflow-y: auto;
  flex: 1;
}

/* Form fields */
.rsvp-field {
  margin-bottom: 20px;
}

.rsvp-field label {
  display: block;
  font-family: 'Mulish', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a5340;
  margin-bottom: 8px;
}

.rsvp-field input {
  width: 100%;
  padding: 13px 16px;
  font-family: 'Mulish', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #4a5340;
  background: #faf6ec;
  border: 1px solid #d8d0bc;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rsvp-field input:focus {
  border-color: #8a936c;
  box-shadow: 0 0 0 3px rgba(138, 147, 108, 0.15);
}

.rsvp-field input::placeholder {
  color: #b0aa98;
}

.rsvp-field .rsvp-error-text {
  font-family: 'Mulish', sans-serif;
  font-size: 12px;
  color: #a0522d;
  margin-top: 6px;
  display: none;
}

.rsvp-field.has-error input {
  border-color: #a0522d;
}

.rsvp-field.has-error .rsvp-error-text {
  display: block;
}

/* Companions section */
.rsvp-companions-section {
  margin-bottom: 20px;
}

.rsvp-companions-toggle-field {
  margin-bottom: 14px;
}

.rsvp-companions-toggle-label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-family: 'Mulish', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #4a5340;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.5;
  margin-bottom: 0;
}

.rsvp-companions-toggle-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-width: 15px;
  flex: none;
  accent-color: #5a6347;
  cursor: pointer;
}

.rsvp-companions-list {
  padding: 16px;
  background: #faf6ec;
  border: 1px solid #e0d8c4;
  border-radius: 4px;
}

.rsvp-companion-entry {
  margin-bottom: 14px;
}

.rsvp-companion-entry:last-of-type {
  margin-bottom: 14px;
}

.rsvp-companion-entry label {
  display: block;
  font-family: 'Mulish', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5f6451;
  margin-bottom: 6px;
}

.rsvp-companion-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rsvp-companion-input-row input {
  flex: 1;
  padding: 11px 14px;
  font-family: 'Mulish', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #4a5340;
  background: #fff;
  border: 1px solid #d8d0bc;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rsvp-companion-input-row input:focus {
  border-color: #8a936c;
  box-shadow: 0 0 0 3px rgba(138, 147, 108, 0.15);
}

.rsvp-companion-input-row input::placeholder {
  color: #b0aa98;
}

.rsvp-companion-entry.has-error .rsvp-companion-input-row input {
  border-color: #a0522d;
}

.rsvp-companion-entry.has-error .rsvp-error-text {
  display: block;
}

.rsvp-remove-companion-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #d8d0bc;
  background: #fff;
  color: #a0522d;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  border-radius: 3px;
  cursor: pointer;
  flex: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rsvp-remove-companion-btn:hover {
  background: #fef2f2;
  border-color: #a0522d;
}

.rsvp-add-companion-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-family: 'Mulish', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #5a6347;
  background: transparent;
  border: 1px dashed #b8b3a0;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rsvp-add-companion-btn:hover {
  background: #f4efe4;
  border-color: #8a936c;
}

/* Privacy notice */
.rsvp-privacy {
  font-family: 'Mulish', sans-serif;
  font-size: 12px;
  line-height: 1.6;
  color: #6b6f5e;
  margin-bottom: 16px;
}

.rsvp-privacy a {
  color: #6e7857;
  text-decoration: underline;
}

/* Consent checkbox */
.rsvp-consent-field label.rsvp-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  font-family: 'Mulish', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #5f6451;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.5;
  margin-bottom: 0;
}

.rsvp-consent-field label.rsvp-consent-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-width: 15px;
  margin-top: 3px;
  flex: none;
  accent-color: #5a6347;
  cursor: pointer;
}

.rsvp-consent-field {
  margin-bottom: 20px;
}

/* Submit button */
.rsvp-submit {
  width: 100%;
  padding: 15px 24px;
  font-family: 'Mulish', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f4efe4;
  background: #5a6347;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  position: relative;
}

.rsvp-submit:hover {
  background: #4a5340;
  transform: translateY(-1px);
}

.rsvp-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner inside button */
.rsvp-submit .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(244, 239, 228, 0.3);
  border-top-color: #f4efe4;
  border-radius: 50%;
  animation: rsvpSpin 0.6s linear infinite;
  margin: 0 auto;
}

.rsvp-submit.loading .spinner {
  display: inline-block;
}

.rsvp-submit.loading .btn-text {
  visibility: hidden;
}

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

/* General error / success messages */
.rsvp-message {
  text-align: center;
  padding: 14px 16px;
  border-radius: 3px;
  font-family: 'Mulish', sans-serif;
  font-size: 14px;
  margin-bottom: 18px;
  display: none;
}

.rsvp-message.error {
  display: block;
  background: rgba(160, 82, 45, 0.1);
  color: #a0522d;
  border: 1px solid rgba(160, 82, 45, 0.2);
}

.rsvp-message.success {
  display: block;
  background: rgba(138, 147, 108, 0.12);
  color: #4a5340;
  border: 1px solid rgba(138, 147, 108, 0.25);
}

/* Success state (replaces form) */
.rsvp-success-view {
  text-align: center;
  padding: 10px 0;
  display: none;
}

.rsvp-success-view.active {
  display: block;
  animation: floatIn 0.6s ease both;
}

.rsvp-success-view .check-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #8a936c;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.rsvp-success-view .check-icon svg {
  width: 26px;
  height: 26px;
}

.rsvp-success-view h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 26px;
  color: #4a5340;
  margin: 0 0 8px;
}

.rsvp-success-view p {
  font-family: 'Mulish', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: #5f6451;
  line-height: 1.6;
}
