/* Advanced Search panel. All rules are namespaced .pzs-* and are additive:
   nothing here targets .tag__block, .group__multi or .dropdown__box, which are
   still used by the new-product form and the trials manager. */

/* The modal must sit above the chat widget (#chat-widget-panel is 999999), so
   the scrim covers it rather than leaving a live control over the dialog.
   Do not lower this without raising the chat widget to match. */
:root {
	--pzs-z-modal: 1000000;
	--pzs-z-popup: 1000001;
}

.pzs-scrim {
	--pzs-ink: #1b2029;
	--pzs-muted: #5b6470;
	--pzs-faint: #8a94a3;
	--pzs-line: #e3e6ea;
	--pzs-blue: #4d6eb5;
	--pzs-blue-dk: #3d5090;
	--pzs-blue-tint: #eef1f8;
	--pzs-navy: #171d41;
	font-family: Inter, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	color: var(--pzs-ink);
	-webkit-font-smoothing: antialiased;
}

/* Restore colour inheritance; style.css's `body *` rule repaints descendants.
   Must stay first so equally-specific rules below win. */
.pzs-scrim * {
	color: inherit;
}

/* Modal mode: fixed overlay above everything, faded in by .pzs-scrim--open */
.pzs-scrim--modal {
	position: fixed;
	inset: 0;
	z-index: var(--pzs-z-modal);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px 20px;
	background: rgba(23, 29, 65, 0.58);
	opacity: 0;
	transition: opacity 0.18s ease;
}

/* Author rules beat the UA [hidden] rule, so restate it */
.pzs-scrim--modal[hidden] {
	display: none;
}

.pzs-scrim--modal.pzs-scrim--open {
	opacity: 1;
}

.pzs-scrim--modal .pzs-panel {
	max-width: 800px;
	width: 100%;
	height: 100%;
	box-shadow: 0 24px 60px rgba(10, 14, 30, 0.35);
	transform: translateY(10px) scale(0.995);
	opacity: 0;
	transition: transform 0.18s ease, opacity 0.18s ease;
}

.pzs-scrim--modal.pzs-scrim--open .pzs-panel {
	transform: none;
	opacity: 1;
}

/* Inline mode: same panel, in the page flow, always open */
.pzs-scrim--inline {
	display: block;
}

.pzs-scrim--inline .pzs-panel {
	height: auto;
	border: 1px solid var(--pzs-line);
	box-shadow: 0 2px 14px rgba(15, 20, 30, 0.08);
}

.pzs-scrim--inline .pzs-body {
	max-height: none;
	overflow: visible;
}

.pzs-panel {
	background: #fff;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
}

.pzs-head {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 24px;
	border-bottom: 1px solid var(--pzs-line);
	box-shadow: 0 1px 3px rgba(15, 20, 30, 0.05);
}

.pzs-ttl {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--pzs-ink);
}

.pzs-x {
	border: 0;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: var(--pzs-faint);
	cursor: pointer;
	padding: 0 4px;
}

.pzs-x:hover {
	color: var(--pzs-ink);
}

.pzs-body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.pzs-sec {
	border-bottom: 1px solid #f0f2f6;
	padding: 17px 24px 19px;
}

.pzs-sec:last-child {
	border-bottom: 0;
}

.pzs-sh {
	margin: 0 0 12px;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--pzs-blue);
}

.pzs-rows {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.pzs-label {
	display: block;
	font-size: 14px;
	color: #3b4351;
	font-weight: 500;
	margin-bottom: 6px;
}

.pzs-mm {
	font-size: 12px;
	color: #9aa3b2;
	font-weight: 400;
	margin-left: 7px;
}

.pzs-slot {
	display: flex;
	gap: 10px;
	align-items: center;
}

.pzs-ms {
	position: relative;
	flex: 1;
	min-width: 0;
}

.pzs-input {
	flex: 1;
	min-width: 0;
	width: 100%;
	height: 40px;
	border: 1px solid #cfd6e0;
	border-radius: 4px;
	background: #fff;
	padding: 0 10px;
	font-size: 14px;
	color: var(--pzs-ink);
	outline: none;
}

.pzs-input:hover {
	border-color: #a7b3c6;
}

.pzs-input:focus {
	border-color: var(--pzs-blue);
	box-shadow: 0 0 0 2px rgba(77, 110, 181, 0.14);
}

/* Pill / chip control */
.pzs-ctl {
	position: relative;
	width: 100%;
	min-height: 40px;
	border: 1px solid #cfd6e0;
	border-radius: 4px;
	background: #fff;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	align-content: center;
	gap: 5px;
	padding: 5px 30px 5px 10px;
	font-size: 14px;
	text-align: left;
	cursor: pointer;
}

.pzs-ctl:hover {
	border-color: #a7b3c6;
}

.pzs-ctl:focus-visible {
	outline: 2px solid var(--pzs-blue);
	outline-offset: 1px;
}

.pzs-ctl.pzs-ctl--open {
	border-color: var(--pzs-blue);
	box-shadow: 0 0 0 2px rgba(77, 110, 181, 0.14);
}

.pzs-ph {
	color: #a8b0bd;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pzs-cv {
	position: absolute;
	right: 11px;
	top: 50%;
	transform: translateY(-50%);
	color: #98a2b1;
	font-size: 10px;
}

.pzs-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--pzs-blue);
	color: #fff;
	border-radius: 3px;
	font-size: 12.5px;
	padding: 4px 8px;
	max-width: 100%;
	flex: none;
}

