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

/* Analytics > Schedules (#reportSchedules, ReportScheduler.js) and Automations (#manageSchedules,
   ProcessScheduler.js). Both reuse the Users list shell (Users.js#dataListAndDetailHTMLString); its
   .widget-tabs becomes the page head: title + subtitle with the New button on the right, and (on
   Automations) the One Time / Recurring filter as segmented pills on the row below. */
.zp-portal-theme main #reportSchedules > .widget-tabs,
.zp-portal-theme main #manageSchedules > .widget-tabs
{
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "head actions" "tabs tabs";
	align-items: end;
	column-gap: 16px;
	row-gap: 20px;
	margin: 0 !important;
	padding: 32px 24px 20px !important;
	background: transparent !important;
	border: 0 !important;
}

.zp-portal-theme main .zp-schedule-head
{
	grid-area: head;
}

.zp-portal-theme main #reportSchedules > .widget-tabs > .view-tabs,
.zp-portal-theme main #manageSchedules > .widget-tabs > .view-tabs
{
	display: contents;
}

.zp-portal-theme main #reportSchedules .view-tabs > .items-center,
.zp-portal-theme main #manageSchedules .view-tabs > .items-center
{
	grid-area: tabs;
	min-width: 0;
}

/* Schedules has no filter tabs - only the hidden label tab the shell needs. :not(.list-actions-buttons)
   because the action bar is ALSO a direct .items-center child of .view-tabs - the bare selector hid the
   New Schedule button with it, leaving no way to create a report schedule */
.zp-portal-theme main #reportSchedules .view-tabs > .items-center:not(.list-actions-buttons)
{
	display: none;
}

/* > .list-actions-buttons, not just .list-actions-buttons: the action bar is also .items-center, so the
   more specific ".view-tabs > .items-center" rule above put it in the "tabs" row - below the title */
.zp-portal-theme main #reportSchedules .view-tabs > .list-actions-buttons,
.zp-portal-theme main #manageSchedules .view-tabs > .list-actions-buttons,
.zp-portal-theme main #reportSchedules .list-actions-buttons,
.zp-portal-theme main #manageSchedules .list-actions-buttons
{
	grid-area: actions;
	width: auto !important;
	padding: 0 !important;
	gap: 8px;
}

/* Schedules has no filter row, but the two-row grid above still laid out an empty "tabs" row (plus its
   20px row gap) - New Schedule dropped below the title and a band of space opened under the head. One
   row here, the button centred on the whole head (title + subtitle) the way Reports' New Report is
   (its nested py-2 action bar zeroed so it is just the button). */
.zp-portal-theme main #reportSchedules > .widget-tabs
{
	grid-template-areas: "head actions";
	align-items: center;
	gap: 0 16px !important;   /* zpPortal.css's ".widget-tabs { gap: 8px !important }" */
}

.zp-portal-theme main #reportSchedules .view-tabs > .list-actions-buttons
{
	align-self: center;
}

.zp-portal-theme main #reportSchedules .list-actions-buttons .list-actions-buttons
{
	padding: 0 !important;
}

/* Automations' three filters: scrollTabs (non-sort mode) absolutely positions its inner strip across
   the whole row; with three short tabs nothing overflows, so let it shrink-wrap as a pill bar */
.zp-portal-theme main #manageSchedules .view-tabs ul.nav-tabs
{
	width: auto !important;
	height: auto !important;
	border: 0;
	margin: 0;
}

.zp-portal-theme main #manageSchedules .scroll_tab_left_button,
.zp-portal-theme main #manageSchedules .scroll_tab_right_button,
.zp-portal-theme main #manageSchedules .scroll_tab_left_finisher,
.zp-portal-theme main #manageSchedules .scroll_tab_right_finisher
{
	display: none !important;
}

.zp-portal-theme main #manageSchedules .view-tabs .scroll_tab_inner
{
	position: static !important;
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	background: var(--zp-surface);
	border: 1px solid var(--zp-line);
	border-radius: 12px;
	font-size: 14px !important;
}

.zp-portal-theme main #manageSchedules .view-tabs .scroll_tab_inner li
{
	display: inline-flex !important;
	margin: 0 !important;
}

/* the list: search bar over the table, in one white card that fills down to Home's bottom gap
   (ReportScheduler.js / ProcessScheduler.js setHeight -> portal.js zpCardHeight), empty state centred
   in it (portal.js jsp-initialised handler). Was: the card on the jScrollPane pane, so it shrink-wrapped
   to the rows and ended mid-screen - and its top edge scrolled away with the rows. The frame now sits on
   the fixed-height scroll element, like the record lists (zpPortal.css .smart-object-list-view). */
.zp-portal-theme main #reportSchedules #recordListContainer .tab-content-outer,
.zp-portal-theme main #manageSchedules #recordListContainer .tab-content-outer
{
	background: transparent;
}

.zp-portal-theme main #reportSchedules #recordListContainer .jspPane,
.zp-portal-theme main #manageSchedules #recordListContainer .jspPane
{
	background: var(--zp-surface);
	box-sizing: border-box;
}

.zp-portal-theme main #reportSchedules .record-search-container,
.zp-portal-theme main #reportSchedules .user-search-container,
.zp-portal-theme main #manageSchedules .record-search-container,
.zp-portal-theme main #manageSchedules .user-search-container
{
	background: var(--zp-surface) !important;
}

.zp-portal-theme main #reportSchedules #recordListContainer .right-content-area-scroll,
.zp-portal-theme main #manageSchedules #recordListContainer .right-content-area-scroll
{
	position: relative;
	background: var(--zp-surface) !important;
	border-radius: var(--zp-radius-card);
	box-shadow: var(--zp-shadow-card);
	overflow: hidden;
}

.zp-portal-theme main #reportSchedules #recordListContainer .right-content-area-scroll::after,
.zp-portal-theme main #manageSchedules #recordListContainer .right-content-area-scroll::after
{
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	border: 1px solid var(--zp-line);
	border-radius: inherit;
	pointer-events: none;
	z-index: 3;
}

.zp-portal-theme main #reportSchedules table.stream-version-details,
.zp-portal-theme main #manageSchedules table.stream-version-details
{
	border: 0 !important;
}

.zp-portal-theme main #reportSchedules .main-container,
.zp-portal-theme main #manageSchedules .main-container
{
	margin-top: 0 !important;
	/* Home's list shell carries pb-5 (home.js) and zpCardHeight (portal.js) ends a card that far above
	   the bottom of #recordListContainer - the gap under every other list card. The Users shell these
	   pages reuse has no bottom padding, so their cards ran flush to the bottom edge. */
	padding-bottom: 20px !important;
}

@media (max-width: 63.99rem)
{
	.zp-portal-theme main #reportSchedules > .widget-tabs,
	.zp-portal-theme main #manageSchedules > .widget-tabs
	{
		padding: 24px 16px 16px !important;
	}
}
