.rsvp-open {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.rsvp-open .ladi-button, .rsvp-open .ladi-headline { display: block; }

#rsvp-dialog {
  --wine: #71263a;
  box-sizing: border-box;
  width: min(430px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 16px;
  background: #fffcf7;
  color: #35262a;
  font: 15px/1.45 "Open Sans", sans-serif;
  box-shadow: 0 18px 65px #26141c44;
}
#rsvp-dialog::backdrop { background: rgb(37 20 26 / 62%); }
body:has(#rsvp-dialog[open]) { overflow: hidden; }
#rsvp-dialog *, #rsvp-dialog *::before { box-sizing: border-box; }

.rsvp-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 40px 20px 24px;
  background: var(--wine);
  color: #fffaf0;
}
.rsvp-signature {
  margin-bottom: 5px;
  color: #f1d8c7;
  font: clamp(19px, 5.3vw, 23px)/1.1 Allura, Georgia, serif;
  text-wrap: balance;
}
#rsvp-title {
  font: 40px/.99 Georgia, serif;
  letter-spacing: -1.3px;
  outline: none;
}
.rsvp-portrait {
  width: 84px;
  height: 108px;
  object-fit: cover;
  object-position: center 33%;
  border-radius: 48px 48px 3px 3px;
  border: 1px solid #d6b7a4;
  padding: 3px;
}
.rsvp-close {
  position: absolute;
  right: 1px;
  top: 1px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: #fffaf0;
  background: transparent;
  cursor: pointer;
  font: 25px/1 Arial, sans-serif;
}
#rsvp-form {
  display: grid;
  gap: 15px;
  padding: 22px 24px 24px;
}
.rsvp-field, .rsvp-attendance legend {
  font-weight: 600;
  font-size: 14px;
}
.rsvp-field { display: grid; gap: 5px; }
.rsvp-field small { color: #725d63; font-size: 12px; font-weight: normal; }
.rsvp-field input, .rsvp-field textarea {
  width: 100%;
  border: 1px solid #b9a8a4;
  border-radius: 7px;
  padding: 10px 12px;
  min-height: 44px;
  background: #fff;
  color: #35262a;
  font: 16px/1.4 "Open Sans", sans-serif;
}
.rsvp-field textarea { resize: vertical; }
.rsvp-field ::placeholder { color: #776869; }
.rsvp-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.rsvp-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid #b9a8a4;
  border-radius: 7px;
  background: white;
  font-size: 13px;
  cursor: pointer;
}
.rsvp-options input { width: 14px; height: 14px; accent-color: var(--wine); }
.rsvp-options label:has(:checked) { background: #f7e9ea; color: var(--wine); border-color: var(--wine); font-weight: 600; }
.rsvp-submit {
  width: 100%;
  min-height: 47px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--wine);
  font: 600 16px "Open Sans", sans-serif;
  cursor: pointer;
}
.rsvp-submit:hover { background: #592031; }
.rsvp-submit:disabled { opacity: .75; cursor: wait; }
#rsvp-dialog :is(input, textarea, button):focus-visible, .rsvp-open:focus-visible {
  outline: 3px solid #b47a3e;
  outline-offset: 2px;
}
#rsvp-feedback:not(:empty) { padding: 0 24px 20px; color: var(--wine); }
#rsvp-form[hidden] { display: none; }
#rsvp-form[hidden] + #rsvp-feedback { padding: 28px 24px; font: 22px/1.45 Georgia, serif; }
@media (max-width: 350px), (max-height: 620px) {
  .rsvp-header { padding-block: 14px; }
  #rsvp-title { font-size: 32px; }
  .rsvp-portrait { width: 62px; height: 80px; }
  #rsvp-form { padding: 16px; gap: 12px; }
}
