/* ═══════════════════════════════════════════════════════════════
   ABD Lead Catcher — quote modal + shared form
   Brand tokens: Fjord Navy #033B63 · Forge Gold #C6881A ·
   Ember #C43D22 (CTA only) · Iron #1B2127 · Stone #ECEFF0
   Mobile-first.

   TWO RULES THAT LOOK REDUNDANT AND ARE NOT — both were found by
   deploying, not by the local preview:

   1. Every colour is explicit. The inline form sits inside .lsj-cta,
      which sets color:#fff — inherited text renders white on white.

   2. Every interactive element is scoped with
      :is(.abd-quote-modal,.abd-quote-inline).
      hello-elementor/assets/css/reset.css styles [type=submit] and
      [type=button] as transparent with #c36 text, and input[type=email]
      with its own border. Those weigh (0,1,0) and (0,1,1) — a TIE with
      a bare .abd-quote-* class — and the theme stylesheet loads AFTER
      this one, so the theme won and the submit button rendered white
      with pink text on the live site. :is() takes the specificity of
      its most specific argument, so the scope adds exactly one class
      level: enough to win, with no !important anywhere.
      Do not "simplify" these back to a single class.
   ═══════════════════════════════════════════════════════════════ */

.abd-quote-modal,
.abd-quote-inline {
  --q-navy:#033B63;
  --q-navy-deep:#022A47;
  --q-gold:#C6881A;
  --q-ember:#C43D22;
  --q-ember-dark:#A93318;
  --q-iron:#1B2127;
  --q-stone:#ECEFF0;
  --q-muted:#6B7883;
  --q-line:#CFD6DB;
  --q-ok:#2E9E5B;
  --q-err:#C0392B;
  --q-head:'Oswald','Arial Narrow',sans-serif;
  --q-body:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
}

.abd-quote-modal *,
.abd-quote-inline * { box-sizing:border-box; }

/* The form is display:flex, which beats the UA stylesheet's
   [hidden]{display:none}. Without this the success panel appears BELOW
   a form that never went away. */
.abd-quote-modal [hidden],
.abd-quote-inline [hidden] { display:none !important; }

/* ── dialog shell ─────────────────────────────────────────────── */
.abd-quote-modal{
  padding:0; border:0; background:transparent;
  width:100%; max-width:none; height:100%; max-height:none;
  overflow:visible; color:var(--q-iron);
}
.abd-quote-modal:not([open]){ display:none; }
.abd-quote-modal::backdrop{ background:rgba(2,42,71,.68); }
/* Fallback path: no top layer, so it has to out-rank the header (99995). */
.abd-quote-modal.abd-quote-fallback{
  position:fixed; inset:0; z-index:2147483000; display:block;
  background:rgba(2,42,71,.68);
}
.abd-quote-modal.abd-quote-fallback:not([open]){ display:none; }

/* ── panel: bottom sheet on phones, centred card from 768 ─────── */
.abd-quote-panel{
  position:absolute; left:0; right:0; bottom:0;
  width:100%; max-height:min(92dvh,900px); overflow-y:auto;
  overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
  background:#fff; color:var(--q-iron); font-family:var(--q-body);
  border-top:5px solid var(--q-gold);
  border-radius:16px 16px 0 0;
  padding:22px 18px calc(24px + env(safe-area-inset-bottom));
  opacity:0; transform:translateY(18px);
  transition:opacity .18s ease, transform .18s ease;
}
.abd-quote-modal.is-open .abd-quote-panel{ opacity:1; transform:none; }

:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-close{
  position:absolute; top:10px; right:10px;
  width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  background:var(--q-stone); color:var(--q-navy);
  border:0; border-radius:50%; cursor:pointer; padding:0;
  transition:background .15s;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-close:hover{
  background:#dbe1e4; color:var(--q-navy);
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-close:focus-visible{
  outline:2px solid var(--q-navy); outline-offset:2px;
}

.abd-quote-head{ padding-right:42px; margin-bottom:18px; }
.abd-quote-title{
  font-family:var(--q-head); font-weight:700; font-size:clamp(21px,5vw,26px);
  line-height:1.1; text-transform:uppercase; color:var(--q-navy); margin:0 0 6px;
}
.abd-quote-sub{ font-size:14px; line-height:1.5; color:var(--q-muted); margin:0; }

.abd-quote-alt{
  font-size:14px; line-height:1.6; color:var(--q-muted);
  margin:18px 0 0; padding-top:16px; border-top:1px solid var(--q-stone); text-align:center;
}
.abd-quote-alt a{ color:var(--q-navy); font-weight:600; text-decoration:none; }
.abd-quote-alt a:hover{ color:var(--q-navy); text-decoration:underline; }

/* ── the form (shared by the modal and every inline placement) ── */
.abd-quote-form{ display:flex; flex-direction:column; gap:14px; margin:0; }
.abd-quote-field{ display:flex; flex-direction:column; gap:6px; }

.abd-quote-label{
  font-family:var(--q-head); font-weight:500; font-size:12px;
  letter-spacing:.08em; text-transform:uppercase; color:#485863;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-input,
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-textarea{
  font-family:var(--q-body); font-size:16px;  /* 16px stops iOS zooming on focus */
  padding:13px 14px; width:100%; margin:0;
  border:1px solid var(--q-line); border-radius:6px;
  color:var(--q-iron); background:#fff;
  -webkit-appearance:none; appearance:none;
  transition:border-color .15s, box-shadow .15s;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-textarea{
  resize:vertical; min-height:88px; line-height:1.5;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-input::placeholder,
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-textarea::placeholder{ color:#8b98a2; }
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-input:focus,
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-textarea:focus{
  outline:none; border-color:var(--q-navy); box-shadow:0 0 0 3px rgba(3,59,99,.15);
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-input[aria-invalid="true"]{
  border-color:var(--q-err);
}

.abd-quote-err{ font-size:13px; line-height:1.45; color:var(--q-err); margin:0; }
.abd-quote-formerr{
  font-size:14px; line-height:1.5; color:var(--q-err); margin:0;
  background:#fdeceb; border-left:3px solid var(--q-err); padding:10px 12px; border-radius:4px;
}
.abd-quote-formerr a{ color:var(--q-err); font-weight:600; }
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-retry{
  display:inline-block; margin-top:8px; background:none;
  border:1px solid var(--q-err); color:var(--q-err);
  font:inherit; font-size:13px; padding:6px 14px; border-radius:4px; cursor:pointer;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-retry:hover{
  background:var(--q-err); color:#fff;
}

/* ── photo dropzone ───────────────────────────────────────────── */
.abd-quote-photos{ display:flex; flex-direction:column; gap:10px; }
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-drop{
  display:flex; flex-direction:column; align-items:center; gap:4px;
  border:1px dashed var(--q-line); border-radius:8px;
  padding:18px 14px; text-align:center; cursor:pointer; background:#fbfcfc;
  transition:border-color .15s, background .15s;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-drop:hover{
  border-color:var(--q-gold); background:#fffaf0;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-drop.is-dragging{
  border-color:var(--q-gold); background:#fff4e0; border-style:solid;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-drop:focus-within{
  border-color:var(--q-navy); box-shadow:0 0 0 3px rgba(3,59,99,.15);
}
.abd-quote-drop-icon{ color:var(--q-gold); line-height:0; margin-bottom:2px; }
.abd-quote-drop-title{ font-size:14px; font-weight:600; color:var(--q-navy); }
.abd-quote-drop-hint{ font-size:12px; line-height:1.5; color:var(--q-muted); }
/* Visually hidden, still focusable and clickable through the label. */
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-file{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

.abd-quote-thumbs{
  list-style:none; margin:0; padding:0;
  display:grid; grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); gap:8px;
}
.abd-quote-thumbs:empty{ display:none; }
.abd-quote-thumb{ position:relative; }
.abd-quote-thumb img{
  display:block; width:100%; aspect-ratio:1; object-fit:cover;
  border-radius:6px; border:1px solid var(--q-line); background:var(--q-stone);
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-thumb-x{
  position:absolute; top:-6px; right:-6px; width:24px; height:24px;
  border:0; border-radius:50%; cursor:pointer; padding:0; line-height:1;
  background:var(--q-iron); color:#fff; font-size:15px; font-family:var(--q-body);
  display:flex; align-items:center; justify-content:center;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-thumb-x:hover{
  background:var(--q-err); color:#fff;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-thumb-x:focus-visible{
  outline:2px solid var(--q-gold); outline-offset:2px;
}
.abd-quote-thumb-size{
  display:block; font-size:11px; color:var(--q-muted); text-align:center; margin-top:2px;
}

/* ── honeypots ────────────────────────────────────────────────── */
.abd-quote-hp{
  position:absolute !important; left:-9999px !important; top:auto !important;
  width:1px !important; height:1px !important; overflow:hidden !important;
}

/* ── submit + progress ────────────────────────────────────────── */
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-submit{
  position:relative; display:flex; align-items:center; justify-content:center; gap:10px;
  width:100%; padding:16px; border:none; border-radius:6px; cursor:pointer;
  background:var(--q-ember); color:#fff;
  font-family:var(--q-head); font-weight:600; font-size:17px;
  letter-spacing:.04em; text-transform:uppercase;
  box-shadow:0 10px 24px rgba(196,61,34,.3);
  transition:background .15s;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-submit:hover,
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-submit:focus{
  background:var(--q-ember-dark); color:#fff;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-submit:focus-visible{
  outline:2px solid var(--q-navy); outline-offset:2px;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-submit[disabled]{
  opacity:.65; cursor:default; box-shadow:none;
}

.abd-quote-spinner{
  width:16px; height:16px; border-radius:50%; flex:none;
  border:2px solid rgba(255,255,255,.4); border-top-color:#fff;
  animation:abd-quote-spin .7s linear infinite;
}
@keyframes abd-quote-spin{ to{ transform:rotate(360deg); } }

.abd-quote-progress{ margin:0; }
.abd-quote-progress-bar{
  height:6px; border-radius:3px; background:var(--q-stone); overflow:hidden;
}
.abd-quote-progress-bar > span{
  display:block; height:100%; width:0; background:var(--q-gold); transition:width .2s ease;
}
.abd-quote-progress-text{
  font-size:12px; color:var(--q-muted); margin:6px 0 0; text-align:center;
}

.abd-quote-consent{
  font-size:12px; line-height:1.55; color:var(--q-muted); margin:0; text-align:center;
}
.abd-quote-consent a{ color:var(--q-navy); text-decoration:underline; }

/* ── success panel ────────────────────────────────────────────── */
.abd-quote-done{ text-align:center; padding:8px 0; }
.abd-quote-done-icon{ color:var(--q-ok); margin:0 0 10px; line-height:0; }
.abd-quote-done-icon svg{ display:inline-block; }
.abd-quote-done-text{
  font-size:15px; line-height:1.6; color:var(--q-iron); margin:0 0 14px;
}
/* Focused programmatically so screen readers announce it — not keyboard
   reachable, so the ring would only be visual noise. */
.abd-quote-done-text:focus{ outline:none; }
.abd-quote-done-partial{
  font-size:13px; line-height:1.5; color:#8a6100; background:#fff6e2;
  border-radius:4px; padding:8px 10px; margin:0 0 14px;
}
.abd-quote-done-call{ font-size:15px; color:var(--q-muted); margin:0 0 16px; }
.abd-quote-done-call a{
  font-family:var(--q-head); font-weight:700; font-size:20px;
  color:var(--q-navy); text-decoration:none;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-again{
  background:none; border:1px solid var(--q-line); color:var(--q-navy);
  font:inherit; font-size:14px; padding:9px 18px; border-radius:5px; cursor:pointer;
}
:is(.abd-quote-modal,.abd-quote-inline) .abd-quote-again:hover{
  border-color:var(--q-navy); background:none; color:var(--q-navy);
}
/* The panel's own "prefer to talk" line would duplicate the one in the
   success message. */
.abd-quote-panel.is-done .abd-quote-alt{ display:none; }

/* ── inline placements ────────────────────────────────────────── */
.abd-quote-inline{ font-family:var(--q-body); color:var(--q-iron); }

/* Section 23 ships with both a call-us card and the shortcode block, and its
   own CSS shows the card while keeping the shortcode hidden — so a deactivated
   plugin degrades to a phone CTA instead of printing "[lsj_quote_form …]" on
   the page. This stylesheet only loads when the plugin is active, so it is the
   right place to flip the pair. Both need !important: the widget's rules are
   `.lsj-cta .lsj-cta-*`, one specificity step above these. */
.lsj-cta-fallback{ display:none !important; }
.lsj-cta-shortcode{ display:block !important; }

@media (min-width:768px){
  .abd-quote-modal{ display:grid; place-items:center; }
  .abd-quote-modal:not([open]){ display:none; }
  .abd-quote-panel{
    position:relative; margin:auto; inset:auto;
    max-width:560px; max-height:min(90dvh,940px);
    border-radius:14px; padding:32px;
    box-shadow:0 30px 70px rgba(0,0,0,.35);
  }
  :is(.abd-quote-modal,.abd-quote-inline) .abd-quote-close{ top:14px; right:14px; }
}

@media (prefers-reduced-motion:reduce){
  .abd-quote-panel{ transition:none; transform:none; }
  .abd-quote-spinner{ animation-duration:1.6s; }
}
