/* ZeroPulp Employee Portal redesign - shell follow-ups (see zpPortal.css for the shared tokens) */

/* Home's label was still the old sidebar's text-white (its span isn't .protaltab-hint), so the active
   Home item showed white-on-tint. Every nav label now takes the item's colour. */
.zp-portal-theme .portal-tab-list > li > a > span,
.zp-portal-theme .portal-tab-list > li > button > span span
{
	color: inherit !important;
	margin-left: 0 !important;
}

/* the account chip sat high in the 60px band - centre everything in the header vertically */
.zp-portal-theme .display-container > header,
.zp-portal-theme .display-container > header > div,
.zp-portal-theme .display-container > header > div > div
{
	display: flex;
	align-items: center;
}

.zp-portal-theme .display-container > header > div
{
	height: 100%;
}

.zp-portal-theme .display-container > header .zp-account-button,
.zp-portal-theme .display-container > header .zp-account-button .profile-logo-col
{
	align-self: center;
	align-items: center;
	margin: 0;
}

/* Reports: the folder list started flush against the top of its card */
.zp-portal-theme main #reportsFolder .col-sm-3 ul.folder-list
{
	padding-top: 12px !important;
	padding-bottom: 12px;
}

/* Your settings: the Profile / Delegations tab row sat flush in the corner of its card */
.zp-portal-theme main #profileManagement .main-tab-navigation
{
	padding: 16px 16px 0;
	margin-bottom: 16px;
}

/* Sidebar fly-outs (Process Records / Global Data / Analytics ›) were covered by a scrolled list's pinned
   search bar + column header. The nav <li>s carry Tailwind's z-0 and are flex items, and a flex item
   with a z-index is its own stacking context even unpositioned - so the fly-out's z-index:100 only
   counted inside an li at level 0, below the pinned rows' z-index 2/3 (zpPortal.css .zp-pinned).
   Dropping the li's z-index lets the fly-out's own z-index:100 compete at page level. */
.zp-portal-theme .portal-tab-list > li
{
	z-index: auto;
}

/* ...and the <aside> itself is a stacking context too: Tailwind z-3 on a flex item (it is lg:static, but a
   flex item's z-index applies anyway), i.e. the SAME level as the list card's border overlay (::after,
   z-index 3) - which comes later in the DOM and so painted its top corner over an open fly-out. Lift the
   sidebar above anything in the content pane; body-level modals (Bootstrap 1040+) still sit above it. */
.zp-portal-theme aside
{
	z-index: 20;
}

/* ...but not Home's right-hand Tasks Overview panel (zpHomeSidebar.js), which is an <aside> in the content
   pane: as a flex item at 20 it sat above the header (z-index 2) and covered the open account menu. */
.zp-portal-theme aside.zp-home-sidebar
{
	z-index: auto;
}

/* Reports: both cards end Home's gap above the bottom of the area. report.js#fitReportCards measures
   the height (portal.js zpCardHeight) and sets --zp-reports-card-height on #reportsFolder; this beats
   the inline innerHeight - 17 that pulpstream.js writes on every redraw. Scoped to the folders + list
   layout (the one with the jstree folder card) so the report editor's own panes keep their sizing.
   The folder card's frame is on .col-sm-3 itself (1px border each side), hence the - 2px inside it. */
.zp-portal-theme main #reportsFolder.zp-fit-cards .row:has(> .col-sm-3 > .right-content-area-scroll.jstree) > .col-sm-9 > .right-content-area-scroll
{
	height: var(--zp-reports-card-height) !important;
}

.zp-portal-theme main #reportsFolder.zp-fit-cards .row:has(> .col-sm-3 > .right-content-area-scroll.jstree) > .col-sm-3 > .right-content-area-scroll
{
	height: calc(var(--zp-reports-card-height) - 2px) !important;
}

/* Reports: pulpstream.js lays the two cards out as an inline grid of 20% + 78% with (here) a 20px gap,
   i.e. 98% + 20px - the list card stopped ~12px short of the page's right padding. The list column
   now takes whatever is left, so its right edge lines up with the header's buttons. */
.zp-portal-theme main #reportsFolder .stream-report-outer > .container > .row.grid:has(> .col-sm-3 > .right-content-area-scroll.jstree)
{
	grid-template-columns: 20% minmax(0, 1fr) !important;
}

/* Panel views: any other side-by-side card row pulpstream.js lays out with the Tailwind gap-3 grid gets the
   same 15px gutter as the Reports folder | list row (zpPortal.css #reportsFolder ... > .row) - 20px cut by 25%. */
.zp-portal-theme main .row.grid.gap-3
{
	gap: 15px !important;
}

/* neo.html?embed=1 - a portal screen shown inside the Designer (zero/js/designer/designerPortalPages.js).
   The Designer brings its own header and Back button, so the portal's chrome is hidden, not removed. */
body.zp-embedded > .home-page-container > aside,
body.zp-embedded #sandboxBanner,
body.zp-embedded #supportpoint
{
	display: none !important;
}

body.zp-embedded.sandbox-mode
{
	--sandbox-banner-height: 0px;
}

/* The portal header is collapsed rather than display:none - jQuery measures a display:none element as if
   it were shown, so the setHeight code (home.js, accountManagement.js, ...) kept subtracting its ~60px. */
body.zp-embedded .display-container > header
{
	height: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	overflow: hidden !important;
	visibility: hidden;
}

/* Embedded in the Designer the page scrolls (Locations / Company Info grow with their content -
   zpPortalSettings.css .zp-am-page-scroll) but shows no scrollbar inside the Designer's frame: wheel,
   trackpad and touch still scroll. Covers the content area and anything in it that scrolls itself. */
body.zp-embedded .display-container,
body.zp-embedded main,
body.zp-embedded main .account-management-item-detail,
body.zp-embedded main #recordDetail,
body.zp-embedded main .right-content-area-scroll
{
	scrollbar-width: none;
	-ms-overflow-style: none;
}

body.zp-embedded .display-container::-webkit-scrollbar,
body.zp-embedded main::-webkit-scrollbar,
body.zp-embedded main .account-management-item-detail::-webkit-scrollbar,
body.zp-embedded main #recordDetail::-webkit-scrollbar,
body.zp-embedded main .right-content-area-scroll::-webkit-scrollbar
{
	display: none;
}

/* The app header (and the sandbox banner) never shrink. The content area is a flex column; once a page
   grows past the screen (Locations / Company Info scroll as a whole page - zpPortalSettings.css
   .zp-am-page-scroll), flex-shrink squeezed the 60px header to ~47px. */
.zp-portal-theme .display-container > header,
.zp-portal-theme #sandboxBanner
{
	flex-shrink: 0;
}

/* Global loading spinner (neo.html's body > .loading_div): a full-viewport flex box that centres the gif.
   showLoading() also runs jQuery .center(), which writes an absolute, scroll-relative top/left inline and
   left the gif at the top of the page (e.g. on arriving from the Designer's "Employee portal"). Pinning
   the box to the viewport overrides that; its own items-center/justify-center do the centring. */
body > .loading_div
{
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	align-items: center;
	justify-content: center;
}
