/* ==========================================================
   New Parenting — WS Form styling  (v2)
   Loaded only when WS Form is active (see inc/wpforms.php).

   Framework-agnostic: targets HTML elements inside the theme's .np-wsf
   wrapper rather than WS Form class names, which change with the selected
   framework (WS Form / Bootstrap / Foundation / theme). !important is used
   deliberately so these rules win over WS Form's own base stylesheet.

   .np-wsf--dark   guide band + newsletter (on indigo)
   .np-wsf--light  contact card (on cream)
   ========================================================== */

/* ---------- reset WS Form's own spacing / boxes ---------- */
.np-wsf, .np-wsf form, .np-wsf fieldset{ margin:0 !important; padding:0 !important; border:0 !important; background:none !important; box-shadow:none !important; min-width:0; }
.np-wsf form{ display:block; }
.np-wsf [data-type], .np-wsf [class*="field-wrapper"], .np-wsf [class*="form-group"]{ background:none !important; box-shadow:none !important; border:0 !important; margin-bottom:var(--s5) !important; }
.np-wsf [data-type="submit"], .np-wsf [data-type="button"]{ margin-bottom:0 !important; }

/* ---------- labels ---------- */
.np-wsf label, .np-wsf legend, .np-wsf [class*="label"]{
  font-family:var(--f-body) !important; font-size:var(--t-xs) !important; font-weight:700 !important;
  letter-spacing:.12em !important; text-transform:uppercase !important; line-height:1.3 !important;
  margin:0 0 .4rem !important; padding:0 !important; display:block; float:none !important; width:auto !important;
}
.np-wsf .wsf-text-danger, .np-wsf [class*="required"]{ color:var(--terracotta) !important; }

