@charset "utf-8";
/* In-page enquiry form (UI_InPageEnquiry).
   Every rule is scoped to form#enquire so nothing else on the page is affected.
   Load together with form.css. */

form#enquire {
  container-type: inline-size;   /* lets the rules below respond to the form's own width */
  container-name: enquire;
  margin: 24px 0;
}

form#enquire div#fieldsets {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  margin: 0 -5px;
}

form#enquire fieldset {
  border: 1px solid #ccc;
  padding-top: 12px;
  margin: 5px;
  min-width: 0;                  /* stops long content forcing the fieldset wider */
  box-sizing: border-box;
}

form#enquire fieldset#fsD {
  flex: 0 0 220px;               /* personal details: fixed column, as on email_nhs.php */
}

form#enquire fieldset#fsM {
  flex: 1 1 280px;               /* message: takes the remaining width */
}

form#enquire legend {
  font-weight: bold;
  font-size: 18px;
}

form#enquire div.row input,
form#enquire div.row input.chbx {
  border-radius: 4px;
  outline: 0;
  box-sizing: border-box;
  border: 1px solid #767676;
  background: #fff;
}

form#enquire div.row textarea {
  width: 100%;
  height: 220px;
  resize: none;
  border-radius: 4px;
  outline: 0;
  box-sizing: border-box;
  border: 1px solid #767676;
}

form#enquire div.row label[for="permission"] {
  display: inline-block;
  cursor: pointer;
}

form#enquire input[type="checkbox"] + label {
  color: #295b70;
}

/* When the form itself is too narrow for two columns, stack them */
@container enquire (max-width: 529.98px) {
  form#enquire fieldset#fsD {
    flex: 1 1 100%;   /* full line, but allowed to shrink to leave room for its margins */
  }
  form#enquire div.row input:not([type="checkbox"]) {
    width: 100%;                 /* full-width text boxes once stacked */
  }
}