/* =========================
   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;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
}

/* 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;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

footer {
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  text-align: center;
  background-color: #4e46aa;
  color: #fff;
  width: 100%;
  position: relative;
  margin-top: auto;
  padding: 2rem 0;
}

.footer {
  height: 100%;
}

.footer-nav__container {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  width: 100%;
}

.footer-nav__container > li {
  font-size: 24px;
  font-weight: 300 !important;
  padding-inline: 1.5rem;
  padding-block: 1.75rem;
  cursor: pointer;
}

.footer-nav__title {
  display: flex;
  flex-direction: row;
  padding-inline: 1.5rem;
  padding-block: 0.75rem;
  column-gap: 0.5rem;
  font-size: 40px !important;
  font-weight: 700;
  text-decoration: none;
  align-content: center;
}

/* ===== Footer ===== */
footer a,
footer p {
  text-decoration: none !important;
  color: #fff;
}

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 (min-width: 112rem) {
  .footer-nav__title {
    padding-inline: 1.5rem;
    font-size: 32px !important;
  }
  .footer-nav__container > li {
    font-size: 18px;
    padding-inline: 1.25em;
    padding-block: 0.75rem;
    cursor: pointer;
  }
}

@media (min-width: 62rem) {
  footer {
    height: 116px;
    padding: 1rem 0;
  }

  .footer-nav__container {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }

  .footer-nav__container > li {
    font-size: 16px;
    padding-inline: 1rem;
    padding-block: 0.75rem;
    cursor: pointer;
  }
  .footer-nav__title {
    display: flex;
    flex-direction: row;
    padding-inline: 1rem;
    padding-block: 0.75rem;
    column-gap: 0.5rem;
    font-size: 24px !important;
    font-weight: 700;
    text-decoration: none;
    align-content: center;
  }
}

@media (min-width: 37.5rem) {
}

@media (min-width: 23.4375rem) {
}

@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 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 */
}
.form-action-button {
  background-color: #4e46aa !important;
}