/* ---------- text inputs, selects, textareas ---------- */
.np-wsf input[type="text"], .np-wsf input[type="email"], .np-wsf input[type="tel"], .np-wsf input[type="url"],
.np-wsf input[type="number"], .np-wsf input[type="search"], .np-wsf input[type="password"], .np-wsf input[type="date"],
.np-wsf select, .np-wsf textarea{
  display:block !important; width:100% !important; max-width:none !important; height:auto !important; min-height:0 !important;
  margin:0 !important; padding:.9rem 1.1rem !important; border:1.5px solid transparent !important; border-radius:var(--r2) !important;
  box-shadow:none !important; outline:none; font-family:var(--f-body) !important; font-size:var(--t-md) !important;
  font-weight:400 !important; line-height:1.4 !important; color:var(--charcoal) !important; background-color:var(--cream) !important;
  background-image:none; transition:border-color .25s var(--ease), box-shadow .25s var(--ease); appearance:none; -webkit-appearance:none;
}
.np-wsf textarea{ min-height:150px !important; line-height:1.6 !important; resize:vertical; }
.np-wsf select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234A3B6B' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important; background-position:right 1rem center !important; padding-right:2.6rem !important;
}
.np-wsf ::placeholder{ color:#9b938a !important; opacity:1; }
.np-wsf input:focus, .np-wsf select:focus, .np-wsf textarea:focus{ border-color:var(--lavender) !important; box-shadow:0 0 0 4px rgba(191,175,220,.35) !important; }

/* ---------- checkbox & radio (consent) ---------- */
.np-wsf input[type="checkbox"], .np-wsf input[type="radio"]{
  appearance:auto; -webkit-appearance:auto; width:19px !important; height:19px !important; min-height:0 !important;
  margin:2px .7rem 0 0 !important; padding:0 !important; background:#fff !important; border:0 !important;
  accent-color:var(--terracotta); cursor:pointer; flex:none !important; display:inline-block !important; vertical-align:top;
}
.np-wsf input[type="checkbox"] + label, .np-wsf input[type="radio"] + label,
.np-wsf label:has(input[type="checkbox"]), .np-wsf label:has(input[type="radio"]),
.np-wsf [data-type="checkbox"] li label, .np-wsf [data-type="radio"] li label{
  font-size:var(--t-sm) !important; font-weight:400 !important; line-height:1.5 !important; letter-spacing:0 !important;
  text-transform:none !important; margin:0 !important; display:inline !important; cursor:pointer;
}
.np-wsf [data-type="checkbox"] ul, .np-wsf [data-type="radio"] ul{ list-style:none !important; margin:0 !important; padding:0 !important; }
.np-wsf [data-type="checkbox"] li, .np-wsf [data-type="radio"] li{ margin:0 0 .4rem !important; padding:0 !important; display:flex !important; align-items:flex-start; }

/* ---------- help text (privacy link lives here) ---------- */
.np-wsf small, .np-wsf [class*="help"], .np-wsf [id*="-help-"]{
  display:block !important; margin-top:.45rem !important; font-family:var(--f-body) !important; font-size:var(--t-xs) !important;
  font-weight:400 !important; letter-spacing:0 !important; text-transform:none !important; line-height:1.5 !important;
}

/* ---------- submit button ---------- */
.np-wsf button, .np-wsf input[type="submit"], .np-wsf [type="submit"]{
  display:inline-flex !important; align-items:center; justify-content:center; gap:.6rem; width:auto !important; min-height:48px;
  height:auto !important; margin:0 !important; padding:.95rem 1.6rem !important; border:0 !important; border-radius:var(--r-pill) !important;
  font-family:var(--f-body) !important; font-size:var(--t-sm) !important; font-weight:700 !important; line-height:1 !important;
  letter-spacing:.01em !important; text-transform:none !important; background:var(--terracotta) !important; background-image:none !important;
  color:#fff !important; box-shadow:0 10px 24px -12px rgba(188,91,57,.7) !important; cursor:pointer;
  transition:background-color .25s var(--ease), transform .25s var(--ease);
}
.np-wsf button:hover, .np-wsf input[type="submit"]:hover{ background:var(--terracotta-dp) !important; transform:translateY(-1px); }
.np-wsf button:focus-visible, .np-wsf input[type="submit"]:focus-visible{ outline:3px solid var(--lavender) !important; outline-offset:3px; }

/* ---------- validation ---------- */
.np-wsf [class*="invalid"], .np-wsf [id*="invalid-feedback"], .np-wsf [role="alert"]{
  display:block; margin-top:.35rem !important; padding:0 !important; background:none !important; border:0 !important;
  font-family:var(--f-body) !important; font-size:var(--t-xs) !important; font-weight:600 !important; font-style:normal !important;
  letter-spacing:.02em !important; text-transform:none !important; color:#E8A58D !important;
}
.np-wsf input[class*="invalid"], .np-wsf select[class*="invalid"], .np-wsf textarea[class*="invalid"],
.np-wsf [class*="validated"] input:invalid, .np-wsf [class*="validated"] select:invalid, .np-wsf [class*="validated"] textarea:invalid{ border-color:#E8A58D !important; }

/* ---------- messages (Show Message action) ---------- */
.np-wsf [class*="alert"], .np-wsf [class*="success"]{
  margin:0 !important; padding:var(--s6) !important; border-radius:var(--r3) !important; max-width:34rem;
  font-family:var(--f-body) !important; font-size:var(--t-sm) !important; line-height:1.6 !important;
}
.np-wsf [class*="alert"] p:last-child{ margin-bottom:0; }
.np-wsf .np-ok-badge{
  display:inline-flex !important; align-items:center; gap:.5rem; background:var(--terracotta) !important; color:#fff !important;
  border-radius:var(--r-pill) !important; padding:.35rem .8rem !important; font-size:var(--t-xs) !important; font-weight:700 !important;
  letter-spacing:.12em !important; text-transform:uppercase !important; margin-bottom:var(--s4) !important;
}

/* ---------- dark context: guide band, newsletter ---------- */
.np-wsf--dark label, .np-wsf--dark legend, .np-wsf--dark [class*="label"]{ color:rgba(247,244,239,.82) !important; }
.np-wsf--dark input[type="checkbox"] + label, .np-wsf--dark label:has(input[type="checkbox"]),
.np-wsf--dark [data-type="checkbox"] li label, .np-wsf--dark small, .np-wsf--dark [class*="help"]{ color:rgba(247,244,239,.85) !important; }
.np-wsf--dark a{ color:var(--lavender) !important; }
.np-wsf--dark [class*="alert"], .np-wsf--dark [class*="success"]{
  background:rgba(247,244,239,.13) !important; border:1px solid rgba(247,244,239,.26) !important; color:rgba(247,244,239,.86) !important;
}
.np-wsf--dark [class*="alert"] strong{ color:var(--cream) !important; }

/* ---------- light context: contact card ---------- */
.np-wsf--light label, .np-wsf--light legend, .np-wsf--light [class*="label"]{ color:var(--indigo) !important; }
.np-wsf--light input[type="text"], .np-wsf--light input[type="email"], .np-wsf--light input[type="tel"],
.np-wsf--light select, .np-wsf--light textarea{ border-color:var(--sand) !important; }
.np-wsf--light input:focus, .np-wsf--light select:focus, .np-wsf--light textarea:focus{ border-color:var(--indigo) !important; }
.np-wsf--light input[type="checkbox"] + label, .np-wsf--light label:has(input[type="checkbox"]),
.np-wsf--light [data-type="checkbox"] li label, .np-wsf--light small, .np-wsf--light [class*="help"]{ color:var(--muted) !important; }
.np-wsf--light a{ color:var(--indigo) !important; }
.np-wsf--light [class*="invalid"], .np-wsf--light [id*="invalid-feedback"], .np-wsf--light [role="alert"]{ color:#B42F2F !important; }
.np-wsf--light [class*="alert"], .np-wsf--light [class*="success"]{
  background:var(--lavender-lt) !important; border:0 !important; color:var(--indigo) !important; text-align:center; max-width:none;
}

/* ---------- two-column rows (fields set to 6 columns in WS Form) ---------- */
@media (min-width:560px){
  .np-wsf--contact form{ display:grid !important; grid-template-columns:repeat(2, minmax(0,1fr)); column-gap:var(--s4); }
  .np-wsf--contact form > *{ grid-column:1 / -1; }
  .np-wsf--contact [class*="col-6"], .np-wsf--contact [class*="wsf-col-6"]{ grid-column:auto !important; }
  .np-wsf--guide form{ display:grid !important; grid-template-columns:repeat(2, minmax(0,1fr)); column-gap:var(--s4); }
  .np-wsf--guide form > *{ grid-column:1 / -1; }
  .np-wsf--guide [class*="col-6"], .np-wsf--guide [class*="wsf-col-6"]{ grid-column:auto !important; }
}
.np-wsf--newsletter form{ max-width:32rem; }

/* admin-only note when no form ID is set */
.np-form-note{ padding:.8rem 1rem; border-radius:var(--r2); background:rgba(188,91,57,.12); color:var(--terracotta-dp); font-size:var(--t-sm); font-weight:600; }
