/* Lead forms, hero CTA, end-of-page CTA, mobile contact bar and the consent banner.
   Loaded on every page, including the Good Day AI pages that do not load style.css,
   so colors are set here and not taken from style.css variables. */

/* ── Lead form (full: /contact, /about; compact: end of page) ── */
/* The site nav is fixed: leave room above the form when "get a quote" scrolls to it. */
#lead { scroll-margin-top: 96px; }
.lead-form { display: flex; flex-direction: column; gap: 14px; }
.lead-field { display: flex; flex-direction: column; gap: 6px; }
.lead-field label { font-size: 14px; font-weight: 600; color: #0B3155; }
.lead-optional { font-weight: 400; color: #6B6459; }
.lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-form input, .lead-form select, .lead-form textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid #d0dae4; border-radius: 10px; background: #fff; color: #232019;
  font-size: 16px; font-family: 'Assistant', sans-serif; outline: none; transition: border-color 0.2s;
}
.lead-form input:focus-visible, .lead-form select:focus-visible, .lead-form textarea:focus-visible { border-color: #53C6DD; box-shadow: 0 0 0 3px rgba(83, 198, 221, 0.35); }
.lead-form [aria-invalid="true"] { border-color: #b42318; }
.lead-form button[type="submit"] { align-self: flex-start; border: none; cursor: pointer; font-family: inherit; }
.lead-form button[disabled] { opacity: 0.7; cursor: wait; }
.lead-hint { font-size: 13px; color: #6B6459; margin-top: -6px; }
.lead-status { font-size: 15px; min-height: 1px; }
.lead-status.is-error { color: #b42318; font-weight: 600; }
.lead-note { font-size: 13px; color: #6B6459; line-height: 1.6; }
.lead-note a { color: inherit; text-decoration: underline; }
/* Honeypot: invisible to people, still in the form for bots. Clipped in place, never moved off
   screen: in a right-to-left page left:-10000px made the page 10,000px wide (on /contact, /about). */
.lead-hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Compact form on the dark end-of-page section */
.cta-section .lead-form { position: relative; max-width: 860px; margin: 0 auto; text-align: right; }
.cta-section .lead-form--compact { display: grid; grid-template-columns: 1fr 1fr 1fr auto; align-items: end; gap: 12px; }
.cta-section .lead-form--compact .lead-status, .cta-section .lead-form--compact .lead-note { grid-column: 1 / -1; }
.cta-section .lead-form--compact button[type="submit"] { align-self: end; min-height: 52px; }
.cta-section .lead-field label { color: #fff; }
.cta-section .lead-note { color: rgba(255, 255, 255, 0.7); margin: 0; font-size: 14px; }
.cta-section .lead-status.is-error { color: #ffb4a8; }
/* style.css gives every .cta-section p a 44px bottom margin and 18px text; not for the form lines. */
.cta-section .lead-form p, .cta-section .lead-cta-line { margin-bottom: 0; }
.cta-section .lead-status { font-size: 15px; }
.cta-section .lead-form--compact .lead-status:empty { margin-top: -12px; }
/* "Or directly": a phone button and a WhatsApp button under the compact form. */
.lead-cta-line { position: relative; margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lead-cta-line__label { color: rgba(255, 255, 255, 0.7); font-size: 14px; }
.lead-direct { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.lead-direct__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px;
  font: 700 16px 'Assistant', 'Cairo', sans-serif; text-decoration: none; transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
}
.lead-direct__btn svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }
.lead-direct__phone { color: #fff; background: rgba(255, 255, 255, 0.08); border: 1.5px solid rgba(255, 255, 255, 0.35); }
.lead-direct__phone:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
/* WhatsApp green with navy text: white on #25D366 is too faint to read. */
.lead-direct__wa { color: #0B3155; background: #25D366; border: 1.5px solid #25D366; }
.lead-direct__wa:hover { background: #3ee07a; border-color: #3ee07a; transform: translateY(-1px); }
.lead-direct__btn:focus-visible { outline: 3px solid #53C6DD; outline-offset: 3px; }

/* After a successful send */
.lead-done { position: relative; background: #fff; color: #232019; border-radius: 14px; padding: 28px; text-align: right; max-width: 620px; margin: 0 auto; box-shadow: 0 8px 32px rgba(11, 49, 85, 0.12); }
.lead-done:focus { outline: 3px solid #53C6DD; outline-offset: 3px; }
.lead-done__title { font-size: 22px; font-weight: 700; color: #0B3155; margin-bottom: 12px; }
.lead-done__next { font-weight: 700; margin-bottom: 6px; }
.lead-done ol { padding-inline-start: 22px; margin-bottom: 20px; line-height: 1.8; }
.lead-done__wa { display: inline-flex; }
/* Inside the dark end-of-page section, style.css makes every p pale and gives it a 44px margin. */
.cta-section .lead-done p { color: #232019; font-size: 16px; margin-bottom: 6px; }
.cta-section .lead-done .lead-done__title { color: #0B3155; font-size: 22px; margin-bottom: 12px; }

/* ── Hero CTA ── */
.lead-hero { margin-top: 28px; }
.lead-promise { margin-top: 12px; font-size: 15px; color: rgba(255, 255, 255, 0.75); }
.hero .lead-promise { margin-bottom: 0; }

/* ── Mobile contact bar ── */
.lead-bar { display: none; }
@media (max-width: 767px) {
  .lead-row { grid-template-columns: 1fr; }
  .cta-section .lead-form--compact { grid-template-columns: 1fr; }
  .cta-section .lead-form--compact button[type="submit"] { width: 100%; justify-content: center; }

  .lead-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 600;
    display: grid; grid-template-columns: repeat(3, 1fr);
    background: #0B3155; padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
  }
  .lead-bar a {
    min-height: 56px; display: flex; align-items: center; justify-content: center;
    color: #fff; font: 700 16px 'Assistant', 'Cairo', sans-serif; text-decoration: none;
  }
  .lead-bar a + a { border-inline-start: 1px solid rgba(255, 255, 255, 0.18); }
  .lead-bar .lead-bar__quote { background: #53C6DD; color: #0B3155; }
  .lead-bar a:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }

  body.has-lead-bar { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  /* One WhatsApp button on a phone: the bar's. */
  body.has-lead-bar .float-cta { display: none !important; }
  /* The accessibility button and its panel sit above the bar, not under it. */
  body.has-lead-bar .a11y-toggle { bottom: calc(56px + 14px + env(safe-area-inset-bottom)); }
  body.has-lead-bar .a11y-panel { bottom: calc(56px + 80px + env(safe-area-inset-bottom)); }
  body.has-lead-bar .lead-consent { bottom: calc(56px + 12px + env(safe-area-inset-bottom)); }
}

/* ── Consent banner ── */
.lead-consent {
  position: fixed; z-index: 9000; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 16px 18px;
  background: #0B3155; color: #fff; border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  font: 15px/1.5 'Assistant', 'Cairo', sans-serif;
}
.lead-consent p { flex: 1 1 100%; margin: 0; }
.lead-consent a { color: #9fe3f0; text-decoration: underline; }
.lead-consent button {
  min-height: 44px; padding: 0 20px; border-radius: 8px; font: 700 15px 'Assistant', 'Cairo', sans-serif; cursor: pointer;
}
.lead-consent__yes { background: #53C6DD; color: #0B3155; border: none; }
.lead-consent__no { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.6); }
.lead-consent button:focus-visible, .lead-consent a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .lead-form input, .lead-form select, .lead-form textarea { transition: none; }
  .lead-direct__btn { transition: none; }
  .lead-direct__btn:hover { transform: none; }
}
