/* The "MAKE ENQUIRY NOW" pop-up.
 *
 * The page itself is a fixed 1920px Muse design that scripts/fit-layout.js
 * scales down with body { zoom }. A form cannot ride along with that: on a
 * phone the zoom factor is around 0.2, which would render the labels and the
 * touch targets far too small to use. So the dialog cancels the page zoom with
 * --fit-unzoom (published by fit-layout.js) and then sizes itself normally
 * against the real viewport. Net zoom inside the dialog is 1, which is also
 * what makes position:fixed and the vh/vw units below behave as written.
 *
 * The layout follows the business's own design for this form: a white card
 * under the centred logo, the two sets of questions side by side under a blue
 * and a red heading, one message box across the foot of them, and a single
 * blue Submit button. The questions are written inside their boxes rather than
 * above them, so the labels are in the markup but off screen.
 *
 * Colours are the site's: #1E2B33 navy for the copy, #BC1818 red, #1E68AB blue
 * for the "About You" heading and #6798BC — the site's link blue — for the
 * button. Field fills are #F2F2F2 with a #DCDCDC hairline.
 *
 * Everything here is scoped under .enquiry-* so none of it can reach the Muse
 * export's own elements.
 */

.enquiry-overlay {
  position: fixed;
  inset: 0;
  zoom: var(--fit-unzoom, 1);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.72);
  z-index: 100000;
  font-family: open-sans, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.enquiry-overlay[hidden] {
  display: none;
}

/* Holds the page still behind the dialog. Muse gives body a min-width, so the
 * usual position:fixed body trick would jump the layout; hiding the overflow
 * is enough and keeps the scroll position. */
.enquiry-open,
.enquiry-open body {
  overflow: hidden;
}

.enquiry-dialog {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin: auto;
  background-color: #ffffff;
  color: #1e2b33;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* A label rather than an icon, as the design draws it. */
.enquiry-close {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #bc1818;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.enquiry-close:hover,
.enquiry-close:focus-visible {
  color: #8f1212;
}

/* ---- Masthead: the business's own logo, centred ---- */

.enquiry-header {
  padding: 30px 60px 24px;
  text-align: center;
}

.enquiry-logo {
  display: inline-block;
  width: 365px;
  max-width: 100%;
  height: auto;
}

.enquiry-body {
  padding: 0 78px 38px;
}

/* Kept for screen readers only: the design's own labelling is the placeholder
 * inside each box, and the pop-up's title is the logo. */
.enquiry-label--offscreen {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- The two sets of questions, side by side ---- */

.enquiry-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 34px;
}

.enquiry-section {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.enquiry-section--wide {
  margin-top: 22px;
}

.enquiry-section-title {
  display: block;
  padding: 0;
  margin-bottom: 14px;
  font-size: 23px;
  line-height: 30px;
  font-weight: 400;
}

.enquiry-columns .enquiry-section:first-child .enquiry-section-title {
  color: #1e68ab;
}

.enquiry-columns .enquiry-section:first-child + .enquiry-section .enquiry-section-title {
  color: #bc1818;
}

.enquiry-field {
  margin-top: 14px;
}

.enquiry-section-title + .enquiry-field {
  margin-top: 0;
}

/* The amount owed and the yes/no answers keep a written label, beside their
   control rather than above it. */
.enquiry-field--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 18px;
}

.enquiry-label {
  display: block;
  font-size: 14px;
  line-height: 18px;
  color: #4a5560;
}

.enquiry-field--inline .enquiry-label {
  flex: 1 1 44%;
  min-width: 130px;
}

.enquiry-input,
.enquiry-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 9px;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background-color: #f2f2f2;
  color: #1e2b33;
  font-family: inherit;
  font-size: 15px;
  line-height: 22px;
}

.enquiry-input {
  height: 36px;
}

.enquiry-textarea {
  min-height: 100px;
  padding: 9px 11px;
  resize: vertical;
}

.enquiry-input::placeholder,
.enquiry-textarea::placeholder {
  color: #7f7f7f;
  opacity: 1;
}

.enquiry-textarea::placeholder {
  font-style: italic;
}

.enquiry-input:focus,
.enquiry-textarea:focus,
.enquiry-money:focus-within {
  outline: 2px solid #6798bc;
  outline-offset: 1px;
}

/* ---- The amount owed ---- */

/* The £ is fixed chrome at the head of the box rather than text inside it, so
   it can never be deleted, duplicated or typed around. */
.enquiry-money {
  display: flex;
  align-items: stretch;
  flex: 1 1 46%;
  min-width: 150px;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background-color: #f2f2f2;
}

.enquiry-money-symbol {
  display: flex;
  align-items: center;
  padding: 0 2px 0 9px;
  font-size: 15px;
  line-height: 22px;
  color: #4a5560;
}

.enquiry-money .enquiry-input {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding-left: 4px;
}

.enquiry-money .enquiry-input:focus {
  outline: none;
}

/* ---- Yes / no answer ---- */

.enquiry-choices {
  display: flex;
  align-items: center;
  gap: 8px 18px;
}

.enquiry-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 18px;
  color: #4a5560;
  cursor: pointer;
}

