
/* =========================
   SimpliGov Frame CSS (Cleaned)
   - Sticky, compact header
   - Consistent spacing and centering
   - Mobile-safe header/footer
   - No brittle nth-child selectors
   - All prior functional intents preserved
   ========================= */

/* ===== Base reset ===== */
html, body {
  background: initial;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  scroll-_: smooth;
  color: #333;
  font-family: Arial, sans-serif;
}

.form-wizard-submit-button {
  background-color: #4e46aa !important;
}

#print-preview { display: none !important; }

/* ===== Links ===== */
a { color: #005ea2; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Form and breadcrumb tweaks ===== */
#breadcrumb-item-0 { display: none !important; }
form label {
  font-size: 1.2em;
  color: #333;
  font-family: Verdana !important;
}
.form-option .radio-checkbox-label, .radioButtonCaption { font-size: 16px !important; }

/* ===== Stage wrapper boxes ===== */
#StageSubmitForm {
  background: initial;
  border: 5px solid #4e46aa;
  border-radius: 12px;
  margin: 10px;
  overflow: visible !important;
}
#workflow-background-wrapper,
.sg-content,
.sg-page-success,
.sg-submit-summary {
  overflow: visible !important;
}

#thank-you-text,
div#workflow-background-wrapper,
div#thank-you-text {
  background: initial;
  box-shadow: initial !important;

}
.page-wrap {
   min-height: auto;
}
div#workflow-background-wrapper {
  display: grid;
  place-items: center; /* centers vertically + horizontally */
  min-height: 80vh;
}
#thank-you-text {
  padding: 2%;
  border: 5px solid #4e46aa;
  border-radius: 12px;
  margin: 10px;
  text-align: left !important;
}

/* ===== Header: sticky, compact, consistent ===== */
header.mwf-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 6px 20px;
  min-height: auto;
  background: #fff;
  border-bottom: 2px solid #4e46aa;
}

/* Header content sizing */
header.mwf-header img { height: 48px; width: auto; display: block; }
header.mwf-header .header-link {
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1;
  margin: 0 24px !important;
  padding: 0;
  color: #4e46aa;
  white-space: nowrap;
}
/* Hover highlight for header links */
header.mwf-header .header-link:hover {
  background-color: #e0e0ff;
  color: #4e46aa;
  padding: 5px 10px;
  border-radius: 4px;
}

/* Header nav layout */
header.mwf-header .header-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(6px, 1.6vw, 20px);
  min-width: 0;
}
header.mwf-header .header-nav > * { flex: 0 1 auto; min-width: 0; }

/* Separator and tight spacing */
.header-separator { display: inline-block; margin: 0 6px !important; font-size: 32px; line-height: 1; vertical-align: middle; }
span.header-separator:nth-child(2) {
  font-size: 40px !important;
  color: #4e46aa;
  font-family: "Times New Roman" !important;
  font-weight: normal !important;
  display: inline-block;
  vertical-align: middle;
}

/* Header logo scaling */
header .header-logo img {
  width: clamp(160px, 18vw, 240px) !important;
  height: auto !important;
}

/* Keep ???Home | Service Directory??? together */
header .header-link:first-of-type,
header .header-link:first-of-type + .header-separator,
header .header-link:first-of-type + .header-separator + .header-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ===== Main vertical centering between header and footer ===== */
:root { --headerH: 64px; }

.mwf-main {
  min-height: calc(100vh - var(--headerH));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8vh 2rem;
  box-sizing: border-box;
}

/* Constrain inner content and center text blocks */
.mwf-main > * { width: 100%; max-width: 760px; }
.sg-page-success,
.sg-submit-summary,
#thank-you-text,
.thank-you,
.submission-complete {
  max-width: 760px;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: left;
}

/* Consistent spacing and padding for key content boxes */
#workflow-background-wrapper,
#StageSubmitForm,
#thank-you-text,
.sg-page-success,
.sg-submit-summary,
.thank-you,
.submission-complete,
div[id*="Stage"],
section[id*="Stage"],
.custom-frame#CustomFramePreBody,
.custom-frame#CustomFramePostBody {
  margin-top: 5vh !important;
  margin-bottom: 5vh !important;
  padding: 3vh 2rem !important;
}

/* ===== Footer ===== */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  text-align: center;
  background-color: #4e46aa;
  color: #fff;
  padding: 30px 10px;
  width: 100%;
  position: relative;
  margin-top: auto;
}
footer a, footer p { margin: 0; font-size: 16px !important; color: #fff; }
footer a { margin: 0 12px !important; }
footer .footer-branding { display: flex; flex-direction: column; align-items: center; margin-top: 15px; }
footer .footer-branding p { margin: 0 0 5px 0; font-size: 14px !important; }
footer img { max-width: none !important; width: auto; max-height: 32px; object-fit: contain; }
footer .footer-branding img { max-height: 32px !important; width: auto !important; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  html, body { overflow-x: auto !important; } /* never clip horizontally on small screens */

  :root { --headerH: 56px; }
  .mwf-main { padding: 6vh 1.5rem; }
  .mwf-main > * { max-width: 90vw; }

  header.mwf-header img { height: 42px; }
  header.mwf-header .header-nav { gap: 4px; justify-content: flex-start; }
  .header-separator { display: none; }  /* drop the pipe on small screens */
  header.mwf-header .header-link { font-size: 16px; margin: 0 16px !important; }
  header .header-logo img { width: 160px !important; }

  footer p, footer a { font-size: 14px !important; }
  footer a { margin: 0 10px !important; }
  footer .footer-branding img { max-height: 28px !important; }
}

/* Very small phones */
@media (max-width: 480px) {
  header .header-logo img { width: 95px !important; }
  footer .footer-branding img { max-height: 16px !important; }
}

/* ===== Responsive Title Adjustment ===== */
@media (max-width: 768px) {
  h1, .page-title, .main-title, #workflow-background-wrapper h1 {
    font-size: 1.1em !important; /* reduce from ~2em default */
    line-height: 1.1;
  }
}

@media (max-width: 480px) {
  h1, .page-title, .main-title, #workflow-background-wrapper h1 {
    font-size: 1.1em !important; /* further shrink for very small phones */
  }
}


/* ===== Responsive Image Scaling ===== */
#thank-you-text img,
.sg-page-success img,
.sg-submit-summary img,
.thank-you img,
.submission-complete img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto; /* centers the image */
}
