/* Install/share controls are for the browser website only; an installed PWA is a clean app surface. */
#cg-pwa-actions{position:fixed;z-index:99990;right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));display:flex;gap:8px;align-items:center;font:600 13px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
#cg-pwa-actions button{appearance:none;border:1px solid #0f766e;border-radius:999px;background:#0f766e;color:#fff;padding:11px 15px;min-height:42px;box-shadow:0 3px 14px rgba(0,0,0,.16);cursor:pointer}
#cg-pwa-actions button.cg-pwa-secondary{background:#fff;color:#0f766e}
#cg-pwa-actions button:focus-visible{outline:3px solid #f59e0b;outline-offset:3px}
#cg-pwa-install[hidden]{display:none!important}
@media(min-width:768px){#cg-pwa-actions{right:22px;bottom:22px}}
@media(prefers-reduced-motion:no-preference){#cg-pwa-actions button{transition:transform .15s ease,box-shadow .15s ease}#cg-pwa-actions button:hover{transform:translateY(-1px);box-shadow:0 5px 18px rgba(0,0,0,.2)}}

/* Standalone OncoHelpline app: remove the normal website chrome, including its footer. */
html.cg-pwa-app-mode, html.cg-pwa-app-mode body{min-height:100%;margin:0!important;padding:0!important;background:#f4f7fb!important;overscroll-behavior-y:contain}
html.cg-pwa-app-mode body{padding-top:env(safe-area-inset-top,0px)!important;padding-bottom:env(safe-area-inset-bottom,0px)!important}
html.cg-pwa-app-mode #cg-pwa-actions,
html.cg-pwa-app-mode #wpadminbar,
html.cg-pwa-app-mode header.site-header,
html.cg-pwa-app-mode footer.site-footer,
html.cg-pwa-app-mode #masthead,
html.cg-pwa-app-mode #colophon,
html.cg-pwa-app-mode .site-header,
html.cg-pwa-app-mode .site-footer,
html.cg-pwa-app-mode .elementor-location-header,
html.cg-pwa-app-mode .elementor-location-footer,
html.cg-pwa-app-mode .wp-site-blocks > header,
html.cg-pwa-app-mode .wp-site-blocks > footer,
html.cg-pwa-app-mode .site-branding,
html.cg-pwa-app-mode .main-navigation{display:none!important}
html.cg-pwa-app-mode body.admin-bar{margin-top:0!important}
html.cg-pwa-app-mode #page,
html.cg-pwa-app-mode .site,
html.cg-pwa-app-mode #content,
html.cg-pwa-app-mode .site-content,
html.cg-pwa-app-mode main,
html.cg-pwa-app-mode .content-area,
html.cg-pwa-app-mode .site-main{width:100%!important;max-width:none!important;margin:0!important;padding-top:0!important;padding-bottom:0!important}
html.cg-pwa-app-mode .container,
html.cg-pwa-app-mode .content-container,
html.cg-pwa-app-mode .elementor-section.elementor-section-boxed > .elementor-container{max-width:100%!important}
html.cg-pwa-app-mode .cg-community,
html.cg-pwa-app-mode .cg-community-wrap,
html.cg-pwa-app-mode .cg-community-page{min-height:100dvh;box-sizing:border-box}
html.cg-pwa-app-mode a, html.cg-pwa-app-mode button{touch-action:manipulation}


/* Installed app shell: compact native-app-like header with profile shortcut. */
html.cg-pwa-app-mode #cg-pwa-app-header{display:flex!important;position:sticky;top:0;z-index:99980;box-sizing:border-box;width:100%;min-height:58px;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px calc(8px + env(safe-area-inset-top,0px));background:#fff;border-bottom:1px solid #e5eaf0;box-shadow:0 2px 8px rgba(20,35,55,.04)}
html.cg-pwa-app-mode .cg-pwa-app-brand{color:#14243a;text-decoration:none;font:800 20px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.04em}
html.cg-pwa-app-mode .cg-pwa-app-logo{display:block;width:auto;height:auto;max-width:min(190px,58vw);max-height:36px;object-fit:contain}
html.cg-pwa-app-mode .cg-pwa-app-profile{display:flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:#edf2f7;color:#334155;text-decoration:none;box-shadow:inset 0 0 0 1px #e0e7ef}
html.cg-pwa-app-mode .cg-pwa-app-profile svg{display:block;width:22px;height:22px;fill:currentColor}
html.cg-pwa-app-mode .cg-pwa-app-profile .cg-pwa-app-avatar{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;}
html.cg-pwa-app-mode .cg-pwa-app-profile:focus-visible{outline:3px solid #0f766e;outline-offset:2px}
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"],html.cg-pwa-app-mode .cg-my-oncohelpline{box-sizing:border-box;width:100%!important;max-width:760px!important;margin:12px auto!important;padding:18px!important;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 3px 14px rgba(20,35,55,.04)}
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"] .cg-tool-hero{margin-bottom:16px}
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"] .cg-tool-hero h2,html.cg-pwa-app-mode .cg-my-oncohelpline>h2{margin:3px 0 8px;font-size:clamp(25px,6vw,32px);line-height:1.15;letter-spacing:-.035em;overflow-wrap:anywhere}
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"] .cg-tool-hero p,html.cg-pwa-app-mode .cg-my-oncohelpline>p{margin:0;font-size:15px;line-height:1.55}
html.cg-pwa-app-mode .cg-profile-panel{margin:14px 0;padding:15px;border-radius:14px}
html.cg-pwa-app-mode .cg-profile-manager{gap:14px}
html.cg-pwa-app-mode .cg-profile-manager .cg-community-avatar{max-width:72px;max-height:72px}
html.cg-pwa-app-mode .cg-profile-account-actions{overflow-wrap:anywhere}
@media(max-width:600px){html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"],html.cg-pwa-app-mode .cg-my-oncohelpline{margin:10px auto!important;padding:15px!important;border-radius:14px}html.cg-pwa-app-mode .cg-profile-manager{align-items:flex-start;flex-direction:column}html.cg-pwa-app-mode .cg-profile-upload-form{display:flex;flex-direction:column;align-items:stretch;width:100%}html.cg-pwa-app-mode .cg-profile-upload-form input[type=file]{max-width:100%}}


/* In standalone PWA, keep the profile shortcut in the app header only.
   The script hides fixed/sticky duplicate account/profile shortcuts from the theme. */
html.cg-pwa-app-mode .cg-floating-profile,
html.cg-pwa-app-mode .cg-community-floating-profile,
html.cg-pwa-app-mode .cg-fixed-profile,
html.cg-pwa-app-mode .floating-profile-button,
html.cg-pwa-app-mode .floating-account-button{display:none!important}


/* v0.7.87: In the installed app, keep account access in the top app header only.
   Hide duplicate fixed/sticky profile avatars and floating account links on all app routes. */
html.cg-pwa-app-mode .cg-header-profile-icon[data-cg-header-profile-installed],
html.cg-pwa-app-mode a[data-cg-header-profile-icon],
html.cg-pwa-app-mode a[data-cg-header-profile-installed],
html.cg-pwa-app-mode .cg-community-account-menu,
html.cg-pwa-app-mode .cg-community-account-menu-item,
html.cg-pwa-app-mode .cg-community-floating-profile,
html.cg-pwa-app-mode .cg-floating-avatar,
html.cg-pwa-app-mode .cg-user-floating-avatar,
html.cg-pwa-app-mode .cg-profile-floating,
html.cg-pwa-app-mode .cg-fixed-avatar,
html.cg-pwa-app-mode .cg-fixed-profile,
html.cg-pwa-app-mode .cg-community-fixed-profile,
html.cg-pwa-app-mode .cg-community-user-float,
html.cg-pwa-app-mode .cg-account-floating,
html.cg-pwa-app-mode .floating-profile-button,
html.cg-pwa-app-mode .floating-account-button{display:none!important;visibility:hidden!important;pointer-events:none!important}

/* Dashboard/profile screens should feel like a compact mobile app, not a desktop web form. */
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"],
html.cg-pwa-app-mode .cg-my-oncohelpline,
html.cg-pwa-app-mode .cg-profile-panel{
  box-sizing:border-box!important;width:calc(100% - 24px)!important;max-width:760px!important;
  margin:12px auto!important;padding:16px!important;border:1px solid #e2e8f0!important;
  border-radius:18px!important;background:#fff!important;box-shadow:0 2px 10px rgba(20,35,55,.035)!important;
}
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"] .cg-tool-hero h1,
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"] .cg-tool-hero h2,
html.cg-pwa-app-mode .cg-my-oncohelpline>h1,
html.cg-pwa-app-mode .cg-my-oncohelpline>h2{
  font-size:clamp(24px,6vw,30px)!important;line-height:1.18!important;letter-spacing:-.025em!important;
  margin:4px 0 10px!important;overflow-wrap:anywhere!important;
}
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"] .cg-tool-hero p,
html.cg-pwa-app-mode .cg-my-oncohelpline>p,
html.cg-pwa-app-mode .cg-profile-panel p{font-size:15px!important;line-height:1.55!important;color:#64748b}
html.cg-pwa-app-mode .cg-profile-panel-head h3{font-size:22px!important;line-height:1.25!important;margin:5px 0 8px!important}
html.cg-pwa-app-mode .cg-profile-account-actions{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:12px!important;overflow-wrap:anywhere!important;line-height:1.5!important}
html.cg-pwa-app-mode .cg-profile-account-actions strong{overflow-wrap:anywhere!important;word-break:break-word!important}
html.cg-pwa-app-mode .cg-profile-manager{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:14px!important;margin-top:16px!important}
html.cg-pwa-app-mode .cg-profile-current img,
html.cg-pwa-app-mode .cg-profile-current .cg-community-avatar{width:76px!important;height:76px!important;max-width:76px!important;max-height:76px!important;border-radius:50%!important;object-fit:cover!important}
html.cg-pwa-app-mode .cg-profile-manager-actions,
html.cg-pwa-app-mode .cg-profile-upload-form,
html.cg-pwa-app-mode .cg-profile-file-label{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important}
html.cg-pwa-app-mode .cg-profile-upload-form{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important}
html.cg-pwa-app-mode .cg-profile-upload-form input[type=file]{box-sizing:border-box!important;display:block!important;width:100%!important;max-width:100%!important;font-size:14px!important;white-space:normal!important}
html.cg-pwa-app-mode .cg-profile-upload-form button,
html.cg-pwa-app-mode .cg-profile-remove-form button{min-height:44px!important;max-width:100%!important}
html.cg-pwa-app-mode .cg-profile-upload-form button{width:100%!important}
html.cg-pwa-app-mode .cg-profile-remove-form{margin-top:10px!important}
@media(max-width:600px){
  html.cg-pwa-app-mode #cg-pwa-app-header{min-height:58px!important;padding:8px 16px!important}
  html.cg-pwa-app-mode .cg-pwa-app-brand{font-size:20px!important}
  html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"],
  html.cg-pwa-app-mode .cg-my-oncohelpline,
  html.cg-pwa-app-mode .cg-profile-panel{width:calc(100% - 20px)!important;margin:10px auto!important;padding:15px!important;border-radius:16px!important}
  html.cg-pwa-app-mode .cg-profile-account-actions{flex-direction:column!important;align-items:flex-start!important}
  html.cg-pwa-app-mode .cg-profile-account-actions .cg-logout-link{align-self:flex-start!important}
}


/* v0.7.88: final mobile-app cleanup. Hide duplicate bottom profile/avatar widgets
   on both Community and Saved Research screens; the top app-header account icon remains. */
html.cg-pwa-app-mode body #cg-pwa-app-header ~ * .cg-floating-profile,
html.cg-pwa-app-mode body .cg-community-footer-profile,
html.cg-pwa-app-mode body .cg-profile-float,
html.cg-pwa-app-mode body .cg-avatar-float,
html.cg-pwa-app-mode body .cg-sticky-profile,
html.cg-pwa-app-mode body .cg-bottom-profile,
html.cg-pwa-app-mode body .cg-floating-user,
html.cg-pwa-app-mode body .cg-user-fab,
html.cg-pwa-app-mode body .profile-floating,
html.cg-pwa-app-mode body .avatar-floating,
html.cg-pwa-app-mode body .user-floating,
html.cg-pwa-app-mode body [class*="floating-profile" i],
html.cg-pwa-app-mode body [class*="floating-avatar" i],
html.cg-pwa-app-mode body [class*="fixed-avatar" i],
html.cg-pwa-app-mode body [class*="profile-float" i],
html.cg-pwa-app-mode body [class*="avatar-float" i],
html.cg-pwa-app-mode body [id*="floating-profile" i],
html.cg-pwa-app-mode body [id*="floating-avatar" i]{
  display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;
}
html.cg-pwa-app-mode #wpadminbar,
html.cg-pwa-app-mode body > #wpadminbar{display:none!important;height:0!important;visibility:hidden!important}
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"],
html.cg-pwa-app-mode .cg-my-oncohelpline{width:calc(100% - 20px)!important;max-width:760px!important;margin:10px auto 20px!important;padding:16px!important;overflow:hidden}
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"] .cg-tool-hero h1,
html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"] .cg-tool-hero h2,
html.cg-pwa-app-mode .cg-my-oncohelpline h1,
html.cg-pwa-app-mode .cg-my-oncohelpline h2{font-size:clamp(23px,6vw,29px)!important;line-height:1.18!important;overflow-wrap:anywhere!important}
html.cg-pwa-app-mode .cg-profile-panel,
html.cg-pwa-app-mode .cg-profile-manager,
html.cg-pwa-app-mode .cg-profile-upload-form{min-width:0!important;max-width:100%!important}
html.cg-pwa-app-mode .cg-profile-account-actions{min-width:0!important;overflow-wrap:anywhere!important;word-break:break-word!important}
html.cg-pwa-app-mode .cg-profile-upload-form button,
html.cg-pwa-app-mode .cg-profile-remove-form button{box-sizing:border-box!important;max-width:100%!important;white-space:normal!important}
@media(max-width:600px){
  html.cg-pwa-app-mode .cg-tool[data-cg-tool="dashboard"],
  html.cg-pwa-app-mode .cg-my-oncohelpline{padding:14px!important;margin:8px auto 16px!important}
  html.cg-pwa-app-mode .cg-profile-panel{padding:13px!important;margin:12px 0!important}
  html.cg-pwa-app-mode .cg-profile-manager{gap:12px!important}
  html.cg-pwa-app-mode .cg-profile-upload-form input[type="file"]{font-size:13px!important}
}


/* v0.7.89: Remove theme back-to-top/scroll-to-top controls from installed app UI. */
html.cg-pwa-app-mode #back-to-top,
html.cg-pwa-app-mode #scroll-top,
html.cg-pwa-app-mode #ast-scroll-top,
html.cg-pwa-app-mode .back-to-top,
html.cg-pwa-app-mode .backtotop,
html.cg-pwa-app-mode .scroll-to-top,
html.cg-pwa-app-mode .scroll-top,
html.cg-pwa-app-mode .scrollup,
html.cg-pwa-app-mode .scroll-up,
html.cg-pwa-app-mode .go-to-top,
html.cg-pwa-app-mode .go-top,
html.cg-pwa-app-mode .elementor-back-to-top,
html.cg-pwa-app-mode .to-top,
html.cg-pwa-app-mode [data-scroll-to-top]{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}

/* v0.7.89: Place Log out beside Remove picture on the mobile profile screen. */
html.cg-pwa-app-mode .cg-profile-account-actions .cg-logout-link{display:none!important}
html.cg-pwa-app-mode .cg-profile-remove-form{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:10px!important;margin-top:10px!important}
html.cg-pwa-app-mode .cg-profile-remove-form .cg-pwa-logout-relocated{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;padding:10px 18px!important;border-radius:10px!important;background:#dc2626!important;color:#fff!important;font-weight:700!important;text-decoration:none!important;box-sizing:border-box!important}
html.cg-pwa-app-mode .cg-profile-remove-form button{width:auto!important;min-height:44px!important}
@media(max-width:600px){html.cg-pwa-app-mode .cg-profile-remove-form{width:100%!important;flex-direction:row!important;align-items:center!important;gap:8px!important}html.cg-pwa-app-mode .cg-profile-remove-form button,html.cg-pwa-app-mode .cg-profile-remove-form .cg-pwa-logout-relocated{flex:0 1 auto!important;font-size:14px!important;padding:10px 12px!important}}

/* Web Push opt-in button in the installed app header */
#cg-pwa-app-header .cg-pwa-push-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;padding:8px;border:0;border-radius:50%;background:#eef3f7;color:#26384b;cursor:pointer}
#cg-pwa-app-header .cg-pwa-push-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#cg-pwa-app-header .cg-pwa-push-toggle.is-enabled{background:#d8f3e8;color:#087f5b}
@media(max-width:480px){#cg-pwa-app-header .cg-pwa-push-toggle{width:34px;height:34px;flex-basis:34px;padding:7px}}
