/* Seal Tech Forms — front end
   Two forms, one stylesheet:
     .st-ask   — the full-bleed CTA band, light by default
                 (add theme="dark" to a shortcode for the old navy band)
     .stf-quote — the full quote request form, on white */

/* ═══════════════════════════════════════════════════════════════════════
   SHARED
   ═══════════════════════════════════════════════════════════════════ */

/* Visually hidden labels. Absolute, so they stay out of the form's grid
   flow while remaining available to screen readers and autofill. */
.stf-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.stf-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Spinner: only visible while sending. */
.stf-spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  border-radius: 50%;
}
.stf-btn.loading .stf-spinner { display: inline-block; animation: stf-spin .7s linear infinite; }
@keyframes stf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .stf-btn.loading .stf-spinner { animation: none; } }


/* ═══════════════════════════════════════════════════════════════════════
   ASK A QUESTION  —  CTA band (light default, .st-ask--dark opt-in)
   ═══════════════════════════════════════════════════════════════════ */

/* Full-bleed: escapes the theme's content wrapper so the band reaches both
   edges. overflow-x:clip on the page stops the breakout causing sideways
   scroll on mobile. */
html:has(.st-ask--full),
body:has(.st-ask--full) { overflow-x: clip; }

.st-ask--full {
  width: 100vw; max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.st-ask {
  background: #f2f6f9;
  border-top: 1px solid #dbe2e8;
  border-bottom: 1px solid #dbe2e8;
  padding: 44px 22px;
  font-family: "Segoe UI", system-ui, sans-serif;
  box-sizing: border-box;
}
.st-ask__in {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 300px 1fr; gap: 34px; align-items: start;
}
.st-ask__lead h2 { font: 800 30px/1.15 inherit; color: #003d76; margin: 0 0 8px; }
.st-ask__lead p  { color: #4a5f72; font-size: 16px; line-height: 1.5; margin: 0; }

.st-ask__form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* The chip component lives in the quote-form section below and reads these
   custom properties off its container, so the band declares them too rather
   than duplicating the whole rule set. */
.st-ask {
  --navy:#12202e; --green:#6abf16; --green-dark:#4f9e12; --line:#dce2e7;
}

/* ── Topic row + worked example ─────────────────────────────────────── */
.st-ask__topic { grid-column: 1 / -1; }
.st-ask__tlabel {
  display: block; margin-bottom: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #003d76;
}
/* Slightly tighter than the quote form's chips: this is a band, not a page. */
.st-ask .stf-chip { padding: 8px 15px; font-size: 14px; }

.st-ask__eg {
  grid-column: 1 / -1; margin: -6px 0 0;
  font-size: 14px; line-height: 1.5; color: #6f8190;
}

.st-ask__form input,
.st-ask__form textarea {
  grid-column: span 1; width: 100%; box-sizing: border-box;
  background: #fff; border: 1px solid #cfd8e0; border-radius: 8px;
  color: #12202e; font: 400 16px/1.4 inherit; padding: 16px 18px;
}
.st-ask__form textarea { grid-column: 1 / -1; resize: vertical; min-height: 96px; }
.st-ask__form input::placeholder,
.st-ask__form textarea::placeholder { color: #7d8f9d; opacity: 1; }
.st-ask__form input:focus,
.st-ask__form textarea:focus { outline: 2px solid #6abf16; outline-offset: 1px; border-color: #6abf16; }
.st-ask__form input.stf-err,
.st-ask__form textarea.stf-err { border-color: #d9534f; background: #fff6f6; }

.st-ask__row {
  grid-column: 1 / -1; display: flex; align-items: center;
  justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.st-ask__note { color: #6f8190; font-size: 14px; margin: 0; }

.st-ask__btn {
  background: #6abf16; color: #fff; border: 0; border-radius: 26px;
  font: 700 17px/1 inherit; padding: 17px 34px; cursor: pointer;
  box-shadow: 0 3px 0 #4f9e12;
  display: inline-flex; align-items: center; gap: 10px;
}
.st-ask__btn:hover:not(:disabled) { background: #5aa513; }
.st-ask__btn:disabled { opacity: .75; cursor: default; box-shadow: 0 3px 0 #3f7d0e; }

/* Message row. */
.st-ask__msg { grid-column: 1 / -1; }
.st-ask__msg.ok  { background: #eaf7e6; color: #1f5f22; border-color: #b7e0ac; }
.st-ask__msg.err { background: #fdeaea; color: #7a2020; border-color: #f0b7b7; }

/* ── Dark variant ─────────────────────────────────────────────────────────
   The original navy band, kept for anywhere it still suits — the home page
   slider area, for instance. Opt in per form:  [ask_question theme="dark"] */
.st-ask--dark { background: #12202e; border-top-color: #12202e; border-bottom-color: #12202e; }
.st-ask--dark .st-ask__lead h2 { color: #fff; }
.st-ask--dark .st-ask__lead p  { color: #a9bccb; }
.st-ask--dark .st-ask__form input,
.st-ask--dark .st-ask__form textarea { background: #1b3040; border-color: #2f4a5e; color: #fff; }
.st-ask--dark .st-ask__form input::placeholder,
.st-ask--dark .st-ask__form textarea::placeholder { color: #8ba3b5; }
.st-ask--dark .st-ask__form input.stf-err,
.st-ask--dark .st-ask__form textarea.stf-err { border-color: #d9534f; background: #26202a; }
.st-ask--dark .st-ask__note,
.st-ask--dark .st-ask__eg { color: #8ba3b5; }
.st-ask--dark .st-ask__tlabel { color: #fff; }
.st-ask--dark .stf-chip { background: #1b3040; border-color: #2f4a5e; color: #dbe7f0; }
.st-ask--dark .stf-chip:hover { border-color: var(--green); color: #fff; }
.st-ask--dark .stf-chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.st-ask--dark .st-ask__msg.ok  { background: #123a1e; color: #b8f08a; border-color: #2f7a33; }
.st-ask--dark .st-ask__msg.err { background: #3a1616; color: #f5b5b5; border-color: #7a2f2f; }

@media (max-width: 900px) { .st-ask__in { grid-template-columns: 1fr; gap: 22px; } }
@media (max-width: 640px) {
  .st-ask__form { grid-template-columns: 1fr; }
  .st-ask__btn  { width: 100%; justify-content: center; }
}


/* ═══════════════════════════════════════════════════════════════════════
   QUOTE FORM  —  white
   ═══════════════════════════════════════════════════════════════════ */

.stf-quote {
  --navy:#12202e; --soft:#4a5f72; --green:#6abf16; --green-dark:#4f9e12;
  --line:#dce2e7; --field:#fff; --shade:#f6f8f9;

  max-width: 780px; margin: 0 auto;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #1a2733; box-sizing: border-box;
}
.stf-quote *, .stf-quote *::before, .stf-quote *::after { box-sizing: border-box; }

.stf-quote__head { margin-bottom: 30px; }
.stf-quote__head h2 { font-size: clamp(26px,4vw,34px); line-height: 1.15; font-weight: 800; color: var(--navy); margin: 0 0 10px; letter-spacing: -.01em; }
.stf-quote__head p  { font-size: 17px; line-height: 1.55; color: var(--soft); margin: 0; max-width: 56ch; }

/* Grouping the form into named blocks turns one intimidating wall of 12
   fields into four short asks. Same fields, much lower drop-off. */
.stf-block { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 26px 0 4px; }
.stf-block:first-of-type { border-top: 0; padding-top: 0; }
/* "optional" tag next to a legend — tells people they can skip a whole block
   at a glance, which is most of what makes a short form feel short. */
.stf-opt {
  margin-left: 8px; padding: 2px 8px; border-radius: 20px;
  background: #eef2f5; color: #6f8190;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: none;
  vertical-align: middle;
}

.stf-block > legend {
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy); padding: 0; margin-bottom: 6px;
}
.stf-block > legend b { color: var(--green-dark); }
.stf-hint { font-size: 14px; line-height: 1.5; color: var(--soft); margin: 0 0 16px; }

.stf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.stf-f { display: flex; flex-direction: column; gap: 6px; }
.stf-f--wide { grid-column: 1 / -1; }
.stf-f > span { font-size: 14px; font-weight: 600; color: var(--navy); }
.stf-f > span b { color: var(--green-dark); font-weight: 700; }

.stf-quote input[type="text"],
.stf-quote input[type="email"],
.stf-quote input[type="tel"],
.stf-quote select,
.stf-quote textarea {
  width: 100%; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--field); color: inherit;
  font: 400 16px/1.45 inherit; /* 16px stops iOS zooming the page on focus */
  transition: border-color .15s ease, box-shadow .15s ease;
}
.stf-quote textarea { resize: vertical; min-height: 92px; }
.stf-quote input::placeholder, .stf-quote textarea::placeholder { color: #9aa7b2; }
.stf-quote input:focus, .stf-quote select:focus, .stf-quote textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(106,191,22,.16);
}
.stf-quote .stf-err { border-color: #d9534f !important; box-shadow: 0 0 0 3px rgba(217,83,79,.14) !important; }

/* ── Chips ─────────────────────────────────────────────────────────── */
.stf-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.stf-chip {
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 22px; padding: 10px 17px;
  font: 600 15px/1 inherit; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.stf-chip:hover { border-color: var(--green); color: var(--green-dark); }
.stf-chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.stf-chip:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.stf-chips.stf-err { outline: 2px solid #d9534f; outline-offset: 6px; border-radius: 8px; }

/* ── Photo picker ──────────────────────────────────────────────────── */
.stf-drop {
  display: flex; align-items: center; gap: 15px;
  border: 2px dashed var(--line); border-radius: 10px;
  padding: 22px 24px; background: var(--shade); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.stf-drop:hover, .stf-drop.dragging { border-color: var(--green); background: #f2f9ea; }
.stf-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.stf-drop__icon { color: var(--green-dark); flex: none; }
.stf-drop__icon svg { width: 28px; height: 28px; display: block; }
.stf-drop__text { display: flex; flex-direction: column; gap: 2px; }
.stf-drop__text b { font-size: 16px; font-weight: 700; color: var(--navy); }
.stf-drop__text small { font-size: 14px; color: var(--soft); }
.stf-drop:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(106,191,22,.16); }

.stf-thumbs { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stf-thumbs li {
  position: relative; width: 84px; height: 84px;
  border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--shade);
}
.stf-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stf-thumbs .stf-thumb-x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: rgba(18,32,46,.82); color: #fff;
  font: 700 14px/1 inherit; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.stf-thumbs .stf-thumb-x:hover { background: #b3261e; }

/* ── Footer ────────────────────────────────────────────────────────── */
.stf-quote__foot { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.stf-quote__btn {
  background: var(--green); color: #fff; border: 0; border-radius: 28px;
  padding: 17px 40px; font: 700 18px/1 inherit; cursor: pointer;
  box-shadow: 0 3px 0 var(--green-dark);
  display: inline-flex; align-items: center; gap: 10px;
}
.stf-quote__btn:hover:not(:disabled) { background: var(--green-dark); }
.stf-quote__btn:disabled { opacity: .75; cursor: default; }
.stf-quote__note { font-size: 14px; line-height: 1.55; color: var(--soft); margin: 14px 0 0; max-width: 56ch; }
.stf-quote__note a { color: var(--green-dark); font-weight: 600; }

@media (max-width: 600px) {
  .stf-grid { grid-template-columns: 1fr; }
  .stf-quote__btn { width: 100%; justify-content: center; }
}


/* ═══════════════════════════════════════════════════════════════════════
   MESSAGES — hidden until they have something to say, so neither form
   reserves dead space on first paint.
   ═══════════════════════════════════════════════════════════════════ */
.stf-msg { display: none; margin: 0 0 4px; padding: 0; border-radius: 8px;
           font: 600 15px/1.45 inherit; border: 1px solid transparent; }
.stf-msg.ok, .stf-msg.err { display: block; padding: 14px 18px; }
.stf-quote .stf-msg { margin-bottom: 22px; }
.stf-quote .stf-msg.ok  { background: #e6f6ed; color: #1a7a43; border-color: #b6e6c9; }
.stf-quote .stf-msg.err { background: #fdeceb; color: #b3261e; border-color: #f6c6c2; }

.stf-quote a:focus-visible, .stf-quote button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
