/**
 * 182 West site footer — shared across all pages.
 * Markup: .navbar-wrap.footer > .footer-text | .footer-built | .contact-cluster
 *
 * Desktop: copyright | Built by | Terms · Privacy · Press Kit
 * Mobile:  compact two-row stack, same on every page
 */
.navbar-wrap.footer,
.navbar-wrap.footer.mobile {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  inset: auto 0 0 0 !important;
  width: 100% !important;
  z-index: 90 !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  grid-template-areas: "copy built legal" !important;
  grid-template-rows: 20px !important;
  align-items: center !important;
  align-content: center !important;
  justify-content: stretch !important;
  gap: 0 1rem !important;
  padding: 0 1.35rem !important;
  min-height: var(--chrome-footer-height, 48px) !important;
  height: var(--chrome-footer-height, 48px) !important;
  max-height: var(--chrome-footer-height, 48px) !important;
  flex-flow: unset !important;
  flex-direction: unset !important;
  flex-wrap: nowrap !important;
  background: var(--182-surface, #1c241e) !important;
  border-top: 1px solid rgba(245, 242, 234, 0.1) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.footer-text {
  grid-area: copy !important;
  justify-self: start !important;
  margin: 0 !important;
  min-width: 0;
  height: 20px !important;
  min-height: 20px !important;
}

.footer-text,
.footer-text div {
  color: var(--text--50, rgba(245, 242, 234, 0.55)) !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Reddit Sans", "JetBrains Mono", "Jet Brains Mono", system-ui, sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  line-height: 20px !important;
}

.footer-built {
  grid-area: built !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: 0.45rem !important;
  color: var(--text--50, rgba(245, 242, 234, 0.55)) !important;
  font-family: "Reddit Sans", "JetBrains Mono", "Jet Brains Mono", system-ui, sans-serif !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  margin: 0 !important;
  justify-self: center !important;
  flex: none !important;
  height: 20px !important;
  min-height: 20px !important;
  line-height: 20px !important;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.footer-built span {
  color: inherit !important;
  white-space: nowrap;
  display: inline !important;
}

.footer-built:hover {
  opacity: 0.8;
}

.footer-built__logo {
  display: block !important;
  height: 10px !important;
  width: auto !important;
  max-width: 120px !important;
  flex: none !important;
  opacity: 0.9;
}

.navbar-wrap.footer .contact-cluster {
  grid-area: legal !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.35rem 0.55rem !important;
  margin: 0 !important;
  width: auto !important;
  justify-self: end !important;
  white-space: nowrap !important;
  height: 20px !important;
  min-height: 20px !important;
  line-height: 20px !important;
}

.navbar-wrap.footer .contact-cluster a {
  color: rgba(245, 242, 234, 0.82) !important;
  text-decoration: none !important;
  font-family: "JetBrains Mono", "Jet Brains Mono", ui-monospace, monospace !important;
  font-size: 0.78rem !important;
  font-weight: 300 !important;
  letter-spacing: 0.03em !important;
  line-height: 20px !important;
}

.navbar-wrap.footer .contact-cluster a:hover {
  color: var(--182-ink, #f5f2ea) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.navbar-wrap.footer .contact-cluster__sep {
  opacity: 0.35 !important;
  font-family: "JetBrains Mono", "Jet Brains Mono", ui-monospace, monospace !important;
  font-size: 0.78rem !important;
  font-weight: 300 !important;
  letter-spacing: 0.03em !important;
  line-height: 20px !important;
  color: rgba(245, 242, 234, 0.55) !important;
  user-select: none;
}

/* Keep scrolled page content clear of fixed footer */
.main-wrapper,
.page-content-pad-footer,
body.body-insights {
  padding-bottom: 4rem !important;
}

/* Tablet + phone: same compact chrome as home */
@media (max-width: 900px) {
  .navbar-wrap.footer,
  .navbar-wrap.footer.mobile {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "copy legal" "built built" !important;
    grid-template-rows: 20px 9px !important;
    gap: 7px 0.75rem !important;
    padding: 11px 1rem 12px !important;
    min-height: var(--chrome-footer-height, 60px) !important;
    height: var(--chrome-footer-height, 60px) !important;
    max-height: var(--chrome-footer-height, 60px) !important;
  }

  .footer-text,
  .footer-text div {
    font-size: 0.72rem !important;
    max-width: 100%;
  }

  /* Shorter copyright on small screens */
  .footer-text div {
    font-size: 0 !important;
  }

  .footer-text div::before {
    content: "© 182 West 2026";
    font-size: 0.72rem !important;
    font-family: "Reddit Sans", "JetBrains Mono", "Jet Brains Mono", system-ui, sans-serif !important;
    color: var(--text--50, rgba(245, 242, 234, 0.55)) !important;
    letter-spacing: 0.01em;
  }

  .footer-built {
    justify-self: start !important;
    gap: 0.35rem !important;
    height: 9px !important;
    min-height: 9px !important;
    line-height: 9px !important;
  }

  .footer-built span {
    display: none !important;
  }

  .footer-built__logo {
    height: 9px !important;
    max-width: 96px !important;
  }

  .navbar-wrap.footer .contact-cluster {
    gap: 0.28rem 0.4rem !important;
  }

  .navbar-wrap.footer .contact-cluster a,
  .navbar-wrap.footer .contact-cluster__sep {
    font-size: 0.68rem !important;
  }

  .main-wrapper,
  .page-content-pad-footer,
  body.body-insights,
  .seo-faq,
  .a16-latest,
  .insight-article {
    padding-bottom: 5rem !important;
  }
}

@media (max-width: 420px) {
  .navbar-wrap.footer,
  .navbar-wrap.footer.mobile {
    grid-template-columns: 1fr !important;
    grid-template-areas: "legal" "copy" "built" !important;
    grid-template-rows: 20px 20px 9px !important;
    justify-items: center !important;
    text-align: center !important;
    gap: 6px !important;
    padding: 7px 0.85rem !important;
    min-height: var(--chrome-footer-height, 76px) !important;
    height: var(--chrome-footer-height, 76px) !important;
    max-height: var(--chrome-footer-height, 76px) !important;
  }

  .footer-text,
  .footer-built,
  .navbar-wrap.footer .contact-cluster {
    justify-self: center !important;
  }

  .footer-text div {
    text-overflow: clip;
  }
}
