/* =========================================
   Mission43 Universal Layout System
   Version: 1.3.7
   Header + Footer + Structural Alignment
   Status: Production Locked
   Last Audit: 2026-02 (Brand Architecture Alignment)
========================================= */

/* Base font enforcement */
body,
.wFormContainer {
  font-family: "Inter Variable", Inter, sans-serif;
  color: #171717;
}

/* =========================================
   FORM CONTROLS (Buttons + Inputs) v1
   Brand alignment with mission43.org / Framer
========================================= */

:root {
  /* Brand-agnostic tokens (values overridden by JS per brand) */
  --brand-accent: #d41636;
  --brand-accent-press: #f02f4e;
  --brand-ink: #171717;
  --brand-muted: #a1a1a1;
  --brand-surface: #e6e4e1;
  --brand-surface-focus: #eeeeee;
  --brand-radius: 10px;
  --brand-font: "Inter Variable", Inter, sans-serif;
}

/* ---------- Labels ---------- */
.wForm .label,
.wForm label,
.wFormContainer label {
  font-family: var(--brand-font);
  color: var(--brand-ink);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
}

/* ---------- Text inputs / selects / textareas ---------- */
.wForm input[type="text"],
.wForm input[type="email"],
.wForm input[type="tel"],
.wForm input[type="number"],
.wForm input[type="url"],
.wForm input[type="password"],
.wForm select,
.wForm textarea {
  font-family: var(--brand-font) !important;
  font-size: 16px;
  line-height: 1.2;
  color: var(--brand-ink);
  background: var(--brand-surface);
  border: 1px solid transparent;
  border-radius: var(--brand-radius);
  padding: 12px;
  box-sizing: border-box;
}

.wForm input::placeholder,
.wForm textarea::placeholder {
  color: var(--brand-muted);
}

.wForm input[type="text"]:focus,
.wForm input[type="email"]:focus,
.wForm input[type="tel"]:focus,
.wForm input[type="number"]:focus,
.wForm input[type="url"]:focus,
.wForm input[type="password"]:focus,
.wForm select:focus,
.wForm textarea:focus {
  background: var(--brand-surface-focus);
  outline: none;
  border-color: rgba(212, 22, 54, 0.45);
  box-shadow: 0 0 0 3px rgba(212, 22, 54, 0.18);
}

/* ---------- Primary buttons (Submit / Next / Previous) ---------- */
/*
  FormAssembly commonly uses input[type=submit], button, and .primaryAction.
  We style all, but keep selectors narrow to avoid touching header/footer links.
*/
.wForm input[type="submit"],
.wForm input[type="button"],
.wForm button,
.wForm .primaryAction,
.wForm .secondaryAction {
  font-family: var(--brand-font) !important;
  border-radius: var(--brand-radius);
  height: 40px;
  min-height: 40px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
}

/* Primary */
.wForm input[type="submit"],
.wForm .primaryAction,
.wForm button.primaryAction,
.wForm button[type="submit"] {
  background: var(--brand-accent);
  color: #ffffff !important;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.wForm input[type="submit"]:hover,
.wForm .primaryAction:hover,
.wForm button.primaryAction:hover,
.wForm button[type="submit"]:hover {
  background: var(--brand-accent-press);
}

.wForm input[type="submit"]:active,
.wForm .primaryAction:active,
.wForm button.primaryAction:active,
.wForm button[type="submit"]:active {
  transform: scale(0.98);
}

.wForm input[type="submit"]:focus,
.wForm .primaryAction:focus,
.wForm button.primaryAction:focus,
.wForm button[type="submit"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 22, 54, 0.22);
}

