/* =========================================================================
   SDM Services-Page Contact Form  —  sdm-services-form.css
   Ads 7.2 · form-only extract from digital-marketing-lp.css (Ads 3.3 canonical)

   Scoped entirely under .sdm-form-card so it CANNOT collide with the live LP
   (.form-card / .dm-lp) or any other Avada / WPForms form on the site. The
   services form must be wrapped in <div class="sdm-form-card"> (a class the LP
   does not use), so the two never intersect and the LP stays untouched.

   MUST be enqueued as an EXTERNAL stylesheet (see functions snippet) — never
   inline, never Customizer "Additional CSS", never a Fusion Custom CSS box.
   WP Rocket RUCSS strips inline CSS for logged-out visitors; an external
   enqueued file survives (safelist its handle if RUCSS trims it).

   Design tokens are scoped to the card, not :root, so they never leak into the
   global custom-property namespace or clash with Avada's --awb-/--fusion- vars.

   Values verified against lp-live-0715.css (2026-07-15 production pull).
   ========================================================================= */

/* --- Design tokens: only the subset the form rules reference --- */
.sdm-form-card{
  --paper:      #FAF8F2;
  --ink:        #18221F;
  --muted:      #555F59;
  --spruce:     #1C4536;
  --spruce-deep:#143228;
  --brass:      #9A6F28;
  --brass-ink:  #6F4E1C;
  --line:       #DAD7CC;

  --serif: "Iowan Old Style","Palatino Linotype","Book Antiqua",Palatino,Georgia,"Times New Roman",serif;
  --sans:  system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

.sdm-form-card,
.sdm-form-card *{ box-sizing:border-box; }

/* --- CARD WRAPPER (was .dm-lp .form-card) ---
   Base typography is set here explicitly because on the LP it was inherited
   from the .dm-lp <body> scope, which does not exist on services pages. */
.sdm-form-card{
  background:#fff; border:1px solid var(--line); border-radius:12px;
  box-shadow:0 1px 0 var(--line), 0 24px 48px -28px rgba(20,50,40,.40);
  padding:clamp(1.4rem,2.4vw,2rem); position:relative; overflow:hidden;
  scroll-margin-top:84px;
  font-family:var(--sans); color:var(--ink);
  font-size:17px; line-height:1.65;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.sdm-form-card::before{
  content:""; position:absolute; inset:0 0 auto 0; height:4px; background:var(--brass);
}

/* Optional headline / WPForms title + description (only render if the form or
   embed includes them; harmless otherwise) */
.sdm-form-card h2,
.sdm-form-card .wpforms-title{
  font-family:var(--serif); font-weight:600; font-size:1.42rem;
  line-height:1.15; margin:.25rem 0 .35rem;
}
.sdm-form-card .form-note,
.sdm-form-card .wpforms-description{
  font-size:.86rem; color:var(--muted); margin-bottom:.55rem;
}

/* Optional "or call us" line */
.sdm-form-card .form-call{ text-align:center; font-size:.92rem; color:var(--muted); margin-top:1rem; }
.sdm-form-card .form-call a{ color:var(--spruce); font-weight:700; text-decoration:none; white-space:nowrap; }

/* --- WPFORMS FIELD TREATMENT (was .dm-lp .form-card .wpforms-*) --- */
.sdm-form-card .wpforms-container{ margin:0; }
.sdm-form-card .wpforms-form .wpforms-field{ padding:0; margin-bottom:.85rem; }

/* Neutralize WPForms per-field size classes so every field fills the column
   regardless of the "Field Size" setting in the builder */
.sdm-form-card .wpforms-form .wpforms-field-small,
.sdm-form-card .wpforms-form .wpforms-field-medium,
.sdm-form-card .wpforms-form .wpforms-field-large{ max-width:100%; width:100%; }

.sdm-form-card .wpforms-form .wpforms-field-label{
  display:block; font-size:.78rem; font-weight:700; letter-spacing:.04em;
  text-transform:uppercase; color:var(--muted); margin-bottom:.35rem; line-height:1.3;
}

.sdm-form-card .wpforms-form input[type=text],
.sdm-form-card .wpforms-form input[type=email],
.sdm-form-card .wpforms-form input[type=tel],
.sdm-form-card .wpforms-form input[type=url],
.sdm-form-card .wpforms-form textarea,
.sdm-form-card .wpforms-form select{
  width:100%; font-family:var(--sans); font-size:1rem; color:var(--ink);
  background:var(--paper); border:1px solid var(--line); border-radius:7px;
  padding:.72rem .85rem; transition:border-color .15s ease, box-shadow .15s ease;
}
.sdm-form-card .wpforms-form input:focus,
.sdm-form-card .wpforms-form textarea:focus,
.sdm-form-card .wpforms-form select:focus{
  outline:none; border-color:var(--spruce); box-shadow:0 0 0 3px rgba(28,69,54,.14);
}
.sdm-form-card .wpforms-form textarea{ resize:vertical; min-height:76px; }
.sdm-form-card .wpforms-form .wpforms-required-label{ color:var(--brass-ink); }

/* --- SUBMIT BUTTON --- */
.sdm-form-card .wpforms-form .wpforms-submit-container{ margin-top:.25rem; }
.sdm-form-card .wpforms-form .wpforms-submit{
  font-family:var(--sans); font-size:1rem; font-weight:600; letter-spacing:.01em;
  border:0; border-radius:6px; padding:.95rem 1.5rem; cursor:pointer;
  background:var(--spruce) !important; color:#fff !important; width:100%; line-height:1.25;
  display:flex; align-items:center; justify-content:center; text-align:center; min-height:52px;
  transition:background .18s ease, transform .18s ease;
}
.sdm-form-card .wpforms-form .wpforms-submit:hover{
  background:var(--spruce-deep) !important; transform:translateY(-1px);
}

/* --- Accessibility parity with the LP --- */
.sdm-form-card a:focus-visible,
.sdm-form-card input:focus-visible,
.sdm-form-card textarea:focus-visible,
.sdm-form-card button:focus-visible{
  outline:3px solid var(--brass); outline-offset:2px;
}
@media (prefers-reduced-motion:reduce){
  .sdm-form-card *{ animation:none !important; transition:none !important; }
}

/* Win over the site's .seattle-form black-button rule (button[type=submit] !important).
   Higher specificity: wrapper class + .wpforms-form + attribute selector. */
.sdm-form-card .wpforms-form button[type="submit"],
.sdm-form-card .wpforms-form input[type="submit"],
.sdm-form-card .wpforms-form .wpforms-submit{
  background:var(--spruce) !important;   /* #1C4536 */
  color:#fff !important;
}
.sdm-form-card .wpforms-form button[type="submit"]:hover,
.sdm-form-card .wpforms-form input[type="submit"]:hover,
.sdm-form-card .wpforms-form .wpforms-submit:hover{
  background:var(--spruce-deep) !important;   /* #143228 */
}
