/* Free RSVP form (rsvp.js), styled like the paid checkout form in chabad-donations */

.cer-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(440px, calc(100vw - 32px));
  height: fit-content;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 0;
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.cer-dialog::backdrop {
  background: rgba(10, 20, 40, 0.55);
}

.cer-form {
  position: relative;
  padding: 28px 24px 20px;
  font-family: var(--font-body, inherit);
}

.cer-form [hidden] {
  display: none !important;
}

.cer-fields,
.cer-done {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cer-dialog .cer-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
}

.cer-title {
  margin: 0 0 4px;
  font-family: var(--font-heading, inherit);
  color: var(--color-primary-navy, #0b1f3a);
}

.cer-event {
  margin: 0 0 14px;
  color: #555;
}

.cer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cer-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.cer-dialog .cer-field input {
  padding: 10px 12px;
  border: 1px solid #d5d9e0;
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
}

/* Honeypot: hidden from people, filled in by bots */
.cer-website {
  position: absolute;
  left: -9999px;
}

.cer-error {
  margin: 0;
  color: #b42318;
  font-size: 0.9rem;
}

.cer-dialog .cer-submit {
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--color-primary-navy, #0b1f3a);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cer-dialog .cer-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.cer-done-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0b6b3a;
}

.cer-done-text {
  margin: 0;
  color: #444;
}

/* The event's own page */
.cer-details {
  margin: 0 0 24px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #f5f6f9;
}

.cer-details p {
  margin: 0 0 6px;
}

.cer-button {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--color-accent-orange, #f07b2e);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 480px) {
  .cer-row {
    grid-template-columns: 1fr;
  }
}
