/* Balcony platform RSVP — shared styling for the guest RSVP section rendered by
   _platform/rsvp.js. Self-contained (all .brsvp-*), neutral, and readable on any
   template background. A template can override these vars/classes if it wants to
   theme the section, but it never has to. */

.brsvp {
  --brsvp-accent: #5F0FFF;
  --brsvp-ink: #2b2340;
  box-sizing: border-box;
  width: min(92vw, 520px);
  margin: 0 auto;
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  color: var(--brsvp-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}

.brsvp *,
.brsvp *::before,
.brsvp *::after { box-sizing: border-box; }

.brsvp__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 18px;
  color: var(--brsvp-accent);
}

/* Each event is its own column — name + date on top, the Yes / Maybe / No
   options stacked below it. Columns sit side by side and wrap once they run out
   of room, growing with however many events the host adds. */
.brsvp-events {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.brsvp-event {
  flex: 1 1 120px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.brsvp-event__head {
  margin-bottom: 12px;
  text-align: center;
}
.brsvp-event__name { display: block; font-size: 15px; font-weight: 700; }
.brsvp-event__date { display: block; margin-top: 2px; font-size: 12px; opacity: 0.6; }

.brsvp-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brsvp-opt {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  border: 1.5px solid rgba(95, 15, 255, 0.25);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.brsvp-opt input { accent-color: var(--brsvp-accent); }
.brsvp-opt:has(input:checked) {
  border-color: var(--brsvp-accent);
  background: rgba(95, 15, 255, 0.06);
}

/* One shared head-count for the whole invitation, shown only once at least one
   event is marked Yes or Maybe. */
.brsvp-headcount {
  display: block;
  margin-top: 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}
.brsvp-headcount input {
  width: 72px;
  margin-left: 8px;
  padding: 8px 10px;
  border: 1.5px solid rgba(95, 15, 255, 0.25);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.brsvp-headcount__hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.6;
}

/* Free-text message / wishes to the couple. */
.brsvp-message {
  display: block;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
}
.brsvp-message span { font-weight: 400; opacity: 0.6; }
.brsvp-message textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1.5px solid rgba(95, 15, 255, 0.25);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  resize: vertical;
}
.brsvp-message textarea:focus { outline: none; border-color: var(--brsvp-accent); }

.brsvp__error {
  margin: 12px 0 0;
  color: #c0392b;
  font-size: 13px;
}

.brsvp__submit,
.brsvp__change {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--brsvp-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.brsvp__change {
  margin-top: 14px;
  background: transparent;
  color: var(--brsvp-accent);
  border: 1.5px solid rgba(95, 15, 255, 0.35);
}

.brsvp__thanks { font-size: 15px; text-align: center; }
.brsvp__result-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.brsvp__result-list li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 14px;
}

/* Host edit/preview note */
.brsvp-note__lead { font-size: 13px; opacity: 0.7; text-align: center; margin: 0 0 12px; }
.brsvp-note__list { list-style: none; margin: 0; padding: 0; }
.brsvp-note__list li {
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 15px;
  font-weight: 600;
}
.brsvp-note__list li span { font-weight: 400; opacity: 0.6; }
.brsvp-note__empty { font-size: 13px; opacity: 0.6; text-align: center; margin: 0; }

/* Host inline "add event" form — shown in edit mode on plans that support RSVP,
   right where guests see the form. Uses the section's own accent so it belongs. */
.brsvp-note__add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.brsvp-note__name,
.brsvp-note__date {
  padding: 10px 12px;
  border: 1.5px solid rgba(95, 15, 255, 0.25);
  border-radius: 10px;
  font-size: 14px;
  color: var(--brsvp-ink);
  background: #fff;
}
.brsvp-note__name { flex: 1 1 160px; min-width: 0; }
.brsvp-note__name:focus,
.brsvp-note__date:focus { outline: none; border-color: var(--brsvp-accent); }
.brsvp-note__btn {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--brsvp-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Manage rows: each event with inline Edit / Delete (and an edit form). */
.brsvp-note__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brsvp-note__list .brsvp-note__evname { opacity: 1; font-weight: 600; }
.brsvp-note__evdate { font-size: 13px; }
.brsvp-note__list .brsvp-note__badge {
  opacity: 1;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.55);
  font-size: 11px;
  font-weight: 700;
}
.brsvp-note__list .brsvp-note__actions {
  opacity: 1;
  margin-left: auto;
  display: inline-flex;
  flex-shrink: 0;
  gap: 12px;
}
.brsvp-note__link {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--brsvp-accent);
  cursor: pointer;
}
.brsvp-note__del { color: #c0392b; }
.brsvp-note__edit-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.brsvp-note__edit-form input[type="text"],
.brsvp-note__edit-form input[type="date"] { font-weight: 400; }
.brsvp-note__shown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
}

/* ---- Host editing view: the guest form, mostly disabled, editable name/date ---- */
.brsvp-host__lead {
  font-size: 13px;
  opacity: 0.7;
  text-align: center;
  margin: 0 0 16px;
}
.brsvp-host__head {
  position: relative;
  display: block;
  text-align: center;
}
.brsvp-host__name,
.brsvp-host__date {
  display: block;
  width: 100%;
  text-align: center;
  border: 1px dashed rgba(95, 15, 255, 0.4);
  border-radius: 8px;
  background: #fff;
  color: var(--brsvp-ink);
}
.brsvp-host__name { padding: 6px 8px; font-size: 15px; font-weight: 700; }
.brsvp-host__date { margin-top: 6px; padding: 5px 8px; font-size: 12px; }
.brsvp-host__name:focus,
.brsvp-host__date:focus { outline: none; border-style: solid; border-color: var(--brsvp-accent); }
.brsvp-host__del {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  color: #c0392b;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
/* Options and the preview fields read as "not yours to edit". */
.brsvp-host .brsvp-opts { opacity: 0.6; }
.brsvp-host .brsvp-opt { cursor: default; }
.brsvp-host__preview { opacity: 0.55; }
.brsvp-host__preview input,
.brsvp-host__preview textarea { cursor: not-allowed; }
/* "+" add column — sits in the events row like another event column. */
.brsvp-host__add {
  flex: 1 1 120px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 1.5px dashed rgba(95, 15, 255, 0.4);
  border-radius: 12px;
  background: transparent;
  color: var(--brsvp-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.brsvp-host__add:hover { background: rgba(95, 15, 255, 0.05); }
.brsvp-host__plus { font-size: 30px; line-height: 1; font-weight: 400; }