.pzs-chip span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pzs-chip b {
	opacity: 0.8;
	font-weight: 400;
	cursor: pointer;
}

.pzs-chip b:hover {
	opacity: 1;
}

.pzs-chip--none {
	background: #e5e7eb;
	color: #6b7280;
}

/* Option popup */
.pzs-pop {
	position: absolute;
	display: flex;
	flex-direction: column;
	top: calc(100% + 4px);
	left: 0;
	min-width: 240px;
	max-width: 330px;
	background: #fff;
	border: 1px solid #d5dae4;
	border-radius: 6px;
	box-shadow: 0 14px 34px rgba(15, 20, 30, 0.18);
	z-index: var(--pzs-z-popup);
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.12s ease, transform 0.12s ease;
}

.pzs-pop[hidden] {
	display: none;
}

.pzs-pop--on {
	opacity: 1;
	transform: none;
}

.pzs-pop--up {
	top: auto;
	bottom: calc(100% + 4px);
	transform: translateY(4px);
}

/* Flipped up, the popup is pinned by its bottom edge, so anything above the
   option list shifts as results come and go. Ordering the search box below the
   list keeps it a fixed distance from its field — the list grows upward,
   away from the cursor, and the box never moves. */
.pzs-pop--up .pzs-opts {
	order: 1;
}

.pzs-pop--up .pzs-find {
	order: 2;
	border-bottom: 0;
	border-top: 1px solid #eef0f4;
}

.pzs-pop--up .pzs-pf {
	order: 3;
}

.pzs-pop--up.pzs-pop--on {
	transform: none;
}

.pzs-find {
	padding: 8px;
	border-bottom: 1px solid #eef0f4;
}

.pzs-find-input {
	width: 100%;
	height: 32px;
	border: 1px solid #d5dae4;
	border-radius: 4px;
	padding: 0 8px;
	font-size: 13.5px;
	outline: none;
}

.pzs-find-input:focus {
	border-color: var(--pzs-blue);
}

.pzs-opts {
	max-height: 206px;
	overflow: auto;
	padding: 4px;
}

.pzs-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 9px;
	border-radius: 4px;
	font-size: 13.5px;
	width: 100%;
	text-align: left;
	border: 0;
	background: none;
	cursor: pointer;
	color: var(--pzs-ink);
}

.pzs-opt:hover,
.pzs-opt.pzs-opt--cur {
	background: var(--pzs-blue-tint);
}

.pzs-bx {
	width: 14px;
	height: 14px;
	border: 1.5px solid #b6c0d0;
	border-radius: 3px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	color: #fff;
}

.pzs-opt[aria-selected="true"] .pzs-bx {
	background: var(--pzs-blue);
	border-color: var(--pzs-blue);
}

.pzs-opt-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pzs-opt--all {
	font-weight: 600;
	border-bottom: 1px solid #eef0f4;
	border-radius: 0;
	margin-bottom: 4px;
}

.pzs-pf {
	display: flex;
	padding: 8px 11px;
	border-top: 1px solid #eef0f4;
	font-size: 12.5px;
}

.pzs-clear-one {
	border: 0;
	background: none;
	color: var(--pzs-blue);
	cursor: pointer;
	padding: 0;
	font-size: 12.5px;
}

.pzs-clear-one:hover {
	text-decoration: underline;
}

.pzs-none {
	padding: 15px 13px;
	font-size: 13.5px;
	color: var(--pzs-faint);
	text-align: center;
}

/* Segmented toggles */
.pzs-seg {
	display: inline-flex;
	border: 1px solid #cfd6e0;
	border-radius: 4px;
	overflow: hidden;
	flex: none;
}

.pzs-seg button {
	padding: 8px 14px;
	font-size: 13px;
	color: #68727f;
	background: #fff;
	border: 0;
	cursor: pointer;
	white-space: nowrap;
}

.pzs-seg button + button {
	border-left: 1px solid #cfd6e0;
}

.pzs-seg button:hover {
	background: var(--pzs-blue-tint);
}

.pzs-seg button[aria-pressed="true"] {
	background: var(--pzs-blue);
	color: #fff;
}

.pzs-mlabel {
	font-size: 12.5px;
	color: var(--pzs-muted);
	flex: none;
}

/* Footer */
.pzs-foot {
	flex: none;
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 14px 24px;
	border-top: 1px solid var(--pzs-line);
	background: #fafbfd;
	box-shadow: 0 -1px 3px rgba(15, 20, 30, 0.05);
}

.pzs-btn {
	height: 44px;
	padding: 0 22px;
	border: 0;
	border-radius: 4px;
	background: #eceef1;
	color: #3b4351;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}

.pzs-btn:hover {
	background: #e0e4ea;
}

.pzs-btn--go {
	padding: 0 24px;
	background: var(--pzs-blue);
	color: #fff;
}

.pzs-btn--go:hover {
	background: var(--pzs-blue-dk);
}

@media (max-width: 640px) {
	.pzs-scrim--modal {
		padding: 0;
	}

	.pzs-panel {
		border-radius: 0;
	}

	.pzs-slot {
		flex-wrap: wrap;
	}
}
