/* Figma 516:7063 — Waitlist Offer.
   Every colour and radius is a --wa-* token; a raw value here is a bug. */

.waitlist-offer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.waitlist-offer__badge {
  display: inline-block;
  background: var(--wa-color-warning-fill-quiet);
  color: var(--wa-color-warning-on-quiet);
  padding: 0.25rem 0.75rem;
  border-radius: var(--wa-border-radius-s);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.waitlist-offer__heading {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  color: var(--wa-color-text-normal);
}

.waitlist-offer__expiry-note {
  margin: 0 0 1.5rem;
  color: var(--wa-color-text-quiet);
  line-height: 1.5;
}

/* The design renders a dark countdown panel here; this keeps the weight and
   the contrast and states the deadline rather than ticking. */
.waitlist-offer__deadline {
  padding: 1rem;
  background: var(--wa-color-neutral-fill-loud);
  color: var(--wa-color-neutral-on-loud);
  border-radius: var(--wa-border-radius-m);
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Segmented countdown: each digit is a padded chip on the dark bar. The chip
   fill is a wash of the bar's own on-loud colour — a raw value here would be a
   bug, and the bar's fill token made the segments invisible. */
.waitlist-offer__segments {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-end: 0.5rem;
}

.waitlist-offer__digit {
  display: inline-block;
  min-width: 2rem;
  padding: 0.25rem 0.375rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  border-radius: var(--wa-border-radius-s);
  background: color-mix(in srgb, var(--wa-color-neutral-on-loud) 16%, transparent);
  color: var(--wa-color-neutral-on-loud);
}

.waitlist-offer__separator {
  font-weight: 700;
  color: var(--wa-color-neutral-on-loud);
  margin-inline: 0.125rem;
}

/* The label span inside the bar gets a quieter treatment; the digits keep full weight
   and the bar's on-loud colour, so contrast holds. inline-block keeps "1 hour 19 min
   left" one unit — as inline text it could wrap mid-phrase and leave a dangling "1". */
.waitlist-offer__deadline [data-countdown-target="label"] {
  display: inline-block;
  opacity: 0.85;
  font-size: 0.9em;
}

.waitlist-offer__details {
  margin: 0 0 1.5rem;
}

.waitlist-offer__detail {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--wa-color-surface-border);
}

.waitlist-offer__detail:last-child {
  border-bottom: none;
}

.waitlist-offer__detail-label {
  color: var(--wa-color-text-quiet);
  /* CJK labels like キャンセル are spaceless, so the default break-anywhere
     rule splits them mid-word at narrow widths (Chrome can break katakana even
     under keep-all). nowrap keeps the label one line — these labels are short,
     and under 40rem the row stacks so nothing overflows. */
  white-space: nowrap;
  flex-shrink: 0;
}

.waitlist-offer__detail-value {
  margin: 0;
  color: var(--wa-color-text-normal);
  font-weight: 600;
  text-align: right;
}

.waitlist-offer__acceptance-note {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: var(--wa-color-text-quiet);
  line-height: 1.5;
}

.waitlist-offer__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* The class lands on the BUTTON button_to emits, not the form:
   the class itself, not a descendant selector. */
.waitlist-offer__decline {
  padding: 0.75rem 1rem;
  border: 1px solid var(--wa-color-danger-border-normal);
  border-radius: var(--wa-border-radius-m);
  background: var(--wa-color-danger-fill-quiet);
  color: var(--wa-color-danger-on-quiet);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* THE LOUD ONE. Accept was rendering paler than Decline, which inverted the hierarchy —
   the destructive action read as primary and the one the guest came to take read as an
   afterthought. Figma 516:7063 has Accept solid and Decline a quiet red wash. */
.waitlist-offer__accept {
  padding: 0.75rem 1rem;
  border: 1px solid var(--wa-color-brand-fill-loud);
  border-radius: var(--wa-border-radius-m);
  background: var(--wa-color-brand-fill-loud);
  color: var(--wa-color-brand-on-loud);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Icon gap between the fa-check and the label inside the button. */
.waitlist-offer__accept i.fa-check {
  margin-inline-end: 0.375rem;
}

/* "Room Details" — a real heading rather than bold text, so the offer has structure a
   screen reader can navigate. Quiet, because the deadline above it is what the guest
   opened this page for. */
.waitlist-offer__details-heading {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--wa-color-text-quiet);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 40rem) {
  .waitlist-offer__detail {
    flex-direction: column;
    gap: 0.125rem;
  }

  .waitlist-offer__detail-value {
    text-align: left;
  }
}