/* Secondary (e.g., Previous) */
.wForm .secondaryAction,
.wForm input[type="button"].secondaryAction,
.wForm button.secondaryAction {
  background: transparent;
  color: var(--brand-ink) !important;
  border: 1px solid rgba(23, 23, 23, 0.18);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.wForm .secondaryAction:hover,
.wForm input[type="button"].secondaryAction:hover,
.wForm button.secondaryAction:hover {
  background: rgba(23, 23, 23, 0.04);
}

/* Prevent fixed-width buttons unless FormAssembly adds it inline */
.wForm input[type="submit"],
.wForm .primaryAction,
.wForm .secondaryAction,
.wForm button {
  width: auto;
  max-width: 100%;
}

/* ---------- Validation / error styling (works with core JS gating) ---------- */
.m43-inline-error,
.wForm .errMsg,
.wForm .errorMsg,
.wForm .errorMessage {
  font-family: var(--brand-font);
  color: var(--brand-accent-press);
  font-size: 13px;
  line-height: 1.35;
  margin-top: 8px;
}

.m43-has-error input,
.m43-has-error select,
.m43-has-error textarea,
.wForm .errFld input,
.wForm .errFld select,
.wForm .errFld textarea {
  border-color: rgba(212, 22, 54, 0.65) !important;
  box-shadow: 0 0 0 3px rgba(212, 22, 54, 0.14) !important;
}

/* ---------- Subtle interaction smoothing ---------- */
.wForm input,
.wForm select,
.wForm textarea,
.wForm button,
.wForm input[type="submit"],
.wForm .primaryAction,
.wForm .secondaryAction {
  transition: background-color 0.15s ease,
              border-color 0.15s ease,
              box-shadow 0.15s ease,
              transform 0.05s ease;
}

/* ---------- Mobile spacing polish ---------- */
@media (max-width: 900px) {
  .wForm input[type="submit"],
  .wForm input[type="button"],
  .wForm button,
  .wForm .primaryAction,
  .wForm .secondaryAction {
    width: 100%;
  }
}

/* ================= HEADER ================= */

.fa-global-header {
  background: #ffffff;
  border-bottom: 1px solid #e6e4e1;
  padding: 24px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.fa-global-header a {
  text-decoration: none;
  margin-left: 40px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #171717;
  transition: color 0.2s ease;
}

.fa-global-header a:hover {
  color: var(--brand-accent-press);
}

/* ================= FOOTER ================= */

.fa-global-footer {
  background: #ffffff;
  border-top: 1px solid #e6e4e1;
  margin-top: 80px;
  padding: 60px 0;
  font-size: 14px;
}

.fa-global-footer a {
  color: #171717;
  text-decoration: none;
  margin: 0 12px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.fa-global-footer a:hover {
  color: var(--brand-accent-press);
}

.fa-global-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
  text-align: center;
}

/* Ensure form container spacing */
.wFormContainer {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {

  .fa-global-header {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .fa-global-header a {
    margin-left: 0;
    margin-top: 12px;
  }

  .fa-global-footer .footer-inner {
    padding: 0 20px;
  }

  .wFormContainer {
    padding: 0 20px;
  }
}

/* =========================================================
   REVIEW PAGE – CONFIRM BUTTON (SAFE)
   ---------------------------------------------------------
   Scoped ONLY to FormAssembly review page.

   This does NOT affect:
   - Normal form submit buttons
   - Paging buttons
   - Validation behavior

   Purpose:
   - Ensure Confirm button matches brand styling
   ========================================================= */

.reviewFooter .reviewActions input.primaryAction {
  background: var(--brand-accent) !important;
  color: #ffffff !important;
  border-radius: var(--brand-radius) !important;
  height: 40px !important;
  padding: 0 24px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  line-height: 1em !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.reviewFooter .reviewActions input.primaryAction:hover {
  background: var(--brand-accent-press) !important;
}


/* =========================================================
   REVIEW PAGE – TYPOGRAPHY + STRUCTURE ALIGNMENT
   ---------------------------------------------------------
   Align review page with Mission43 brand + core system
   SAFE: scoped only to .review* containers
   ========================================================= */

/* Container spacing */
.reviewResponse {
  padding-top: 8px;
}

/* Section titles (Page headings) */
.reviewResponse h2,
.reviewResponse h3,
.reviewResponse .legend {
  font-family: var(--brand-font);
  color: var(--brand-ink) !important;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 8px;
}

/* Question labels */
.reviewResponse .question {
  font-family: var(--brand-font);
  color: var(--brand-ink) !important;
  font-weight: 500;
  font-size: 13px;
  margin-top: 18px !important;
}

/* Answers */
.reviewResponse .response {
  font-family: var(--brand-font);
  color: var(--brand-ink);
  font-size: 15px;
  line-height: 1.4;
  margin-top: 4px;
}

.reviewResponse .response,
.reviewResponse .response * {
  color: var(--brand-ink) !important;
}

/* Section spacing (pages) */
.reviewResponse .page {
  margin-bottom: 32px !important;
  padding-bottom: 24px !important;
  border-bottom: 1px solid var(--brand-surface) !important;
}

/* Remove last divider */
.reviewResponse .page:last-child {
  border-bottom: none;
}

/* Header alignment */
.reviewHeader h2 {
  font-family: var(--brand-font);
  color: var(--brand-ink);
  font-weight: 600;
}

.reviewHeader p {
  color: var(--brand-muted);
}

/* Footer spacing */
.reviewFooter {
  margin-top: 32px;
}

/* =========================================================
   REVIEW PAGE – FINAL POLISH
   ---------------------------------------------------------
   Enhances spacing, lists, tables, and action links
   ========================================================= */

/* Tighten question → response spacing */
.reviewResponse .response {
  margin-top: 2px !important;
}

/* Improve checkbox / multi-select readability */
.reviewResponse .response.typecheckbox {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reviewResponse .response.typecheckbox br {
  display: none;
}

/* Clean bullet style */
.reviewResponse .response.typecheckbox::before {
  content: '';
}

.reviewResponse .response.typecheckbox {
  font-size: 14px;
  line-height: 1.5;
}

/* Improve table layout (addresses, grouped fields) */
.reviewResponse table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.reviewResponse td {
  padding: 6px 8px;
  vertical-align: top;
}

/* Style "Make a correction" link as secondary button */
#make-correction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--brand-radius);
  border: 1px solid rgba(23, 23, 23, 0.18);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--brand-ink) !important;
  background: transparent;
  margin-left: 12px;
}

#make-correction:hover {
  background: rgba(23, 23, 23, 0.04);
}

/* Clean print / utility links */
.reviewFooter a {
  font-size: 12px;
  color: var(--brand-muted);
}

.reviewFooter a:hover {
  color: var(--brand-ink);
}


/* =========================================================
   REVIEW PAGE – ADVANCED POLISH (BULLETS, CARDS, MOBILE)
   ---------------------------------------------------------
   - Converts checkbox lists to true bullets
   - Adds subtle card containers per section
   - Improves mobile stacking and spacing
   ========================================================= */

/* -------- Checkbox lists → bullet style -------- */
.reviewResponse .response.typecheckbox {
  padding-left: 0;
}

.reviewResponse .response.typecheckbox > * {
  position: relative;
  padding-left: 18px;
}

.reviewResponse .response.typecheckbox > *::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-accent);
}

/* -------- Section cards -------- */
.reviewResponse .page {
  background: #ffffff;
  border-radius: var(--brand-radius);
  padding: 20px 20px 16px 20px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* soften divider since card now provides separation */
.reviewResponse .page {
  border-bottom: none !important;
}

/* add spacing between cards */
.reviewResponse .page + .page {
  margin-top: 16px;
}

/* -------- Header inside cards -------- */
.reviewResponse .legend {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--brand-muted);
}

/* -------- Mobile improvements -------- */
@media (max-width: 640px) {

  .reviewResponse .page {
    padding: 16px !important;
    margin-bottom: 20px !important;
  }

  .reviewResponse .question {
    font-size: 12px;
    margin-top: 16px !important;
  }

  .reviewResponse .response {
    font-size: 14px;
  }

  /* Stack action buttons cleanly */
  .reviewFooter .reviewActions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  #make-correction {
    width: 100%;
    margin-left: 0;
  }
}
