/* ==========================================================================
   Free project review (quote) page. Every rule is scoped to body.page-quote.
   Shared tokens (navy, ink, gold, line, success) come from css/styles.css.
   ========================================================================== */

body.page-quote {
  --quote-text: #5a687a;        /* intro copy and security note */
  --quote-soft: #637185;        /* step introductions */
  --quote-label: #405268;       /* field and choice labels */
  --quote-note: #6d7a8a;        /* small print under the phone number */
  --quote-field-line: #c8d0da;  /* input borders */
  --quote-tile-line: #d8dee7;   /* choice tile borders */
  --quote-progress: #e1e5e9;    /* progress track */
  --quote-outline: #cbd3dd;     /* secondary button border */
  --quote-placeholder: #8b97a8;
  --quote-error: #b3261e;
}

/* 1. Page layout --------------------------------------------------------- */
body.page-quote .quote-page {
  display: grid;
  grid-template-columns: 0.7fr 1.25fr;
  align-items: start;
  gap: 8vw;
  padding: 90px clamp(24px, 8vw, 130px);
  background: linear-gradient(135deg, #f4f0e7, #edf1f5);
}

/* 2. Introduction column ------------------------------------------------- */
body.page-quote .quote-intro {
  position: sticky;
  top: 120px;
}

body.page-quote .quote-intro h1 {
  margin: 20px 0;
  font-size: clamp(48px, 5.3vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

body.page-quote .quote-intro > p:not(.security-note) {
  color: var(--quote-text);
  font-size: 16px;
  line-height: 1.7;
}

body.page-quote .quote-intro ul {
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

body.page-quote .quote-intro li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 19.5px;
  color: var(--navy);
}

body.page-quote .quote-intro li .icon {
  width: 17px;
  height: 24px;
  color: var(--success);
}

body.page-quote .quote-help {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

body.page-quote .quote-help > .icon {
  width: 24px;
  height: 24px;
  color: var(--gold-dark);
}

body.page-quote .quote-help span,
body.page-quote .quote-help small {
  display: block;
  font-size: 11px;
  line-height: 16.5px;
  color: var(--quote-note);
}

body.page-quote .quote-help a {
  display: block;
  margin: 4px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.5;
  color: var(--navy);
}

body.page-quote .security-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 0;
  font-size: 11px;
  line-height: 18.7px;
  color: var(--quote-text);
}

body.page-quote .security-note .icon {
  flex: 0 0 15px;
  width: 15px;
  height: 24px;
}

/* 3. Wizard card --------------------------------------------------------- */
body.page-quote .quote-wizard {
  min-height: 610px;
  padding: 40px;
  background: #ffffff;
  box-shadow: 0 25px 70px rgba(4, 26, 55, 0.12);
}

body.page-quote .wizard-progress {
  height: 4px;
  margin: -40px -40px 45px;
  background: var(--quote-progress);
}

body.page-quote .wizard-progress span {
  display: block;
  height: 100%;
  background: var(--gold);
  transition: width 0.3s ease;
}

body.page-quote .quote-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

body.page-quote .quote-step legend {
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 500;
  line-height: 1.08;
  color: var(--navy);
}

body.page-quote .quote-step legend:focus {
  outline: none;
}

body.page-quote .quote-step > p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--quote-soft);
}

body.page-quote .quote-step > p + * {
  margin-top: 30px;
}

body.page-quote .quote-step-error {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--quote-error);
}

/* 4. Choice tiles (step 1) ----------------------------------------------- */
body.page-quote .choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 30px 0;
}

body.page-quote .choice-grid label {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

body.page-quote .choice-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

body.page-quote .choice-grid span {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 14px 16px;
  border: 1px solid var(--quote-tile-line);
  font-size: 13px;
  font-weight: 700;
  line-height: 19.5px;
  color: var(--quote-label);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.page-quote .choice-grid span .icon {
  width: 16px;
  height: 16px;
  opacity: 0.25;
}

body.page-quote .choice-grid label:hover span {
  border-color: var(--navy);
}

body.page-quote .choice-grid input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

body.page-quote .choice-grid input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

body.page-quote .choice-grid input:checked + span .icon {
  color: var(--gold);
  opacity: 1;
}

/* 5. Fields -------------------------------------------------------------- */
body.page-quote .quote-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 30px;
}

body.page-quote .field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

body.page-quote .enquiry-form .field {
  gap: 0;
  min-width: 0;
}

body.page-quote .enquiry-form .field > label {
  display: block;
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 16.5px;
  color: var(--quote-label);
}

body.page-quote .enquiry-form input:not([type="checkbox"]):not([type="radio"]),
body.page-quote .enquiry-form select,
body.page-quote .enquiry-form textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--quote-field-line);
  border-radius: 0;
}

