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

/* ------------------------------------------------------------------------------------------
   Record detail panel beside the list (My Records / Process Records / Shared Data). The list's
   .main-container already keeps a 24px right gutter, and #recordDetail's inline padding added its own
   24px on the left, so the two cards sat 48px apart - twice the page's side gutter. Drop the panel's
   left padding so the gap is the same 24px as everywhere else. Locations / Company Info set their own
   #recordDetail padding (zpPortal.css, two ids - wins over this), and the mobile layer gives the
   full-width detail its own padding (zpPortalMobile.css, higher specificity too).
   ------------------------------------------------------------------------------------------ */
.zp-portal-theme main .object-detail #recordDetail
{
	padding-left: 0 !important;
}

/* ------------------------------------------------------------------------------------------
   Record detail tabs (Activity / Details / Tasks / Attachments). scrollTabs pins its inner strip
   absolutely at top:0 inside the ul, so the ul, the strip, each li and each anchor all get the
   same 44px height - the labels then sit centred on the row and the active underline lands
   exactly on the row's bottom border instead of hanging below it.
   ------------------------------------------------------------------------------------------ */
.zp-portal-theme main #recordDetail .nested-tabs-block ul.nav-tabs.scroll_tabs_container,
.zp-portal-theme main #recordDetail .main-nested-tab-block ul.nav-tabs
{
	height: 45px !important;
	margin: 0 0 20px !important;
	padding: 0;
	border-bottom: 1px solid var(--zp-line) !important;
	box-sizing: border-box;
}

.zp-portal-theme main #recordDetail .nested-tabs-block .scroll_tab_inner
{
	height: 44px;
	top: 0 !important;
}

.zp-portal-theme main #recordDetail .nested-tabs-block .scroll_tab_inner li,
.zp-portal-theme main #recordDetail .nested-tabs-block ul.nav-tabs > li
{
	display: inline-flex !important;
	align-items: stretch;
	height: 44px;
	margin: 0 4px 0 0 !important;
	vertical-align: top;
	float: none;
}

/* A tab pulpstream.js hides with jQuery .hide() (inline display:none - Child Records when the record has
   no children, Tasks/Attachments without permission) must stay hidden; the inline-flex !important above
   would otherwise bring it back (memory neo-navtabs-hide-needs-dom-removal). */
.zp-portal-theme main #recordDetail .nested-tabs-block .scroll_tab_inner li[style*="display: none"],
.zp-portal-theme main #recordDetail .nested-tabs-block ul.nav-tabs > li[style*="display: none"]
{
	display: none !important;
}

.zp-portal-theme main #recordDetail .nested-tabs-block .nav.nav-tabs li > a
{
	display: flex !important;
	align-items: center;
	height: 44px !important;
	min-height: 0;
	line-height: 1 !important;
	padding-top: 2px !important;
	box-sizing: border-box;
}

.zp-portal-theme main #recordDetail .nested-tabs-block .scroll_tab_left_button,
.zp-portal-theme main #recordDetail .nested-tabs-block .scroll_tab_right_button
{
	height: 44px;
}

/* ------------------------------------------------------------------------------------------
   Milestone progress - "View process flow" as a real (secondary) button with a flow icon
   ------------------------------------------------------------------------------------------ */
