/* The invitation as a guest sees it: the cover, the details, and the reply. */

body.fw-invite-page {
  background-color: var(--board-paper, #f7f1e8);
  background-image: var(--kb-background-url);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body.fw-invite-page .hero-shell {
  display: none;
}

.fw-invite {
  width: min(620px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.fw-invite-card {
  overflow: hidden;
  border-radius: 26px;
  background: var(--white);
  box-shadow: 0 26px 60px rgba(42, 16, 59, 0.24);
}

/* The envelope arrives, opens, and the invitation rises out of it and stays
   shut — the details and the reply are on the page under it. The stage breaks
   out of the narrow column so the envelope has room. */
.fw-invite-stage {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: min(84svh, 740px);
  min-height: 420px;
  display: flex;
  margin-bottom: 8px;
}

/* In the landing's frame the stage is the whole page. */
body.fw-unwrap-embed .fw-invite {
  width: 100%;
  padding: 0;
}

body.fw-unwrap-embed .fw-invite-stage {
  width: 100%;
  height: 100svh;
  min-height: 0;
  margin: 0;
}

body.fw-invite-unwrap .flip-btn {
  display: none;
}

body.fw-invite-unwrap .fw-unwrap-env[data-open-mode="still"] .pb-leaf-inner-a,
body.fw-invite-unwrap .fw-unwrap-env[data-open-mode="still"] .pb-leaf-inner-b {
  visibility: hidden;
}

body.fw-invite-unwrap .base-card {
  cursor: default;
}

.fw-invite-body {
  padding: 26px 26px 30px;
}

.fw-invite-body h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.14;
  text-align: center;
}

.fw-invite-details {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #fdf6f8;
}

.fw-invite-details > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.fw-invite-details dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.fw-invite-details dd {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.fw-invite-note {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

/* ------------------------------------------------------------------- rsvp */

.fw-rsvp {
  padding: 22px 20px 24px;
  border-radius: 20px;
  border: 1px solid rgba(42, 16, 59, 0.1);
  background: var(--white);
  box-shadow: 0 10px 26px rgba(42, 16, 59, 0.06);
}

.fw-rsvp h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  text-align: center;
}

.fw-rsvp-thanks {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #e8f6ee;
  color: #1f5b3a;
  font-size: 15px;
  text-align: center;
}

.fw-rsvp-form {
  display: grid;
  gap: 14px;
}

.fw-rsvp-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fw-rsvp-pick {
  position: relative;
  display: block;
  cursor: pointer;
}

.fw-rsvp-pick input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.fw-rsvp-pick span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 2px solid rgba(42, 16, 59, 0.14);
  background: var(--white);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.fw-rsvp-pick:hover span {
  border-color: rgba(42, 16, 59, 0.3);
}

.fw-rsvp-pick input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.fw-rsvp-pick--yes input:checked + span {
  border-color: #2fbf71;
  background: #e8f6ee;
  color: #14603c;
}

.fw-rsvp-pick--maybe input:checked + span {
  border-color: var(--gold-deep);
  background: #fdf3d9;
  color: #6b4a00;
}

.fw-rsvp-pick--no input:checked + span {
  border-color: #c2506a;
  background: #fbe9ee;
  color: #7c1f38;
}

.fw-rsvp-extras select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(42, 16, 59, 0.16);
  background: var(--white);
  font: inherit;
  font-size: 16px;
}

.fw-rsvp-form .btn {
  padding: 15px 24px;
  font-size: 17px;
}

.fw-rsvp-small {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* ------------------------------------------------------------- host bits */

.fw-invite-host,
.fw-invite-going {
  margin: 20px 0 0;
  text-align: center;
}

.fw-invite-host-line {
  margin: 0 0 12px;
  font-size: 17px;
}

.fw-invite-going {
  font-size: 15px;
  color: var(--muted);
}

.fw-invite-made {
  margin: 22px 0 0;
  font-size: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 10px rgba(42, 16, 59, 0.4);
}

.fw-invite-made a {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .fw-invite-body {
    padding: 20px 18px 24px;
  }

  .fw-rsvp {
    padding: 18px 15px 20px;
  }

  .fw-rsvp-picks {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fw-rsvp-pick span {
    min-height: 48px;
  }

  .fw-invite-details > div {
    grid-template-columns: 56px minmax(0, 1fr);
  }
}

.fw-guest-list,
.fw-gifts {
  margin-top: 28px;
}

.fw-guest-list h2,
.fw-gifts h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 22px;
}

.fw-guest-list ul,
.fw-gifts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.fw-guest-list li,
.fw-gifts li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(42, 16, 59, 0.08);
}

.fw-gifts li span,
.fw-guest-list li {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.fw-gifts li span {
  display: grid;
  gap: 2px;
  flex: 1 1 200px;
}

.fw-gifts em,
.fw-guest-list em {
  font-style: normal;
  color: var(--muted);
}

.fw-gifts form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fw-gifts input[type="text"] {
  width: 140px;
  border: 1.5px solid rgba(58, 24, 79, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
}

.fw-gifts button,
.fw-gifts a {
  border: 0;
  background: none;
  padding: 0;
  color: var(--gold-deep, #c9a01a);
  font: 700 14px/1 var(--sans);
  cursor: pointer;
}