body.page-quote .enquiry-form select {
  min-height: 47px;
  height: 47px;
  padding-block: 0;
}

body.page-quote .enquiry-form textarea {
  min-height: 147px;
  resize: vertical;
}

body.page-quote .enquiry-form ::placeholder {
  color: var(--quote-placeholder);
  opacity: 1;
}

body.page-quote .enquiry-form .field-error {
  font-size: 12px;
  line-height: 16px;
  color: var(--quote-error);
}

body.page-quote .enquiry-form .is-invalid input,
body.page-quote .enquiry-form .is-invalid select,
body.page-quote .enquiry-form .is-invalid textarea,
body.page-quote .enquiry-form input.is-invalid,
body.page-quote .enquiry-form select.is-invalid,
body.page-quote .enquiry-form textarea.is-invalid {
  border-color: var(--quote-error);
  background: #fff8f7;
}

/* Consent line (step 3) */
body.page-quote .enquiry-form .consent {
  position: relative;
  display: grid;
  grid-template-columns: 17px 1fr;
  align-items: start;
  gap: 11px;
  margin-top: 25px;
  font-size: 11px;
  font-weight: 700;
  line-height: 24px;
  color: var(--navy);
}

body.page-quote .enquiry-form .consent input {
  width: 17px;
  height: 13px;
  margin: 6px 0 0;
  accent-color: var(--navy);
}

body.page-quote .enquiry-form .consent label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 24px;
  color: var(--navy);
}

body.page-quote .enquiry-form .consent a {
  color: var(--navy);
  text-decoration: underline;
}

body.page-quote .enquiry-form .consent .field-error {
  grid-column: 2;
}

/* 6. Buttons and controls ------------------------------------------------ */
body.page-quote .wizard-controls {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 12px;
  margin-top: 32px;
}

body.page-quote .wizard-controls.solo {
  margin-top: 30px;
  justify-content: flex-start;
}

body.page-quote .wizard-controls .wizard-next {
  margin-left: auto;
}

body.page-quote .wizard-controls.solo .wizard-next {
  margin-left: 0;
}

body.page-quote .button-quiet {
  background: #ffffff;
  color: var(--navy);
  border: 1px solid var(--quote-outline);
  box-shadow: none;
}

body.page-quote .button-quiet:hover,
body.page-quote .button-quiet:focus-visible {
  background: #ffffff;
  color: var(--navy);
  border-color: var(--navy);
}

/* The submit icon is drawn with a mask so main.js can reset the label text */
body.page-quote .wizard-submit::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

body.page-quote .wizard-submit {
  min-height: 56px;
}

body.page-quote .quote-wizard .form-status {
  margin-top: 24px;
}

/* Sent state: the steps give way to the confirmation message, as on the contact page */
body.page-quote .quote-wizard.is-sent {
  min-height: 0;
}

body.page-quote .quote-wizard.is-sent .wizard-progress,
body.page-quote .quote-wizard.is-sent .quote-step {
  display: none;
}

/* 7. Responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
  body.page-quote .quote-page {
    grid-template-columns: 1fr;
  }

  body.page-quote .quote-intro {
    position: static;
  }
}

@media (max-width: 760px) {
  body.page-quote .quote-page {
    padding-block: 70px;
  }

  body.page-quote .quote-wizard {
    min-height: 0;
    padding: 28px 20px;
  }

  body.page-quote .wizard-progress {
    margin: -28px -20px 35px;
  }

  body.page-quote .choice-grid,
  body.page-quote .field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.page-quote .quote-wizard .button {
    padding: 12px 15px;
    white-space: normal;
    text-align: center;
  }
}
