/**
 * Momentum — global form field styling
 * Applies to native HTML, Gravity Forms, Contact Form 7, WPForms, Elementor HTML widgets, etc.
 * Excludes specialized components (resources hero search, location finder pill).
 */

:root {
  --momentum-form-field-bg: #ffffff;
  --momentum-form-field-border: #e0e0e0;
  --momentum-form-field-radius: 10px;
  --momentum-form-field-py: 15px;
  --momentum-form-field-px: 20px;
  --momentum-form-field-text: #4a4a4a;
  --momentum-form-placeholder: #555555;
  --momentum-form-field-inset: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  --momentum-form-textarea-min-height: 160px;
  /* Submit: align with brand gold; text dark per contact design */
  --momentum-form-submit-bg: var(--color-accent-gold, #cca633);
  --momentum-form-submit-text: #222222;
  --momentum-form-submit-radius: 50px;
  --momentum-form-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23222' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------------------
   Shared selector: text-like controls site-wide (high specificity for plugins)
   ------------------------------------------------------------------------- */
body input[type="text"]:not(.momentum-resources-hero__search-input):not(.momentum-location-finder__input),
body input[type="email"]:not(.momentum-resources-hero__search-input):not(.momentum-location-finder__input),
body input[type="tel"]:not(.momentum-resources-hero__search-input):not(.momentum-location-finder__input),
body input[type="url"]:not(.momentum-resources-hero__search-input):not(.momentum-location-finder__input),
body input[type="number"]:not(.momentum-resources-hero__search-input):not(.momentum-location-finder__input),
body input[type="date"]:not(.momentum-resources-hero__search-input):not(.momentum-location-finder__input),
body input[type="password"]:not(.momentum-resources-hero__search-input):not(.momentum-location-finder__input),
body input[type="search"]:not(.momentum-resources-hero__search-input):not(.momentum-location-finder__input),
body select:not(.momentum-location-finder__input),
body textarea,
/* Bootstrap / theme */
body .form-control:not(.momentum-resources-hero__search-input):not(.momentum-location-finder__input),
body .form-select:not(.momentum-location-finder__input),
/* Contact Form 7 */
body .wpcf7-form input[type="text"],
body .wpcf7-form input[type="email"],
body .wpcf7-form input[type="tel"],
body .wpcf7-form input[type="url"],
body .wpcf7-form input[type="number"],
body .wpcf7-form select,
body .wpcf7-form textarea,
body .wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-acceptance),
/* Gravity Forms */
body .gform_wrapper input[type="text"],
body .gform_wrapper input[type="email"],
body .gform_wrapper input[type="tel"],
body .gform_wrapper input[type="url"],
body .gform_wrapper input[type="number"],
body .gform_wrapper input[type="password"],
body .gform_wrapper select,
body .gform_wrapper textarea,
body .gform_wrapper .ginput_container input:not([type="hidden"]),
body .gform_wrapper .ginput_container select,
body .gform_wrapper .ginput_container textarea,
/* WPForms */
body .wpforms-container input[type="text"],
body .wpforms-container input[type="email"],
body .wpforms-container input[type="tel"],
body .wpforms-container input[type="url"],
body .wpforms-container input[type="number"],
body .wpforms-container select,
body .wpforms-container textarea,
/* Ninja Forms */
body .nf-form-content input[type="text"],
body .nf-form-content input[type="email"],
body .nf-form-content input[type="tel"],
body .nf-form-content input[type="url"],
body .nf-form-content input[type="number"],
body .nf-form-content select,
body .nf-form-content textarea {
  box-sizing: border-box !important;
  width: 100%;
  max-width: 100%;
  font-family: var(--font-primary, "Montserrat", Arial, Helvetica, sans-serif) !important;
  font-size: var(--fs-17, 17px) !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: var(--momentum-form-field-text) !important;
  background-color: var(--momentum-form-field-bg) !important;
  border: 1px solid var(--momentum-form-field-border) !important;
  border-radius: var(--momentum-form-field-radius) !important;
  padding: var(--momentum-form-field-py) var(--momentum-form-field-px) !important;
  box-shadow: var(--momentum-form-field-inset) !important;
  transition:
    border-color var(--transition-fast, 0.16s ease),
    box-shadow var(--transition-fast, 0.16s ease);
}

body textarea,
body .gform_wrapper textarea,
body .wpcf7-form textarea,
body .wpforms-container textarea {
  min-height: var(--momentum-form-textarea-min-height) !important;
  resize: vertical !important;
  height: auto !important;
}

/* Select: native chevron, GF/CF7 often strip appearance */
body select:not(.momentum-location-finder__input),
body .form-select:not(.momentum-location-finder__input),
body .gform_wrapper select,
body .wpcf7-form select,
body .wpforms-container select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: var(--momentum-form-select-chevron) !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 12px 8px !important;
  padding-right: 2.75rem !important;
}

body input::placeholder,
body textarea::placeholder,
body .form-control::placeholder,
body .gform_wrapper input::placeholder,
body .gform_wrapper textarea::placeholder,
body .wpcf7-form input::placeholder,
body .wpcf7-form textarea::placeholder {
  color: var(--momentum-form-placeholder) !important;
  opacity: 1 !important;
}

