/*
Theme Name: EKG Base
Theme URI: https://ekgmarketing.com/
Author: EKG Marketing
Author URI: https://ekgmarketing.com/
Description: Thin parent block theme for all EKG sites. Holds the shared token STRUCTURE (theme.json slugs, layout, spacing, base block styles) plus header/footer template-part scaffolding. Brand identity — palette, fonts, logo, chrome — lives in each child theme (e.g. Heavenly Puppies). Keep this parent thin; a quiet parent is what stops inheritance becoming drift.
Version: 0.1.5
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ekg-base
*/

/* Parent ships almost no front-end CSS on purpose — styling is token-driven via
   theme.json, and each child theme owns its chrome stylesheet. Shared, genuinely
   universal rules live here (first one landed 2026-07-03: the Fluent Forms baseline). */

/* =========================================================================
   Fluent Forms — EKG house baseline (fleet-wide)     v0.1.3 · 2026-07-03
   Ref: Development/EKG-Forms-Contact-Standard.md
   -------------------------------------------------------------------------
   Restyles Fluent Forms' DEFAULT skin to the EKG house look using theme.json
   TOKENS only — no hardcoded brand colors. Each child theme's palette/fonts
   flow through automatically because children override the shared slugs:
     eric  → navy/clay/paper + IBM Plex   ·   neutral ekg-base → parent defaults.
   So there is NO per-site form CSS. A child that needs to tweak its forms
   overrides just the --ekg-form-* vars below (one place), never the rules.

   Scope: rules are prefixed `.fluentform .frm-fluent-form` (specificity 0,3,0)
   so they win over Fluent Forms' shipped default-skin CSS regardless of
   stylesheet load order — without !important. Verified against the live
   contact form markup (eric form id 1), which uses labelPlacement:top +
   asterisk-right + inline errors + Akismet honeypot.
   ========================================================================= */

