/* layout fixes from the Impeccable critique */

/* ---------------------------------------------------------------
   2. Countdown shows from page load (the scratch card only hides
      the date now, not the numbers).
   --------------------------------------------------------------- */
.im-gold-scratch:not(.is-revealed) .im-gold-scratch__half > span { opacity: 1; }

/* ---------------------------------------------------------------
   3. RSVP event chips carry their date
   --------------------------------------------------------------- */
.im-guest-rsvp__event-date {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .02em;
  color: #6e4a3f;
  white-space: nowrap;
}

.im-guest-rsvp__event-option:has(input:checked) .im-guest-rsvp__event-date { color: #721022; }

/* ---------------------------------------------------------------
   4. Wide screens: the six event cards zig-zag either side of a
      central track instead of one phone-width column.
   --------------------------------------------------------------- */
@media (min-width: 1024px) {
  body .im-banana-leaf { --im-bl-col-gap: clamp(96px, 9vw, 150px); }

  body .im-banana-leaf__inner { max-width: 1120px; }

  body .im-banana-leaf__track {
    left: 50%;
    transform: translateX(-50%);
  }

  body .im-banana-leaf__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--im-bl-col-gap);
    row-gap: 24px;
    padding: 0;
  }

  /* each card spans two half-rows; the next one starts halfway down
     the previous, on the other side of the track */
  body .im-banana-leaf__item {
    grid-row-end: span 2;
    margin: 0;
    width: min(440px, 100%);
  }
  body .im-banana-leaf__item:nth-child(odd)  { grid-column: 1; justify-self: end; }
  body .im-banana-leaf__item:nth-child(even) { grid-column: 2; justify-self: start; }
  body .im-banana-leaf__item:nth-child(1) { grid-row-start: 1; }
  body .im-banana-leaf__item:nth-child(2) { grid-row-start: 2; }
  body .im-banana-leaf__item:nth-child(3) { grid-row-start: 3; }
  body .im-banana-leaf__item:nth-child(4) { grid-row-start: 4; }
  body .im-banana-leaf__item:nth-child(5) { grid-row-start: 5; }
  body .im-banana-leaf__item:nth-child(6) { grid-row-start: 6; }
  body .im-banana-leaf__item:nth-child(7) { grid-row-start: 7; }
  body .im-banana-leaf__item:nth-child(8) { grid-row-start: 8; }

  /* dots move onto the central track */
  body .im-banana-leaf__item:nth-child(odd) > .im-banana-leaf__dot {
    left: auto;
    right: calc(var(--im-bl-col-gap) / -2 - 8px);
  }
  body .im-banana-leaf__item:nth-child(even) > .im-banana-leaf__dot {
    left: calc(var(--im-bl-col-gap) / -2 - 8px);
  }
}

/* ---------------------------------------------------------------
   5. Event cards: date/time, venue and dress code share one centre
      line. Icons sit inline at the start of the first line, so a
      two-line date/time centres both lines instead of hanging
      left-aligned beside the clock.
   --------------------------------------------------------------- */
html body .im-banana-leaf__meta li:not(.im-banana-leaf__dress),
html body .im-banana-leaf__dress-value {
  display: block;
  text-align: center;
  text-wrap: balance;
}
html body .im-banana-leaf__meta li:not(.im-banana-leaf__dress) > svg,
html body .im-banana-leaf__dress-value > svg {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 6px;
}
html body .im-banana-leaf__meta li.im-banana-leaf__dress {
  align-items: center;
  text-align: center;
}
.im-nowrap { white-space: nowrap; }
