.rfp-form__card {
  background: var(--wa-color-surface-raised);
  border: 1px solid var(--wa-color-surface-border);
  border-radius: var(--wa-border-radius-l);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.rfp-form__card h2 { margin: 0 0 0.75rem; font-size: 1rem; }
.rfp-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.rfp-form__field { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
.rfp-form__field label { font-size: 0.85rem; font-weight: 600; }
.rfp-form__hint { color: var(--wa-color-text-quiet); font-size: 0.8rem; }
.rfp-form__hotel { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; }
.rfp-form__footer { display: flex; gap: 0.75rem; justify-content: flex-end; }
.rfp-form__cancel { align-self: center; color: var(--wa-color-text-quiet); }
@media (max-width: 480px) { .rfp-form__footer { flex-wrap: wrap; } }

.rfp-form__hotel-list {
  max-height: 16rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--wa-color-neutral-20);
  border-radius: 0.375rem;
  padding: 0.25rem 0.75rem;
}

@media (max-width: 640px) {
  .rfp-form__hotel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* RFP form page (new) — previously unstyled classes. */

/* 1. Page container. */
.rfp-form-page {
  max-width: 56rem;
}

/* 2. Page title + subtitle. */
.rfp-form-page__title {
  margin: 0;
  font-size: 1.5rem;
}
.rfp-form-page__sub {
  color: var(--wa-color-text-quiet);
  margin: 0.25rem 0 var(--wa-space-l);
}

/* 3. Validation errors banner. */
.rfp-form__errors {
  background: var(--wa-color-danger-fill-quiet);
  border: 1px solid var(--wa-color-danger-border-normal);
  border-radius: var(--wa-border-radius-m);
  padding: var(--wa-space-m);
  margin-bottom: var(--wa-space-l);
  color: var(--wa-color-danger-on-quiet);
}
.rfp-form__errors ul {
  margin: 0.25rem 0 0;
}

/* 4. Submit button (primary + secondary). */
.rfp-form__submit {
  background: var(--wa-color-brand-fill-loud);
  color: var(--wa-color-brand-on-loud);
  border: none;
  border-radius: var(--wa-border-radius-m);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.rfp-form__submit--secondary {
  background: transparent;
  color: var(--wa-color-text-normal);
  border: 1px solid var(--wa-color-surface-border);
  border-radius: var(--wa-border-radius-m);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
}

/* HMS-350 — room-type chips, concession toggles, and the non-<label> field
   label used above them (Figma 600:31806). */
.rfp-form__label {
  font-size: 0.85rem;
  font-weight: 600;
}
.rfp-form__fieldset { border: 0; padding: 0; margin: 0 0 0.75rem; }
.rfp-form__fieldset legend.rfp-form__label { padding: 0; }

.rfp-form__fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 0.75rem;
}

.rfp-form__fieldset legend.rfp-form__label {
  padding: 0;
}

.rfp-form__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rfp-form__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--wa-color-neutral-20);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  user-select: none;
}

.rfp-form__chip:has(input:checked) {
  border-color: var(--wa-color-brand-fill-loud);
  background: var(--wa-color-brand-fill-quiet);
}

.rfp-form__toggles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem 1rem;
}

.rfp-form__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

/* HMS-708 — validate-all: summary banner (mirrors .rfp-form__errors) and
   invalid-field highlight for the controller's validate-all--invalid class. */
.validate-all__banner {
  background: var(--wa-color-danger-fill-quiet);
  border: 1px solid var(--wa-color-danger-border-normal);
  border-radius: var(--wa-border-radius-m);
  padding: var(--wa-space-m);
  margin-bottom: var(--wa-space-l);
  color: var(--wa-color-danger-on-quiet);
}

/* wa-select's visible border lives on its `combobox` shadow part (there is no
   `base` part), so the part selector must name it — without this the select is
   marked invalid in the DOM but shows no red border. */
.rfp-form .validate-all--invalid,
.rfp-form .validate-all--invalid::part(combobox) {
  border-color: var(--wa-color-danger-border-loud) !important;
}

/* HMS-708 — red asterisk on every label whose field contains a [required]
   control (:has covers the Deadline cell, which holds both a required date
   input and a required wa-select), plus the manually-classed Invite Hotels
   heading whose requirement only applies to Send RFP. */
.rfp-form__field:has([required]) > label::after,
.rfp-form__required::after {
  content: " *";
  color: var(--wa-color-danger-fill-loud);
}

/* HMS-708 — the group error line a validate-all group fills and unhides. */
.validate-all__group-error {
  color: var(--wa-color-danger-on-quiet);
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

/* HMS-708 — invalid group styling: red border on the hotel list box and the
   emails text input inside a marked group. */
.rfp-form .validate-all--invalid-group .rfp-form__hotel-list,
.rfp-form .validate-all--invalid-group input[name="emails"] {
  border-color: var(--wa-color-danger-border-loud) !important;
}

/* HMS-708 — the Deadline time wa-select has only an aria-label (the visible
   "Deadline" label covers it), but `required` makes Web Awesome draw a lone
   asterisk in its empty label slot. Hide that label row. */
.rfp-form wa-select[aria-label]::part(form-control-label) {
  display: none;
}

/* HMS-1443 — an optional rooms-per-night count rides beside each room-type
   chip; the input only appears once its chip is ticked (:has, the same
   pattern the checked-chip highlight uses). */
.rfp-form__chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.rfp-form__chip-qty {
  display: none;
  width: 4rem;
  padding: 0.25rem 0.375rem;
  border: 1px solid var(--wa-color-neutral-20);
  border-radius: 0.375rem;
  font-size: 0.8rem;
}

.rfp-form__chip-wrap:has(input:checked) .rfp-form__chip-qty {
  display: inline-block;
}

/* HMS-1516 — "+ New category…" affordance: a dashed chip button, then the
   revealed name field + Add button sharing the chips' flex row. */
.rfp-form__chip--new {
  border-style: dashed;
  background: none;
  font: inherit;
  /* <button> picks up the WA reset's white text — the other chips are
     <label>s and unaffected; keep this one's label readable. */
  color: var(--wa-color-text-normal);
}

.rfp-form__newcat {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* inline-flex beats the UA [hidden] rule — the revealed name field must
   actually hide until "+ New category…" is clicked. */
.rfp-form__newcat[hidden] {
  display: none;
}

.rfp-form__newcat-name {
  width: 10rem;
  padding: 0.25rem 0.375rem;
  border: 1px solid var(--wa-color-neutral-20);
  border-radius: 0.375rem;
  font-size: 0.8rem;
}

.rfp-form__newcat-add {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--wa-color-neutral-20);
  border-radius: 0.375rem;
  background: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--wa-color-text-normal);
}

/* HMS-1517 — Invite Hotels live search. `.rfp-form__hotel` is display:flex,
   which beats the UA [hidden] rule, so filtered-out rows need an explicit
   hide — the same fix `.rfp-form__newcat[hidden]` uses above. The empty-state
   line sits inside the grid, so it spans every column. */
.rfp-form__hotel[hidden] {
  display: none;
}

.rfp-form__hotel-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.rfp-form__hotel-search {
  flex: 1;
  max-width: 20rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--wa-color-neutral-20);
  border-radius: 0.375rem;
  font-size: 0.85rem;
}

.rfp-form__hotel-empty {
  grid-column: 1 / -1;
  margin: 0.5rem 0;
}
