/* The page is locked while search is open, so its form owns any scroll the
   content needs. The overlay's existing top gutter keeps close visible above
   it. Automatic block margins centre the form when it fits; a taller form
   shrinks to the available space and scrolls without moving close. */
#peptSearch {
	display: flex;
	flex-direction: column;
	align-items: center;
	top: var(--peptpro-search-viewport-offset, 0px);
	bottom: auto;
	height: var(--peptpro-search-viewport-height, 100vh);
	padding-top: max(72px, env(safe-area-inset-top));
	overflow: hidden;
}

@supports (height: 100dvh) {
	#peptSearch { height: var(--peptpro-search-viewport-height, 100dvh); }
}

#peptSearch .p3-search-form {
	flex: 0 1 auto;
	min-height: 0;
	max-height: 100%;
	margin-block: auto;
	overflow-y: auto;
	overscroll-behavior-y: contain;
}

#peptSearch .p3-search-form > .p3-search-row,
#peptSearch .p3-search-form > .p3-search-panel {
	flex-shrink: 0;
}
