html.ev-is-sealed .ev-rsvp__details { display: none }

/*
 * Track C's stylesheet: the RSVP page around the envelope, the form and the deadline.
 * The rule above is a contract with track E, which sets ev-is-sealed on <html> while the envelope is
 * closed (build tracks overview, section 5). Keep it first and keep its class names.
 * Phone first: base rules style 390px wide; min-width queries only.
 */

/* ev-rsvp: everything below the envelope. */

.ev-rsvp__details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.ev-rsvp__title {
  margin-bottom: 1.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.ev-rsvp__heading {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.ev-rsvp__facts {
  display: grid;
  gap: 1.25rem;
  margin: 0;
}

.ev-rsvp__fact {
  display: grid;
  gap: 0.25rem;
}

.ev-rsvp__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.ev-rsvp__value {
  margin: 0;
  font-size: 1.0625rem;
}

.ev-rsvp__venue {
  font-weight: 600;
}

/* 44px tall with 1rem text and Bootstrap's 1px borders. */
.ev-rsvp__map-link {
  --bs-btn-padding-y: 0.5625rem;
}

/* The host's message, set apart from the facts above it. */
.ev-rsvp__message {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: var(--bs-border-width) solid var(--bs-border-color-translucent);
  font-size: 1.0625rem;

  & > :last-child {
    margin-bottom: 0;
  }
}

/* The rsvp_response frame: the form, or the saved answer. A turbo-frame is inline by default. */

.ev-rsvp__response {
  display: block;
}

.ev-rsvp__summary {
  font-size: 1.0625rem;

  & > :last-child {
    margin-bottom: 0;
  }
}

.ev-rsvp__note {
  color: var(--bs-secondary-color);
}

/* 44px tall with 1rem text and Bootstrap's 1px borders. */
.ev-rsvp__text-host,
.ev-rsvp__calendar-link {
  --bs-btn-padding-y: 0.5625rem;
}

.ev-rsvp__change {
  margin-top: 1rem;

  & > .ev-rsvp-form {
    margin-top: 0.75rem;
  }
}

/* 44px tall: a 24px line plus padding. */
.ev-rsvp__change-toggle {
  padding-block: 0.625rem;
  font-weight: 500;
  color: var(--bs-link-color);
  cursor: pointer;
}

/* ev-rsvp-form: the answer. Inputs stay at 16px or more, so iOS doesn't zoom. */

.ev-rsvp-form {
  display: grid;
  gap: 1.75rem;
}

.ev-rsvp-form__choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.ev-rsvp-form__choice {
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-padding-y: 0.75rem;
  --bs-btn-font-size: 1.125rem;
  --bs-btn-font-weight: 600;
}

/* Headcounts are for Yes and Maybe. */
.ev-rsvp-form:has(.ev-rsvp-form__choice-input[value="no"]:checked) .ev-rsvp-form__counts {
  display: none;
}

.ev-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  & + & {
    margin-top: 0.75rem;
  }
}

.ev-stepper__label {
  font-size: 1.0625rem;
  font-weight: 500;
}

.ev-stepper__control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ev-stepper__button {
  --bs-btn-padding-x: 0;
  --bs-btn-padding-y: 0;
  --bs-btn-font-size: 1.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ev-tap-min);
  height: var(--ev-tap-min);
  line-height: 1;
}

/* No spinner arrows: the buttons beside it do that. */
.ev-stepper__input {
  width: 4rem;
  min-height: var(--ev-tap-min);
  font-size: 1.125rem;
  text-align: center;
  appearance: textfield;

  &::-webkit-inner-spin-button,
  &::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
  }
}

.ev-rsvp-form__note {
  min-height: 5.5rem;
}

.ev-rsvp-form__submit {
  --bs-btn-padding-y: 0.75rem;
  --bs-btn-font-size: 1.125rem;
  --bs-btn-font-weight: 600;
}

/* Who's coming: one chip per Yes household. */

.ev-rsvp__households {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ev-rsvp__household {
  max-width: 100%;
  padding: 0.375rem 0.875rem;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-pill);
  background: var(--bs-tertiary-bg);
}

/* A page with no envelope: the unknown link and the rate limit. */

.ev-rsvp__notice {
  margin-top: clamp(1rem, 8dvh, 4rem);
}
