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

   Record start forms and task completion forms in the portal (addNewRecordTemplate rendered into
   .k2-sec-popup.form-k2-sec-popup) styled like the Designer's form preview (designerExperience.css:
   .zp-startform-card / .zp-form-section / .zp-form-field): a white card with a violet top rule, a
   header row with the form title, violet section titles separated by hairlines, 13px semibold labels
   with a red asterisk, and 38px white inputs on a light border. */

/* FONT: rendered forms use the portal's own font (--zp-font, Inter: zpPortal.css :root), like the
   headings, tabs and nav around them. They used to re-point --zp-font here to the Designer preview's
   system stack (-apple-system / Segoe UI / Roboto ...), which on machines without those fonts fell
   back to Arial, so field values read in a different face from the rest of the portal. The rules
   below push var(--zp-font) onto every legacy element that names its own font (Open Sans labels,
   form-control inputs, pickers, read-only values). Icon fonts (.fa / glyphicon / <i>) are left alone. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab
{
	font-family: var(--zp-font) !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup *:not(i):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="glyphicon"]),
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab *:not(i):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="glyphicon"])
{
	font-family: var(--zp-font) !important;
}

/* the card */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup
{
	max-width: 100%;
	font-family: var(--zp-font);
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup > .row
{
	margin: 16px 0 0 !important;
	padding: 0 !important;
	background: #FFFFFF !important;
	border: 1px solid #E2E5EC;
	border-top: 3px solid #7C3AED;
	border-radius: 14px !important;
	box-shadow: 0 1px 2px rgba(20,16,40,0.05), 0 10px 30px rgba(20,16,40,0.07);
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup > .row > .col-sm-12
{
	padding: 0;
}

/* header row: form title on the left, close on the right */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .popup-header
{
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 40px !important;
	border-bottom: 1px solid #EEF0F4;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .popup-header h2
{
	flex: 1;
	width: auto;
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: #1A1F26;
}

/* page tabs: the Designer's page tabs, and none at all for a single-page form (as the Designer shows it) */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .financial-nav
{
	height: auto !important;
	padding: 0 40px !important;
	margin-top: 12px;
	background: transparent;
	border-bottom: 1px solid #E2E5EC;
}

/* scrollTabs() (pulpstream.js, run on every open) re-parents the <li>s into .scroll_tab_inner next to
   two <span> finishers (or into .tab-li-container), so the old "> ul > li:only-child" test never
   matched once the form was on screen. li:only-of-type ignores the spans and works at any depth. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .financial-nav:has(> ul.nav-tabs > li:only-child),
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .financial-nav:has(ul.nav-tabs li:only-of-type)
{
	display: none !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .financial-nav .nav-tabs
{
	border: 0;
	gap: 4px;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .financial-nav .nav-tabs > li > a
{
	height: auto !important;
	margin-bottom: -1px;
	padding: 8px 12px !important;
	background: none !important;
	border: 0 !important;
	border-bottom: 2px solid transparent !important;
	border-radius: 0 !important;
	color: #5B6472 !important;
	font-size: 12.5px !important;
	font-weight: 500 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .financial-nav .nav-tabs > li.active > a
{
	color: #6D28D9 !important;
	font-weight: 700 !important;
	border-bottom-color: #7C3AED !important;
}

/* single-page forms: ALSO detect "one page" from the panes (each page renders one .tab-pane), which
   holds however scrollTabs rewrites the strip, and collapse the strip to nothing. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .record-form-tab:has(> .tab-content > .tab-pane:only-child) > .financial-nav
{
	display: none !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

/* multi-page strip: legacy height 46px (pulpstream2.css:4627) and the nav-tabs / scroll container
   borders give way to the one light rule */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .financial-nav
{
	border-bottom: 1px solid #EEF0F4 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .financial-nav ul.nav-tabs,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .financial-nav .scroll_tabs_container
{
	border: 0 !important;
}

/* the dark line under the header: .financial-tab .tab-content's 1px #b7b7b7 frame (and -4px pull-up)
   and the pane header's #b7b7b7 bottom border (pulpstream.css .tab-content-header). The header row's
   own #EEF0F4 rule (the Designer card-head border) is then the only divider. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .record-form-tab > .tab-content
{
	margin-top: 0 !important;
	border: 0 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .tab-content-header
{
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* body */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .record-form-tab-content
{
	padding: 28px 40px 36px !important;
	background: #FFFFFF;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-layout-container.form-content
{
	margin: 0 !important;
	padding: 0 !important;
	background: transparent;
}

/* sections: violet title, hairline between sections */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .section-form-content
{
	margin: 0 0 20px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

/* the hairline goes only on a section that FOLLOWS another one. The old ":first-child" exemption
   missed whenever a field (often a hidden one) came before the first section, which drew a second
   rule straight under the header rule (the task completion "double line"). */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .section-form-content ~ .section-form-content
{
	padding-top: 16px !important;
	border-top: 1px solid #EEF0F4 !important;
}

/* column layouts carry an inline min-height:70px that pads out the bottom of the form */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .layout_container
{
	min-height: 0 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .k2-inner-head
{
	margin: 0 0 14px !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.01em;
	color: #6D28D9 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .section-field-area
{
	padding-bottom: 0 !important;
}

/* ALIGNMENT + RHYTHM. setFormNewUI (pulpstream.js) adds Tailwind "mt-2 px-3 flex flex-col" to EVERY
   .row in the popup, including each section's inner row, and legacy CSS gives each field
   margin-top:5px + 5px side padding (.financial-tab .form-layout-container.form-content .form-group)
   and floats the containers. Together that inset the fields ~6px from the section title and put ~30px
   between title and first label. Zero it so title, label and input share one left/right edge and the
   gaps are exactly the Designer's: title 14px -> label 6px -> input, 16px between fields. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .section-form-content > .row,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .section-form-content > .row
{
	margin: 0 !important;
	padding: 0 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .section-form-content > .row > .col-sm-12,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .section-form-content > .row > .col-sm-12
{
	float: none;
	width: 100%;
	padding: 0 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-layout-container.form-content .form-group,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .form-layout-container.form-content .form-group
{
	margin-top: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-layout-container.form-content,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .section-form-content
{
	float: none !important;
	width: 100% !important;
}

/* the Designer's last field margin (16px) collapses into the section's 20px, so a divider sits 20px
   under the last field; the portal's floats stop that collapse, so take the last field's 16px back */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .section-form-content .section-field-area
{
	margin-bottom: -16px !important;
}

/* a section whose title is switched off (showTitle=false - the Designer preview still prints it) starts
   its content where the Designer's first label would sit under its title: ~16px title line + 14px
   gap (30px; 16px divider gap + 30px = 46px when it follows another section) - so an untitled
   Information block no longer sits flush on the header/divider rule */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .section-form-content:not(:has(> .k2-inner-head))
{
	padding-top: 30px !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .section-form-content ~ .section-form-content:not(:has(> .k2-inner-head))
{
	padding-top: 46px !important;
}

/* section titles at the Designer h4's line box, so the 30px above lines up with a titled section */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .k2-inner-head
{
	line-height: normal !important;
}

/* fields. The field-level rules below (labels, star/help badge, Information text, inputs, lookup box,
   read-only) are SHARED with the record detail pane's form (recordDetailFormTemplate ->
   #recordDetail .form-content-tab), so both read like the Designer preview. The Settings pages
   (#org-hierarchy / #company-information) reuse #recordDetail with their own look in zpPortal.css,
   hence the :not() guards. Task completion forms are #addNewRecordPopup too (showTaskCompletionForm
   renders addNewRecordTemplate and adds .task-completion-form), so they share every popup rule. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-group
{
	margin-bottom: 16px;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-group.layout,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-group.section-form-content
{
	margin-bottom: 0;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup label.form-label-pos,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab label.form-label-pos
{
	display: block;
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-family: var(--zp-font) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.4;
	letter-spacing: 0;
	color: #1A1F26 !important;
}

/* label row in the Designer's order: label, red *, then the ? help badge. The star is the label's
   ::after and the hint is a child div rendered BEFORE it, so lay the label out as a flex row and
   reorder (text = 0, star = 1, hint = 2, the TextArea label's hidden helper links = 3). */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup label.form-label-pos,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab label.form-label-pos
{
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	float: none;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup label.form-label-pos > span,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab label.form-label-pos > span
{
	float: none !important;
	margin-right: 0 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup label.form-label-pos.required:after,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab label.form-label-pos.required:after
{
	order: 1;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup label.form-label-pos > a,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab label.form-label-pos > a
{
	order: 3;
}

/* the ? help badge (Designer .zp-form-help) in place of the legacy outlined-circle sprite */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup label.form-label-pos .field-hint-icon,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab label.form-label-pos .field-hint-icon
{
	order: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: static;
	top: auto;
	float: none !important;
	width: 15px;
	height: 15px;
	margin: 0 0 0 6px;
	border-radius: 50%;
	background: #ECEAF4 !important;
	color: #8B7FB0;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	cursor: help;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup label.form-label-pos .field-hint-icon:before,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab label.form-label-pos .field-hint-icon:before
{
	content: "?";
}

/* Information element (static guidance text; fieldType Information, NOT Information Asset): body
   text like the Designer's .zp-form-info rather than a bold label. Overrides the element's own
   labelCss, as the Designer preview does. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-group.Information:not(.Asset) label.form-label-pos,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .form-group.Information:not(.Asset) label.form-label-pos
{
	display: block !important;
	margin: 0 !important;
	font-size: 12.5px !important;
	font-weight: 400 !important;
	line-height: 1.5;
	color: #3B4250 !important;
	white-space: pre-line;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-group.Information:not(.Asset),
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .form-group.Information:not(.Asset)
{
	margin-bottom: 14px;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .required:after,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .required:after
{
	margin-left: 4px;
	padding: 0;
	top: 0;
	font-size: 13px;
	font-weight: 700;
	color: #DC2626;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-control,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup select,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .chosen-container-single .chosen-single,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .form-control,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab select,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .chosen-container-single .chosen-single
{
	height: 38px;
	min-height: 38px;
	padding: 0 12px;
	background: #FFFFFF !important;
	background-image: none;
	border: 1px solid #E2E5EC !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	font-family: var(--zp-font);
	font-size: 13px;
	color: #1A1F26;
	box-sizing: border-box;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .chosen-container-single .chosen-single span,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .chosen-container-single .chosen-single span
{
	line-height: 36px;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup textarea.form-control,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab textarea.form-control
{
	background-image: none !important;
	height: auto;
	min-height: 60px;
	padding: 10px 12px;
	line-height: 1.5;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-control:focus,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup select:focus,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .chosen-container-active .chosen-single
{
	outline: none;
	border-color: #7C3AED !important;
	box-shadow: 0 0 0 3px rgba(124,58,237,0.12) !important;
}

/* lookup ("Choose Record") value box: same box as the other inputs, not the legacy #ccc + inset
   shadow. Only the in-form box - the record-picker modal itself is styled elsewhere. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .lookup-field-value-container,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .lookup-field-value-container
{
	min-height: 38px !important;
	height: auto;
	background: #FFFFFF;
	border: 1px solid #E2E5EC;
	border-radius: 8px;
	box-shadow: none;
	box-sizing: border-box;
	font-size: 13px;
	color: #1A1F26;
}

/* the magnifier / calendar glyphs sit inside the right edge of a 38px box: centre them */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup a.p-choose-lookup,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup a.dp-choose-date,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab a.p-choose-lookup,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab a.dp-choose-date
{
	margin-top: 9px;
}

/* ...drawn as the Designer's small light icons: the legacy sprite (set with !important in
   pulpstream2.css) is replaced by a 14px #8B93A1 SVG on the SAME anchor, so the click target and its
   handlers are untouched */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup a.p-choose-lookup,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab a.p-choose-lookup
{
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B93A1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / 14px 14px no-repeat transparent !important;
	opacity: 1;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup a.dp-choose-date,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab a.dp-choose-date
{
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B93A1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center / 14px 14px no-repeat transparent !important;
	opacity: 1;
}

/* label -> control gap on child lists and file fields: the Designer's 6px (label margin) only. The
   empty grid table kept a 10px bottom margin (pulpstream2.css:9817) and the file wrapper a 5px top
   margin above its <form> */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup table.documentListGridtable
{
	margin: 0 0 8px !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup table.documentListGridtable:has(> tbody.data-tbody:empty)
{
	margin: 0 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-group form:has(> .file-wrapper),
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-group .file-wrapper
{
	margin-top: 0 !important;
	margin-bottom: 0;
}

/* child data list "Add" and file / signature / sketch / audio buttons: the Designer's lavender
   .zp-form-add-btn ("+ Add") instead of the blue outlined / grey legacy buttons */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup a.blue-border-button#addNewRecord,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .file-wrapper .button
{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: auto;
	height: auto;
	padding: 7px 14px;
	border: 1px solid #CFC6EA;
	border-radius: 8px;
	background: #F7F5FD;
	color: #6D28D9;
	font-family: var(--zp-font) !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	line-height: normal !important;
	text-decoration: none;
	cursor: pointer;
}

/* File / Image upload button: the Designer's paperclip prefix ("📎 Add File"); the label text stays the
   template's. Signature / sketch / audio / file-reference buttons have no prefix in the Designer either. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .file-wrapper:not(.signature-field):not(.sketch-pad-field):not(.audio-field):not(.file-reference-container) .button:before
{
	content: "\1F4CE";
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup a.blue-border-button#addNewRecord:before
{
	content: "+";
	margin-right: -2px;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup a.blue-border-button#addNewRecord:hover,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .file-wrapper:hover .button
{
	background: #EFE9FC;
	border-color: #A78BFA;
	color: #6D28D9;
}

/* read-only / disabled fields: the Designer preview's .zp-form-control-readonly exactly
   (designerExperience.css .zp-form-control-readonly - #EEF0F4 fill, not-allowed), on the normal #E2E5EC
   border. The TEXT stays the normal dark #1A1F26 so a filled-in read-only value (a submitted record's
   details, a computed field) reads as easily as an editable one; only the fill says "not yours to edit".
   Placeholders keep the muted grey below so an empty read-only box still looks empty. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-control[readonly],
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-control[disabled],
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup select[disabled],
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .chosen-disabled .chosen-single,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .form-control[readonly],
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .form-control[disabled],
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab select[disabled],
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .chosen-disabled .chosen-single
{
	background: #EEF0F4 !important;
	border: 1px solid #E2E5EC !important;
	color: #1A1F26 !important;
	-webkit-text-fill-color: #1A1F26;
	cursor: not-allowed;
	opacity: 1;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-control[readonly]::placeholder,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-control[disabled]::placeholder,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .form-control[readonly]::placeholder,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .form-control[disabled]::placeholder
{
	color: #8B93A1;
	-webkit-text-fill-color: #8B93A1;
	opacity: 1;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .chosen-disabled,
.zp-portal-theme main #recordDetail:not(#org-hierarchy #recordDetail):not(#company-information #recordDetail) .form-content-tab .chosen-disabled
{
	opacity: 1 !important;
}

/* footer: Cancel / Save as draft as white secondary buttons, Submit in the accent */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .popup-footer
{
	padding: 0;
	background: #FFFFFF;
	border-radius: 0 0 14px 14px;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons
{
	padding: 16px 40px !important;
	border-color: #EEF0F4 !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons
{
	justify-content: flex-end;
	gap: 8px !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > a,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > button
{
	width: auto !important;
	height: 38px !important;
	padding: 0 18px !important;
	border: 1px solid #E2E5EC !important;
	border-radius: 8px !important;
	background: #FFFFFF !important;
	background-image: none !important;
	color: #1A1F26 !important;
	font-family: var(--zp-font) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	text-shadow: none;
	box-shadow: none;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > #submitRecord,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > button:last-child
{
	background: #7C3AED !important;
	border-color: #7C3AED !important;
	color: #FFFFFF !important;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > #submitRecord:hover,
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > button:last-child:hover
{
	background: #6D28D9 !important;
}

/* While a submit / draft save is in flight pulpstream.js puts .saveButtonProcessing on the button. Its old
   look (a loading.gif background) is switched off by the background-image:none above, so the button did not
   change at all. Show it here: a spinner, "Submitting…" / "Saving…" in place of the label, dimmed, no clicks. */
.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > .saveButtonProcessing
{
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 0 !important;	/* hides the button's own label; ::after carries the text */
	opacity: 0.75;
	cursor: default;
	pointer-events: none;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > .saveButtonProcessing::before
{
	content: "";
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: zpFormBtnSpin 0.7s linear infinite;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > .saveButtonProcessing::after
{
	content: "Saving\2026";
	font-size: 13px;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > #submitRecord.saveButtonProcessing::after
{
	content: "Submitting\2026";
}

@keyframes zpFormBtnSpin
{
	to { transform: rotate(360deg); }
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-controll-buttons a
{
	font-size: 12.5px;
	color: #5B6472;
}

.zp-portal-theme .form-k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-controll-buttons a:hover
{
	color: #6D28D9;
}

/* ==========================================================================================
   Add Attachment dialog (#generalModalDialog). pulpstream.js#attachRecordDocuments adds
   .zp-attach-dialog while it is open (the dialog element is shared, so it is removed on close).
   ========================================================================================== */
.zp-portal-theme .zp-attach-dialog .modal-dialog
{
	width: min(680px, calc(100% - 32px));
	margin: 40px auto;
}

.zp-portal-theme .zp-attach-dialog .modal-content
{
	border: 1px solid var(--zp-line);
	border-radius: 16px;
	background: var(--zp-surface);
	box-shadow: 0 24px 60px rgba(28, 27, 34, 0.22), 0 2px 8px rgba(28, 27, 34, 0.08);
	overflow: hidden;
}

.zp-portal-theme .zp-attach-dialog .modal-header
{
	padding: 20px 56px 18px 28px;
	border-bottom: 1px solid var(--zp-line-soft);
}

.zp-portal-theme .zp-attach-dialog .modal-body
{
	padding: 24px 28px 8px !important;
	min-height: 360px !important;
}

/* every row: label on top, control full width */
.zp-portal-theme .zp-attach-dialog .popup-row
{
	display: block;
	float: none;
	width: 100%;
	margin: 0 0 18px;
	padding: 0;
}

.zp-portal-theme .zp-attach-dialog .popup-row > label
{
	display: block;
	float: none;
	width: 100%;
	margin: 0 0 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--zp-ink);
}

.zp-portal-theme .zp-attach-dialog .popup-row > label.required:after
{
	content: " *";
	color: #DC2626;
}

.zp-portal-theme .zp-attach-dialog .popup-row input.form-control,
.zp-portal-theme .zp-attach-dialog .popup-row textarea.form-control,
.zp-portal-theme .zp-attach-dialog .popup-row select.select-box:not([multiple])
{
	display: block;
	width: 100%;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--zp-line);
	border-radius: 10px;
	background: #fff;
	font-size: 14px;
	box-shadow: none;
}

.zp-portal-theme .zp-attach-dialog .popup-row textarea.form-control
{
	height: auto;
	min-height: 96px;
	padding: 10px 14px;
	resize: vertical;
}

.zp-portal-theme .zp-attach-dialog .popup-row :is(input.form-control, textarea.form-control, select.select-box):focus
{
	outline: none;
	border-color: var(--zp-accent);
	box-shadow: 0 0 0 3px var(--zp-accent-tint);
}

/* ---- footer ---- */
.zp-portal-theme .zp-attach-dialog .modal-footer
{
	padding: 16px 28px 20px;
	border-top: 1px solid var(--zp-line-soft);
}

/* ---- Visibility checklist (built by zpBuildVisibilityChecklist when Chosen is off) ---- */
.zp-portal-theme .zp-attach-dialog .zp-visibility-checklist
{
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 260px;
	overflow-y: auto;
	padding: 6px;
	border: 1px solid var(--zp-line);
	border-radius: 12px;
	background: #fff;
}

.zp-portal-theme .zp-attach-dialog .zp-vis-option
{
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: 9px;
	background: transparent;
	color: var(--zp-ink);
	font-size: 14px;
	text-align: left;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.zp-portal-theme .zp-attach-dialog .zp-vis-option:hover:not(:disabled)
{
	background: var(--zp-accent-tint);
}

.zp-portal-theme .zp-attach-dialog .zp-vis-option:disabled
{
	color: var(--zp-ink-4);
	cursor: default;
}

.zp-portal-theme .zp-attach-dialog .zp-vis-option.selected
{
	background: var(--zp-accent-tint);
	border-color: var(--zp-accent);
	font-weight: 600;
}

.zp-portal-theme .zp-attach-dialog .zp-vis-check
{
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--zp-line);
	border-radius: 5px;
	background: #fff;
	position: relative;
}

.zp-portal-theme .zp-attach-dialog .zp-vis-option.selected .zp-vis-check
{
	background: var(--zp-accent);
	border-color: var(--zp-accent);
}

.zp-portal-theme .zp-attach-dialog .zp-vis-option.selected .zp-vis-check:after
{
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.zp-portal-theme .zp-attach-dialog .zp-vis-group-label
{
	padding: 10px 12px 4px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--zp-ink-4);
}