body input:focus-visible,
body select:focus-visible,
body textarea:focus-visible,
body .form-control:focus-visible,
body .gform_wrapper input:focus-visible,
body .gform_wrapper select:focus-visible,
body .gform_wrapper textarea:focus-visible,
body .wpcf7-form input:focus-visible,
body .wpcf7-form select:focus-visible,
body .wpcf7-form textarea:focus-visible {
  outline: none !important;
  border-color: var(--color-accent-gold, #cca633) !important;
  box-shadow: var(--momentum-form-field-inset), var(--focus-ring, 0 0 0 4px rgba(225, 200, 97, 0.35)) !important;
}

/* Checkboxes & radios: do not use “field card” look */
body input[type="checkbox"],
body input[type="radio"],
body .gform_wrapper input[type="checkbox"],
body .gform_wrapper input[type="radio"],
body .wpcf7-form input[type="checkbox"],
body .wpcf7-form input[type="radio"] {
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  border-radius: 4px !important;
  accent-color: var(--color-primary-green, #2a3f28);
}

/* -------------------------------------------------------------------------
   Submit buttons (forms only — not nav or custom UI)
   ------------------------------------------------------------------------- */
body form input[type="submit"]:not(.momentum-resources-hero__search-btn),
body form button[type="submit"]:not(.momentum-resources-hero__search-btn):not(.momentum-location-finder__btn),
body .wpcf7-submit,
body .gform_wrapper .gform_button,
body .gform_wrapper input[type="submit"].gform_button,
body .gform_wrapper input[type="submit"],
body .wpforms-container .wpforms-submit,
body .elementor-widget-html form input[type="submit"],
body .elementor-widget-html form button[type="submit"],
body .nf-form-content input[type="submit"],
body .nf-form-content button[type="submit"] {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  font-family: var(--font-primary, "Montserrat", Arial, Helvetica, sans-serif) !important;
  font-weight: 600 !important;
  font-size: var(--fs-17, 17px) !important;
  line-height: 1.2 !important;
  color: var(--momentum-form-submit-text) !important;
  background-color: var(--momentum-form-submit-bg) !important;
  border: none !important;
  border-radius: var(--momentum-form-submit-radius) !important;
  padding: 12px 30px !important;
  padding-right: 3.25rem !important;
  min-height: 48px !important;
  cursor: pointer !important;
  transition:
    background-color var(--transition-normal, 0.26s ease),
    box-shadow var(--transition-normal, 0.26s ease),
    transform var(--transition-normal, 0.26s ease);
  position: relative !important;
  box-shadow: none !important;
}

body form input[type="submit"]:not(.momentum-resources-hero__search-btn):hover,
body form button[type="submit"]:not(.momentum-resources-hero__search-btn):not(.momentum-location-finder__btn):hover,
body .wpcf7-submit:hover,
body .gform_wrapper .gform_button:hover,
body .gform_wrapper input[type="submit"]:hover,
body .wpforms-container .wpforms-submit:hover {
  filter: brightness(0.97);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12) !important;
}

/* Optional: match theme arrow on submit when using data-arrow */
body form button[type="submit"][data-arrow="true"]::after,
body .gform_wrapper .gform_button.button[data-arrow="true"]::after {
  content: "\f138";
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Sharp" !important;
  font-weight: 900 !important;
  position: absolute !important;
  right: 0.65rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 999px !important;
  background-color: rgba(34, 34, 34, 0.12) !important;
  color: var(--momentum-form-submit-text) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: var(--fs-18, 18px) !important;
}

/* Gravity Forms: layout + validation */
body .gform_wrapper {
  --gf-field-gap-y: 1rem;
  --gf-field-gap-x: 1rem;
}

body .gform_wrapper .gfield {
  margin-bottom: var(--gf-field-gap-y) !important;
}

body .gform_wrapper .gform_fields {
  row-gap: var(--gf-field-gap-y) !important;
  column-gap: var(--gf-field-gap-x) !important;
}

body .gform_wrapper .gfield--type-section {
  border: none !important;
  background: transparent !important;
}

/* Inline validation / required hints (tooltip-like) */
body .gform_wrapper .gfield_description.validation_message,
body .gform_wrapper .validation_message,
body .wpcf7-not-valid-tip {
  display: inline-block !important;
  margin-top: 0.35rem !important;
  padding: 0.4rem 0.65rem !important;
  font-size: 0.8125rem !important;
  font-family: var(--font-primary, "Montserrat", Arial, Helvetica, sans-serif) !important;
  color: var(--color-text-body, #333) !important;
  background: #f5f5f5 !important;
  border: 1px solid var(--momentum-form-field-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

body .gform_wrapper .gfield_error input,
body .gform_wrapper .gfield_error select,
body .gform_wrapper .gfield_error textarea,
body .wpcf7-form .wpcf7-not-valid {
  border-color: #c45c4a !important;
}

/* Contact Form 7 response area */
body .wpcf7-response-output {
  border-radius: var(--momentum-form-field-radius) !important;
  margin: 1rem 0 0 !important;
  padding: 0.75rem 1rem !important;
  font-family: var(--font-primary, "Montserrat", Arial, Helvetica, sans-serif) !important;
}

/* File inputs: light frame only */
body input[type="file"] {
  font-family: var(--font-primary, "Montserrat", Arial, Helvetica, sans-serif) !important;
  font-size: var(--fs-16, 16px) !important;
  color: var(--momentum-form-field-text) !important;
}
