/* McKenzieCMS v73.11 FINAL scroll + landing topbar fix
   Purpose: restore browser/page vertical scrolling while keeping the landing
   page navigation readable. Colour changes are deliberately scoped to the
   public landing page only. */

/* 1) Global scroll safety: do not allow historic full-screen fixes to lock the page. */
html,
body {
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  position: static !important;
}

body {
  touch-action: auto !important;
  overscroll-behavior-y: auto !important;
}

/* 2) Public landing page must behave like a normal document. */
html:has(body.landing-body),
html:has(body.landing-body) body,
body.landing-body {
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  position: static !important;
}

body.landing-body main,
body.landing-body .landing-hero,
body.landing-body .landing-section,
body.landing-body section,
body.landing-body footer,
body.landing-body .landing-footer {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  position: relative !important;
}

body.landing-body .digital-bg {
  position: fixed !important;
  pointer-events: none !important;
}

/* 3) Landing top navigation readability. */
body.landing-body .landing-nav,
body.landing-body nav.landing-nav {
  background: #071f18 !important;
  background-color: #071f18 !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(209, 250, 229, .42) !important;
  box-shadow: 0 10px 28px rgba(2,44,34,.25) !important;
}

body.landing-body .landing-brand,
body.landing-body .landing-brand span,
body.landing-body .landing-nav a,
body.landing-body .landing-links a,
body.landing-body .landing-links a:link,
body.landing-body .landing-links a:visited {
  color: #f8fffb !important;
  -webkit-text-fill-color: #f8fffb !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.landing-body .landing-links a:not(.landing-cta):hover,
body.landing-body .landing-links a:not(.landing-cta):focus-visible {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: rgba(255,255,255,.12) !important;
  border-radius: 999px !important;
  text-decoration: none !important;
}

body.landing-body .landing-cta,
body.landing-body .landing-links a.landing-cta,
body.landing-body a.landing-cta {
  background: #34d399 !important;
  background-image: none !important;
  color: #04130f !important;
  -webkit-text-fill-color: #04130f !important;
  border: 1px solid #6ee7b7 !important;
  font-weight: 950 !important;
}

body.landing-body .landing-brand img {
  background: #ffffff !important;
  border-radius: 6px !important;
}

/* 4) Logged-in app: allow page-level scrolling. Internal panels may still scroll,
      but nothing should lock the whole browser viewport. */
body.app-digital-theme,
body.app-digital-theme:has(#appShell:not(.hidden)),
body.app-digital-theme:has(#authScreen:not(.hidden)) {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  position: static !important;
}

#authScreen.auth-screen:not(.hidden),
.auth-screen:not(.hidden) {
  min-height: 100vh !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#appShell.app-shell:not(.hidden) {
  min-height: 100vh !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#appShell.app-shell:not(.hidden) > .main,
#appShell.app-shell:not(.hidden) > .main > .workspace,
#appShell.app-shell:not(.hidden) > .main .tab-content {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
}

#appShell.app-shell:not(.hidden) > .sidebar,
#appShell.app-shell:not(.hidden) > aside.sidebar {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow: visible !important;
}

#appShell.app-shell:not(.hidden) > .sidebar > #clientList.client-list,
#appShell.app-shell:not(.hidden) > aside.sidebar > #clientList.client-list {
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
}

/* 5) Workspace itself can use internal scrolling, but only inside its own shell. */
.workspace-shell,
.v73-mission-shell {
  max-height: none !important;
  overflow: visible !important;
}

.mission-main,
.v73-mission-main,
.mission-workspace,
.v73-mission-workspace {
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