.fluentform {
  /* Form token layer — the single rebrand surface. Each maps to a house
     token with a safe fallback for a site that hasn't defined that slug. */
  --ekg-form-font:         var(--wp--preset--font-family--body, inherit);
  --ekg-form-text:         var(--wp--preset--color--ink,     #1a1f29);
  --ekg-form-label:        var(--wp--preset--color--ink,     #1a1f29);
  --ekg-form-muted:        var(--wp--preset--color--sub,     #6b7280);
  --ekg-form-control-bg:   var(--wp--preset--color--panel,   #ffffff);
  --ekg-form-border:       var(--wp--preset--color--line,    rgba(0,0,0,.16));
  --ekg-form-accent:       var(--wp--preset--color--accent,  #2f77b0);
  --ekg-form-error:        var(--wp--preset--color--clay,    #b62935);
  --ekg-form-success:      var(--wp--preset--color--success, #3fa45c);
  --ekg-form-btn-bg:       var(--wp--preset--color--navy,    var(--wp--preset--color--ink, #1a1f29));
  --ekg-form-btn-bg-hover: var(--wp--preset--color--accent,  #2f77b0);
  --ekg-form-btn-text:     var(--wp--preset--color--on-dark, #ffffff);
  --ekg-form-radius:       5px;                       /* eric square; sane fleet default */
  --ekg-form-row-gap:      var(--wp--preset--spacing--50, 22px);
}

/* form-wide type */
.fluentform .frm-fluent-form,
.fluentform .frm-fluent-form .ff-el-form-control,
.fluentform .frm-fluent-form .ff-btn { font-family: var(--ekg-form-font); }

/* rows */
.fluentform .frm-fluent-form .ff-el-group { margin-bottom: var(--ekg-form-row-gap); }

/* labels */
.fluentform .frm-fluent-form .ff-el-input--label { margin-bottom: 7px; }
.fluentform .frm-fluent-form .ff-el-input--label label {
  font-size: .9rem; font-weight: 600; line-height: 1.35;
  letter-spacing: .005em; color: var(--ekg-form-label);
}
/* required asterisk → house error hue (recolor only; keep FF's mark) */
.fluentform .frm-fluent-form .ff-el-is-required.asterisk-right label:after,
.fluentform .frm-fluent-form .ff-el-input--label.ff-el-is-required label:after {
  color: var(--ekg-form-error);
}

/* inputs · textarea · select */
.fluentform .frm-fluent-form .ff-el-form-control {
  width: 100%; box-sizing: border-box; min-height: 46px;
  padding: .68rem .85rem;
  font-size: var(--wp--preset--font-size--medium, 1rem);   /* 16px → no iOS zoom-on-focus */
  line-height: 1.5; color: var(--ekg-form-text);
  background: var(--ekg-form-control-bg);
  border: 1px solid var(--ekg-form-border);
  border-radius: var(--ekg-form-radius); box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fluentform .frm-fluent-form textarea.ff-el-form-control { min-height: 140px; line-height: 1.6; resize: vertical; }
.fluentform .frm-fluent-form .ff-el-form-control::placeholder { color: var(--ekg-form-muted); opacity: 1; }
.fluentform .frm-fluent-form .ff-el-form-control:hover {
  border-color: color-mix(in srgb, var(--ekg-form-border) 55%, var(--ekg-form-text));
}
.fluentform .frm-fluent-form .ff-el-form-control:focus,
.fluentform .frm-fluent-form .ff-el-form-control:focus-visible {
  outline: none; border-color: var(--ekg-form-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ekg-form-accent) 22%, transparent);
}

/* two-column name row → flex; auto-stacks on narrow screens (no media query) */
.fluentform .frm-fluent-form .ff-t-container { display: flex; flex-wrap: wrap; gap: 0 clamp(14px, 3vw, 22px); margin: 0; }
.fluentform .frm-fluent-form .ff-t-cell { flex: 1 1 200px; padding: 0; }

/* error state */
.fluentform .frm-fluent-form .ff-el-form-control[aria-invalid="true"],
.fluentform .frm-fluent-form .ff-el-is-error .ff-el-form-control { border-color: var(--ekg-form-error); }
.fluentform .frm-fluent-form .ff-el-form-control[aria-invalid="true"]:focus,
.fluentform .frm-fluent-form .ff-el-is-error .ff-el-form-control:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ekg-form-error) 20%, transparent);
}
.fluentform .frm-fluent-form .ff-el-group .error,
.fluentform .frm-fluent-form .text-danger {
  margin-top: 6px; font-size: var(--wp--preset--font-size--small, .8125rem);
  line-height: 1.4; color: var(--ekg-form-error);
}

/* submit — mirrors eric's site button (navy · 5px · weight 600) via tokens */
.fluentform .frm-fluent-form .ff_submit_btn_wrapper { margin-top: 4px; }
.fluentform .frm-fluent-form .ff-btn-submit {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.9rem;
  font-size: 1rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ekg-form-btn-text); background: var(--ekg-form-btn-bg);
  border: 0; border-radius: var(--ekg-form-radius); cursor: pointer;
  transition: background-color .15s ease, transform .05s ease;
}
.fluentform .frm-fluent-form .ff-btn-submit:hover { background: var(--ekg-form-btn-bg-hover); }
.fluentform .frm-fluent-form .ff-btn-submit:active { transform: translateY(1px); }
.fluentform .frm-fluent-form .ff-btn-submit:focus-visible {
  outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ekg-form-accent) 35%, transparent);
}

/* success message + form-level error stack (plain fallbacks first, then tinted) */
.fluentform .ff-message-success {
  padding: 1rem 1.15rem; font-size: 1rem; line-height: 1.55; color: var(--ekg-form-text);
  background: #f1f7f2; background: color-mix(in srgb, var(--ekg-form-success, #3fa45c) 12%, #fff);
  border: 1px solid #cfe6d6; border: 1px solid color-mix(in srgb, var(--ekg-form-success, #3fa45c) 35%, #fff);
  border-left: 3px solid var(--ekg-form-success, #3fa45c); border-radius: var(--ekg-form-radius);
}
.fluentform .ff-errors-in-stack:not(:empty) {
  margin-bottom: 1rem; color: var(--ekg-form-error);
  font-size: var(--wp--preset--font-size--small, .8125rem);
}

/* spam honeypot must never render (belt-and-suspenders; FF also hides inline) */
.fluentform .akismet-fields-container { display: none !important; }
