/* One selector in the top logo row on all pages. */
#header>.pad.cgsm-global-header{display:flex!important;align-items:center!important;gap:16px!important;box-sizing:border-box!important}
#header>.pad.cgsm-global-header:before,#header>.pad.cgsm-global-header:after{display:none!important}
#header .cgsm-global-header .site-title{float:none!important;flex:0 0 auto;margin:0!important}
#header .cgsm-global-header .site-description{display:block!important;float:none!important;flex:1 1 auto;min-width:0;margin:0!important}
.cgsm-global-language{display:flex;gap:8px;margin-left:auto;flex:0 0 auto;align-items:center}
#header .cgsm-global-language button{font:14px/1.4 system-ui!important;padding:8px 13px!important;border:1px solid #176967!important;border-radius:5px!important;background:transparent!important;color:#176967!important;cursor:pointer!important;margin:0!important;box-shadow:none!important;white-space:nowrap}
#header .cgsm-global-language button[aria-pressed=true]{background:#176967!important;color:#fff!important}
#header .cgsm-global-language button:focus-visible{outline:3px solid #c59336;outline-offset:3px}
/* Existing internal controls remain as translation targets, but are no longer visible. */
body.cgsm-global-enabled .cgsm-promo-languages,body.cgsm-global-enabled .cgsm-wp-profile .cgsm-language{display:none!important}
body.home.cgsm-global-enabled #page .entry-header{display:none!important}
/* Match the map page's paper background. Leave card/table surfaces intact. */
body.cgsm-unified-page #wrapper-inner,
body.cgsm-unified-page #page,
body.cgsm-unified-page #page>.container-inner,
body.cgsm-unified-page #page .main,
body.cgsm-unified-page #page .main-inner,
body.cgsm-unified-page #page .content,
body.cgsm-unified-page #page .post-wrapper,
body.cgsm-unified-page #page .entry-content,
body.cgsm-unified-page #page .entry{background-color:#f4f5ef!important;background-image:none!important}
body.cgsm-unified-page .cgsm-wp-profile{background:#f4f5ef!important}
@media(max-width:600px){#header>.pad.cgsm-global-header{display:grid!important;grid-template-columns:auto minmax(0,1fr);gap:8px 12px!important}#header .cgsm-global-header .site-title{grid-column:1;grid-row:1}#header .cgsm-global-language{grid-column:2;grid-row:1;justify-self:end;margin:0}#header .cgsm-global-header .site-description{grid-column:1/-1;grid-row:2;line-height:1.4}#header .cgsm-global-language button{font-size:12px!important;padding:7px 10px!important}}

#header .cgsm-global-header .site-title img{max-height:64px!important;width:auto!important}

body.cgsm-unified-page .page-title,body.cgsm-unified-page .page-title-inner{background-color:#f4f5ef!important;background-image:none!important}

/* Logo and primary navigation stay together on all portal pages. */
body.cgsm-sticky-navigation #header{transform:none!important;transition:none!important}
body.cgsm-sticky-navigation #header-sticky{height:auto!important;z-index:9990!important}
body.cgsm-sticky-navigation #header #wrap-nav-header{background:#fff;position:relative;z-index:1;width:100%;box-sizing:border-box;border-radius:0 0 12px 12px}
body.cgsm-sticky-navigation #header #nav-header-nav{max-height:calc(100dvh - var(--cgsm-logo-height,86px) - var(--cgsm-admin-offset,0px));overflow-y:auto;overscroll-behavior:contain}
@media(min-width:720px){body.cgsm-sticky-navigation #header #nav-header-nav{overflow:visible}}
html:has(body.cgsm-sticky-navigation){scroll-padding-top:var(--cgsm-header-offset,160px)}
body.cgsm-sticky-navigation main [id],body.cgsm-sticky-navigation #page [id]{scroll-margin-top:var(--cgsm-header-offset,160px)}

body.cgsm-sticky-navigation #header #header-bottom{position:relative;display:flow-root;background:#fff;border-radius:0 0 12px 12px}
body.cgsm-sticky-navigation #header #wrap-nav-header{display:flow-root}

@media(max-width:719px){
 body.cgsm-sticky-navigation #header-sticky{position:fixed!important;top:var(--cgsm-admin-offset,0px)!important;left:0!important;width:100%!important;margin:0!important}
 body.cgsm-sticky-navigation .sticky-element-placeholder{display:block!important}
}

body.cgsm-sticky-navigation #header .toggle-search{z-index:3!important}
body.cgsm-sticky-navigation #header .search-expand{z-index:4!important}

/* The spacer is needed only while the desktop header is fixed. */
@media(min-width:720px){body.cgsm-sticky-navigation .sticky-element-placeholder:not(.sticky-element-active){display:none!important}}
