/* Shared invite design. Colours come from EVENT.theme via CSS variables (set in app.js). */
:root {
  --bg: #FBF6EF;
  --card: #FFFFFF;
  --ink: #2B1D2E;
  --accent: #C2185B;
  --accent2: #F4B740;
  --muted: rgba(43, 29, 46, 0.62);
  --line: rgba(43, 29, 46, 0.12);
  --ok: #1E7B4C;
  --bad: #B3261E;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(43, 29, 46, 0.06), 0 8px 28px rgba(43, 29, 46, 0.08);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--body);
  overflow-x: hidden;
}
/* Subtle confetti dots in the theme colours */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    radial-gradient(circle at 12% 8%, var(--accent) 0 4px, transparent 5px),
    radial-gradient(circle at 86% 14%, var(--accent2) 0 6px, transparent 7px),
    radial-gradient(circle at 72% 42%, var(--accent) 0 3px, transparent 4px),
    radial-gradient(circle at 8% 58%, var(--accent2) 0 5px, transparent 6px),
    radial-gradient(circle at 92% 76%, var(--accent) 0 5px, transparent 6px),
    radial-gradient(circle at 24% 90%, var(--accent2) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 4%, var(--accent2) 0 3px, transparent 4px);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  display: grid;
  gap: 16px;
}

.banner {
  background: #FFF4C2;
  color: #5A4500;
  border: 1px solid #F1D46B;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  min-width: 0;
}
.card h2 {
  font: 600 20px/1.2 var(--display);
  margin: 0 0 14px;
}

/* Hero */
.hero { text-align: center; padding-top: 28px; }
.poster {
  margin: -8px -4px 18px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
}
.poster img { width: 100%; height: auto; }
.kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}
.title {
  font: 600 clamp(30px, 9vw, 40px)/1.08 var(--display);
  margin: 0 0 10px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hi { font: italic 500 20px/1.3 var(--display); margin: 0 0 4px; }
.host { color: var(--muted); margin: 0 0 12px; }
.chip {
  display: inline-block;
  background: var(--accent2);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 14px;
}
.message { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* Buttons */
.btn {
  appearance: none;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: 700 16px/1.2 var(--body);
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.block { width: 100%; }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 15px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn.wa { background: #1FA855; border-color: #1FA855; color: #fff; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent2);
  outline-offset: 2px;
}

.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle .btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.toggle .btn.decline[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.toggle .btn.decline { border-color: var(--ink); color: var(--ink); }

/* Form */
.form { display: grid; gap: 16px; margin-top: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
input[type="text"], select, textarea {
  width: 100%;
  font: 16px/1.4 var(--body);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  min-height: 48px;
  padding: 10px 12px;
}
textarea { min-height: 84px; resize: vertical; }

.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font: 700 24px/1 var(--body);
  cursor: pointer;
}
.stepper button[disabled] { opacity: 0.35; cursor: not-allowed; }
.stepper output { font: 600 26px/1 var(--display); min-width: 2ch; text-align: center; }

.error {
  color: var(--bad);
  background: rgba(179, 38, 30, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
}
.notice {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
}

/* Confirmation */
.done { text-align: center; }
.done .emoji { font-size: 48px; line-height: 1; margin-bottom: 8px; }
.done h2 { margin-bottom: 8px; }
.summary { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; gap: 6px; text-align: left; }
.summary li { background: rgba(0, 0, 0, 0.035); border-radius: 10px; padding: 8px 12px; overflow-wrap: anywhere; }
.summary b { font-weight: 700; }
.actions { display: grid; gap: 10px; }

/* Details */
.rows { display: grid; gap: 14px; margin: 0; }
.row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; min-width: 0; }
.row .ico { font-size: 20px; line-height: 1.3; }
.row dt { font-weight: 700; }
.row dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; white-space: pre-line; }
.row dd a { font-weight: 700; }
.cal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

/* Menu */
.menu-section + .menu-section { margin-top: 16px; }
.menu-section h3 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.dish { margin: 0 0 10px; }
.dish b { display: block; font: 600 17px/1.3 var(--display); }
.dish span { color: var(--muted); font-size: 15px; }

.foot { text-align: center; color: var(--muted); font-size: 13px; }

.busy::after {
  content: "";
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(0.96); opacity: 0.4; } to { transform: none; opacity: 1; } }
.pop { animation: pop 0.25s ease-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Send page */
.guest {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.guest:first-child { border-top: 0; }
.guest .name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.guest .sent { display: block; font-size: 13px; color: var(--ok); font-weight: 700; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; }
.inline > input { flex: 1 1 180px; }
.preview {
  background: #E7FFDB;
  color: #111;
  border-radius: 12px;
  padding: 12px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
}
@media (max-width: 380px) {
  .guest { grid-template-columns: 1fr 1fr; }
  .guest .name { grid-column: 1 / -1; }
}