.zp-portal-theme main #recordDetail .record-content-right a.flow-diagarm
{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0 14px;
	min-height: 32px;
	padding: 0 12px;
	border: 1px solid var(--zp-accent-border);
	border-radius: 8px;
	background: var(--zp-accent-tint);
	color: var(--zp-accent-ink) !important;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.zp-portal-theme main #recordDetail .record-content-right a.flow-diagarm::before
{
	content: "";
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6M18 15a3 3 0 1 0 0 6 3 3 0 0 0 0-6M6 9v3a3 3 0 0 0 3 3h6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6M18 15a3 3 0 1 0 0 6 3 3 0 0 0 0-6M6 9v3a3 3 0 0 0 3 3h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.zp-portal-theme main #recordDetail .record-content-right a.flow-diagarm:hover
{
	background: var(--zp-accent-tint-2);
}

/* the milestone list: no underline rule under each title, lighter connector, tighter text */
.zp-portal-theme main #recordDetail .stages-list .chart-stage,
.zp-portal-theme main #recordDetail .stages-list .stage-title
{
	border-bottom: 0 !important;
	text-decoration: none;
}

.zp-portal-theme main #recordDetail .stages-list .stage-title
{
	margin: 0 0 2px;
	line-height: 1.3;
}

.zp-portal-theme main #recordDetail .stages-list .status-text
{
	display: block;
	line-height: 1.4;
}

/* ------------------------------------------------------------------------------------------
   Record AI summarization is switched off for now (pulpstream.js hides the Case Summary button);
   the summary panel is held hidden too, in case a stale one is ever shown.
   ------------------------------------------------------------------------------------------ */
.zp-portal-theme main #recordDetail #genAISummary.hidden,
.zp-portal-theme main #recordDetail .ai-summary-container
{
	display: none !important;
}

/* ------------------------------------------------------------------------------------------
   Record detail actions: the task "Actions" dropdown (taskActionRelatedButtonTemplate's
   .task-action-group, shown when a task has more than two actions), the process / Change Status
   dropdowns in .process-action-button, and the "..." overflow (.stream-record-dropdown, moved next
   to the close button by pulpstream.js). Button = the portal's primary button with an SVG chevron;
   menu = the header dropdowns (.mysetting-dropdown, zpPortal.css). The legacy task-action menu paints
   each <li> in the action's colour with white text and #ccc rules INLINE, hence the !importants.
   Scoped to both containers the record view can render into (#recordDetail, #instances).
   ------------------------------------------------------------------------------------------ */
.zp-portal-theme main :is(#recordDetail, #instances) .task-action-group > .dropdown > button.dropdown-toggle
{
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	height: 36px !important;
	min-height: 36px;
	padding: 0 12px 0 14px !important;
	border: 1px solid var(--zp-accent) !important;
	border-radius: 8px !important;
	background: var(--zp-accent) !important;
	background-image: none !important;
	color: #FFFFFF !important;
	font-family: var(--zp-font) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1;
	text-shadow: none;
	box-shadow: none !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) .task-action-group > .dropdown > button.dropdown-toggle:hover,
.zp-portal-theme main :is(#recordDetail, #instances) .task-action-group > .dropdown.open > button.dropdown-toggle
{
	background: var(--zp-accent-strong) !important;
	border-color: var(--zp-accent-strong) !important;
}

/* chevron: hide the FontAwesome angle (kept in the DOM) and draw the portal's SVG chevron */
.zp-portal-theme main :is(#recordDetail, #instances) :is(.task-action-group, .change-status-process, .started-process) button.dropdown-toggle > i.fa-angle-down
{
	display: none !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) :is(.task-action-group, .change-status-process, .started-process) button.dropdown-toggle::after
{
	content: "";
	flex-shrink: 0;
	width: 12px;
	height: 12px;
	margin-left: 2px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.zp-portal-theme main :is(#recordDetail, #instances) :is(.change-status-process, .started-process) button.dropdown-toggle
{
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
}

/* the "..." overflow toggle (the detached copy pulpstream.js puts in .close-button-col): a 36px
   borderless icon button, like the maximize icon beside it; it tints only on hover / while open */
.zp-portal-theme main :is(#recordDetail, #instances) .close-button-col .stream-record-dropdown
{
	width: 36px !important;
	height: 36px !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent !important;
	box-shadow: none !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) .close-button-col .stream-record-dropdown:hover,
.zp-portal-theme main :is(#recordDetail, #instances) .close-button-col .stream-record-dropdown.open
{
	background: var(--zp-accent-tint) !important;
}

/* the opened menus */
.zp-portal-theme main :is(#recordDetail, #instances) :is(.task-action-group, .change-status-process, .started-process, .stream-record-dropdown) .dropdown-menu
{
	left: auto !important;
	right: 0 !important;
	top: calc(100% + 6px) !important;
	min-width: 200px;
	margin: 0 !important;
	padding: 6px !important;
	background: var(--zp-surface) !important;
	border: 1px solid var(--zp-line) !important;
	border-radius: 12px !important;
	box-shadow: 0 12px 32px rgba(28,27,34,0.12) !important;
	text-align: left;
	z-index: 60;
}

.zp-portal-theme main :is(#recordDetail, #instances) :is(.task-action-group, .change-status-process, .started-process, .stream-record-dropdown) .dropdown-menu > li
{
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
}

/* hairline between items, as the header dropdowns separate groups */
.zp-portal-theme main :is(#recordDetail, #instances) :is(.task-action-group, .change-status-process, .started-process, .stream-record-dropdown) .dropdown-menu > li + li
{
	border-top: 1px solid var(--zp-line-soft) !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) :is(.task-action-group, .change-status-process, .started-process, .stream-record-dropdown) .dropdown-menu > li > a
{
	display: block;
	margin: 2px 0;
	padding: 8px 12px !important;
	border-radius: 8px;
	background: transparent !important;
	color: var(--zp-ink) !important;
	font-family: var(--zp-font) !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.4;
	white-space: nowrap;
	text-decoration: none;
}

.zp-portal-theme main :is(#recordDetail, #instances) :is(.task-action-group, .change-status-process, .started-process, .stream-record-dropdown) .dropdown-menu > li > a:hover
{
	background: var(--zp-accent-tint) !important;
	color: var(--zp-accent-ink) !important;
}

/* destructive actions in red ink. Task actions carry the action NAME as the anchor id; process menus
   use #abortProcess. Matching is by id, case-insensitive (Void / Cancel / Delete / Reject / Abort). */
.zp-portal-theme main :is(#recordDetail, #instances) :is(.task-action-group, .change-status-process, .started-process, .stream-record-dropdown) .dropdown-menu > li > a:is([id*="void" i], [id*="cancel" i], [id*="delete" i], [id*="reject" i], [id*="abort" i], [type="2"]:is(.smartobject-record-action-menu a))
{
	color: #DC2626 !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) :is(.task-action-group, .change-status-process, .started-process, .stream-record-dropdown) .dropdown-menu > li > a:is([id*="void" i], [id*="cancel" i], [id*="delete" i], [id*="reject" i], [id*="abort" i]):hover
{
	background: #FEF2F2 !important;
	color: #B91C1C !important;
}

/* ------------------------------------------------------------------------------------------
   Record detail head, compact - back to the old UI's sizing: the card's padding, the title, the
   rows between title / status / actions / tabs, the action buttons (40 -> 32px) and the detail
   tabs (44 -> 38px) were each a notch bigger, which pushed Activity ~80px further down.
   ------------------------------------------------------------------------------------------ */
.zp-portal-theme main :is(#recordDetail, #instances) .main-tab-wrapper.eu-records
{
	padding: 14px 24px !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) .summary-header
{
	margin: 0 !important;
	padding: 0 !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) .summary-header h3
{
	margin: 0 !important;
	font-size: 18px !important;
	line-height: 1.3 !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) .summary-2-text
{
	margin: 2px 0 0 !important;
	line-height: 1.4 !important;
}

/* pulpstream.js gives the summary block mt-2 under the close / "..." row - halve it */
.zp-portal-theme main :is(#recordDetail, #instances) .form-header.summary-text
{
	margin-top: 4px !important;
}

/* FONT: the summary block (title, subtitle, status / "Submitted by" row, action buttons) is set in
   Pulpstream's own face, Open Sans (main.css --font-sans; its later body rule wins over the Inter
   one), not the portal's Inter. Icon fonts (.fa / glyphicon / <i>) are left alone. */
.zp-portal-theme main :is(#recordDetail, #instances) .form-header.summary-text,
.zp-portal-theme main :is(#recordDetail, #instances) .form-header.summary-text *:not(i):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="glyphicon"])
{
	font-family: var(--font-sans, "Open Sans", sans-serif) !important;
}

/* pulpstream.js adds flex gap-3 here, which stacked on .record-subtext's own margin (12 + 8px
   between the title block and the status row) - let the margin alone set that gap */
.zp-portal-theme main :is(#recordDetail, #instances) .form-header-text
{
	gap: 0 !important;
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) .record-subtext
{
	margin: 10px 0 0 !important;
	padding: 0 !important;
	line-height: 1.4;
}

.zp-portal-theme main :is(#recordDetail, #instances) .process-action-button,
.zp-portal-theme main :is(#recordDetail, #instances) .object-action-buttons
{
	margin-top: 8px !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) .process-action-button .btn.btn-info.user-toolbar-btn,
.zp-portal-theme main :is(#recordDetail, #instances) .object-action-buttons .btn.btn-info.user-toolbar-btn,
.zp-portal-theme main :is(#recordDetail, #instances) .edit-buttons .btn.btn-info.user-toolbar-btn,
.zp-portal-theme main :is(#recordDetail, #instances) .task-action-group > .dropdown > button.dropdown-toggle
{
	height: 32px !important;
	min-height: 32px !important;
	padding: 0 12px !important;
	font-size: 13px !important;
	line-height: 1 !important;
}

.zp-portal-theme main :is(#recordDetail, #instances) .nested-tabs-block
{
	margin-top: 4px !important;
}

/* the legacy wrapper around the tab ul draws its own #ddd bottom rule (pulpstream2.css) at 40px,
   just above the ul's portal hairline - two lines under the tabs. The ul keeps the only rule. */
.zp-portal-theme main :is(#recordDetail, #instances) .nested-tabs-block .main-nested-tab-block
{
	height: auto !important;
	min-height: 0 !important;
	padding-left: 0 !important;
	border-bottom: 0 !important;
	background: transparent;
}

.zp-portal-theme main :is(#recordDetail, #instances) .nested-tabs-block .nav.nav-tabs li > a
{
	min-height: 38px !important;
}

/* Child Records tab: hide the bare column header while the table has no rows - pulpstream.js
   showChildRecordsEmptyState puts the Tasks/Attachments-style "No Child Records Present" card beside it */
.zp-portal-theme main #recordDetail #childRecords .related-table-div:not(:has(tr.report-data-row))
{
	display: none !important;
}

/* ------------------------------------------------------------------------------------------
   Maximized record (the maximize icon hides the list and pulpstream.js addMaximizeMinimizeButton puts
   .zp-record-max on .object-detail). The panel's left padding is dropped above because the list's gutter
   normally supplies the gap; with the list gone the card sat flush against the sidebar, so give it the
   page's 24px gutter back. (2026-11-04)
   ------------------------------------------------------------------------------------------ */
.zp-portal-theme main .object-detail.zp-record-max #recordDetail
{
	padding-left: 24px !important;
}

/* The Activity pane is a display:table (pulpstream2.css .eu-records ... .tab-content > .active) with no width,
   so it shrink-wrapped to its floats and its 68.55% / 31.45% columns were measured against that shrunk box:
   the Milestone Progress column ran past the Add Note / Send Email bar and stopped short of (or overran) the
   tab rule, worst in the maximized view. Make the pane as wide as the tab content so the note bar, the feed
   and the milestone column share one right edge. (2026-11-04) */
.zp-portal-theme main #recordDetail .eu-records .nested-tabs-block .tab-content > .active
{
	width: 100%;
}

/* ------------------------------------------------------------------------------------------
   List search bar (records, shared data, tasks): stretch across the card instead of the 420px box
   zpPortal.css capped it at - the Advanced Search link then sits at the bar's right end. (2026-11-04)
   ------------------------------------------------------------------------------------------ */
.zp-portal-theme main .search-bar .div-1
{
	max-width: none;
}

/* ------------------------------------------------------------------------------------------
   Side-by-side panels (list | detail on My Records / Process Records / Shared Data / Tasks): the gap
   between the two cards is the list's right padding (zpPortal.css .main-container 24px; the detail
   has no left padding of its own). While a detail is open, cut that middle gutter by 25% to 18px -
   the same treatment the Reports folder | list row got. With the detail closed the list keeps the
   page's 24px right gutter. (2026-11-04)
   ------------------------------------------------------------------------------------------ */
.zp-portal-theme main .object-row:has(+ .object-detail:not(.hidden)) .main-container
{
	padding-right: 18px !important;
}

/* The In Process / Completed tab card above the list (zpPortalV2.css: margin 0 24px) must follow the same
   trim, or the list runs 6px past the card's right edge while a detail is open. Out-specifies the V2 rule. */
body.zp-portal-theme main:not(#zpv2a):not(#zpv2b) .object-row:has(+ .object-detail:not(.hidden)) #all > .widget-tabs
{
	margin-right: 18px !important;
}

/* Records page tab bar (2026-11-04): every view tab carries a drag handle that pulpstream2.css keeps at width 0
   until the tab is hovered (then 25px). The anchor is a flex row with an 8px gap, so even with the handle
   collapsed the label sat 8px right of centre and the active underline overhung the text 22px left / 14px
   right. Drop the gap; the handle gets its spacing back only while it is shown (hover). */
.zp-portal-theme main .view-tabs .nav-tabs li > a
{
	gap: 0 !important;
}

.zp-portal-theme main .view-tabs .nav-tabs li.view-tab:hover > a .prefer-cell.drag-icon
{
	margin-right: 8px;
}

/* Records list: jScrollPane insets .jspPane 4px on the left (its vertical gutter) while the list code sizes
   .record-search-container to the full container width, so the search bar overhung the card by 4px on the
   right and its left/right gaps differed. Let the pane span the card and the search container follow it. */
.zp-portal-theme main .smart-object-list-view .jspPane
{
	margin-left: 0 !important;
	width: 100% !important;
}

.zp-portal-theme main .smart-object-list-view .record-search-container
{
	width: 100% !important;
	max-width: 100%;
}

/* Records list Advanced Search: its filter rows sat flush against the card's left edge and the tabs above
   (only a bottom pad). Same 16px inset as the plain search bar (.stream-list-search), same divider. */
.zp-portal-theme main .advance-search-container-detail
{
	padding: 16px !important;
	box-sizing: border-box;
	border-bottom: 1px solid var(--zp-line-soft);
}

/* ...and with that inset its "Add new filter condition" link wrapped onto two lines - keep it on one */
.zp-portal-theme main .advance-search-container-detail .add-more-filter
{
	white-space: nowrap;
}