.enquiry-choice input {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid #b7b7b7;
  border-radius: 50%;
  background-color: #f2f2f2;
  cursor: pointer;
}

.enquiry-choice input:checked {
  border-color: #6798bc;
  /* The chosen answer is filled rather than ticked, so it reads at a glance. */
  background-image: radial-gradient(#1e68ab 0 42%, transparent 44%);
}

.enquiry-choice input:focus-visible {
  outline: 2px solid #6798bc;
  outline-offset: 1px;
}

/* ---- Validation ---- */

.enquiry-field--invalid .enquiry-input,
.enquiry-field--invalid .enquiry-textarea,
.enquiry-field--invalid .enquiry-money,
.enquiry-field--invalid .enquiry-choice input {
  border-color: #bc1818;
}

.enquiry-error {
  flex: 1 1 100%;
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: #bc1818;
}

.enquiry-error[hidden] {
  display: none;
}

/* ---- Sending ---- */

.enquiry-submit {
  display: block;
  margin: 26px auto 0;
  min-width: 150px;
  padding: 9px 26px;
  border: 1px solid #6798bc;
  border-radius: 999px;
  background-color: #6798bc;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  line-height: 22px;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.enquiry-submit:hover,
.enquiry-submit:focus-visible {
  background-color: #4f80a5;
  border-color: #4f80a5;
}

.enquiry-formerror {
  margin: 20px 0 0;
  padding: 10px 14px;
  border: 1px solid #bc1818;
  border-radius: 10px;
  font-size: 15px;
  line-height: 22px;
  color: #bc1818;
}

.enquiry-formerror[hidden] {
  display: none;
}

/* What pressing Submit actually does — there is no server behind this form, so
   it has to be said. Quiet enough not to compete with the questions. */
.enquiry-note {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: #7f7f7f;
  text-align: center;
}

/* The company's copyright, closing the pop-up. */
.enquiry-legal {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid #ececec;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
  color: #7f7f7f;
}

/* The confirmation that replaces the form once the email has been handed over
 * to the visitor's own email programme. */
.enquiry-done[hidden] {
  display: none;
}

.enquiry-done .enquiry-title {
  margin: 0;
  font-size: 23px;
  line-height: 30px;
  font-weight: 400;
  color: #1e68ab;
}

.enquiry-done p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 22px;
}

.enquiry-done a {
  color: #1e68ab;
  text-decoration: underline;
}

/* ---- Taking a copy of the enquiry, for anyone whose email never opened ---- */

.enquiry-copy-button[hidden] {
  display: none;
}

.enquiry-done .enquiry-copy-status {
  margin: 11px 0 0;
  font-size: 14px;
  line-height: 20px;
}

.enquiry-copy-status--ok {
  font-weight: 600;
}

/* Where the clipboard is unavailable the enquiry is shown here instead, big
 * enough to select comfortably by hand and still fit a phone screen. */
.enquiry-copybox {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 14px;
  min-height: 190px;
  padding: 10px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background-color: #f2f2f2;
  color: #1e2b33;
  font-family: inherit;
  font-size: 15px;
  line-height: 22px;
  resize: vertical;
}

.enquiry-copybox:focus {
  outline: 2px solid #6798bc;
  outline-offset: 1px;
}

.enquiry-copybox[hidden] {
  display: none;
}

/* Tablets and iPads: the card runs nearly edge to edge, so the desktop gutters
   are too wide to give the questions room. */
@media (max-width: 1024px) {
  .enquiry-overlay {
    padding: 18px 14px;
  }

  .enquiry-header {
    padding: 26px 46px 20px;
  }

  .enquiry-body {
    padding: 0 46px 32px;
  }

  .enquiry-columns {
    gap: 0 26px;
  }
}

/* One column once there is no room for two, with the labels back above their
   controls so nothing is squeezed. */
@media (max-width: 700px) {
  .enquiry-dialog {
    border-radius: 14px;
  }

  .enquiry-header {
    padding: 22px 46px 18px;
  }

  .enquiry-logo {
    width: 260px;
  }

  .enquiry-body {
    padding: 0 22px 26px;
  }

  .enquiry-columns {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .enquiry-field--inline .enquiry-label {
    flex: 1 1 100%;
  }

  .enquiry-money {
    flex: 1 1 100%;
  }

  .enquiry-copybox {
    min-height: 160px;
  }
}
