/* Room compare page — BEM naming.
   This page shipped unstyled since HMS-223; every room-compare__* class fell
   back to UA defaults (the "Best value" badge rendered as run-in text, links
   wrapped badly at 390px). Styled to the same quiet conventions as the rest of
   the app. */

/* ── Page container ─────────────────────────────────────── */

.room-compare {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

/* ── Back link ──────────────────────────────────────────── */

.room-compare__back {
  padding: 1rem 0;
}

.room-compare__back a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--wa-color-text-quiet);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.room-compare__back a:hover {
  color: var(--wa-color-text-normal);
}

.room-compare__back i {
  font-size: 0.75rem;
}

/* ── Header ─────────────────────────────────────────────── */

.room-compare__header {
  margin-top: 1rem;
}

.room-compare__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wa-color-text-normal);
  line-height: 1.2;
}

.room-compare__subtitle {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  color: var(--wa-color-text-quiet);
  line-height: 1.5;
}

/* ── Date form ──────────────────────────────────────────── */

/* A flex row that wraps on mobile; each field stacks its label above its input. */

.room-compare__date-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}

.room-compare__date-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--wa-color-text-quiet);
}

.room-compare__date-form input[type="date"] {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-radius: var(--wa-border-radius-m);
  background: var(--wa-color-surface-default);
  color: var(--wa-color-text-normal);
  font-size: 0.875rem;
}

/* ── Table ──────────────────────────────────────────────── */

/* Wraps the table; scrolls horizontally when narrow. */

.room-compare__table-wrap {
  overflow-x: auto;
  margin-top: 1.5rem;
}

.room-compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: var(--wa-color-text-normal);
}

.room-compare__table th {
  text-align: left;
  font-weight: 600;
  color: var(--wa-color-text-quiet);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--wa-color-neutral-border-normal);
}

.room-compare__table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--wa-color-neutral-border-quiet);
  vertical-align: top;
}

/* Room cell — name plus the "Best value" badge. */

.room-compare__room-name {
  font-weight: 600;
}

.room-compare__badge {
  display: inline-block;
  background: var(--wa-color-brand-fill-quiet);
  color: var(--wa-color-brand-fill-loud);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  margin-inline-start: 0.375rem;
  vertical-align: middle;
}

/* Em-dash placeholder cell for rows that have no value in a column. */

.room-compare__baseline {
  color: var(--wa-color-text-quiet);
}

/* Amenities added, listed in one cell. */

.room-compare__amenities {
  color: var(--wa-color-text-quiet);
}

/* Book link, rightmost column. */

.room-compare__book-link {
  color: var(--wa-color-brand-fill-loud);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
  white-space: nowrap;
}

/* ── Empty state ────────────────────────────────────────── */

.room-compare__empty {
  margin-top: 1.5rem;
  padding: 2rem 1rem;
  text-align: center;
  background: var(--wa-color-surface-lowered);
  border: 1px solid var(--wa-color-neutral-border-quiet);
  border-radius: var(--wa-border-radius-m);
}

.room-compare__empty p {
  margin: 0.5rem 0;
  color: var(--wa-color-text-quiet);
}

.room-compare__empty a {
  color: var(--wa-color-brand-fill-loud);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

/* ── Tablet (≥ 640px) ─────────────────────────────────── */

@media (min-width: 640px) {
  .room-compare {
    padding: 0 1.5rem;
  }
}
