/* GPDM Search: tiny shell loaded site-wide for the lazy overlay launcher. */
:root {
	--gpdm-search-primary: #35144f;
	--gpdm-search-accent: #02b7f3;
	--gpdm-search-bg: #f6f5f8;
	--gpdm-search-card: #ffffff;
	--gpdm-search-text: #171718;
	--gpdm-search-muted: #716d78;
	--gpdm-search-border: #e6e2e9;
}

body.gpdm-search-locked {
	overflow: hidden !important;
}

.gpdm-search-overlay[hidden] {
	display: none !important;
}

.gpdm-search-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(16, 11, 22, .74);
	backdrop-filter: blur(8px) saturate(130%);
	-webkit-backdrop-filter: blur(8px) saturate(130%);
}

.gpdm-search-dialog {
	position: relative;
	width: min(960px, 100%);
	height: min(90vh, 880px);
	overflow: hidden;
	border: 1px solid var(--gpdm-search-border);
	border-radius: 18px;
	background: var(--gpdm-search-card);
	box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.gpdm-search-dialog-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 18px 22px 12px;
	border-bottom: 1px solid var(--gpdm-search-border);
}

.gpdm-search-dialog-bar span {
	display: block;
	margin-bottom: 2px;
	color: var(--gpdm-search-accent);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.gpdm-search-dialog-bar h2 {
	margin: 0;
	color: var(--gpdm-search-primary);
	font-size: 22px;
	line-height: 1.2;
}

.gpdm-search-close {
	width: 42px;
	height: 42px;
	border: 1px solid var(--gpdm-search-border);
	border-radius: 12px;
	background: #fff;
	color: var(--gpdm-search-text);
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
}

.gpdm-search-app:not(.is-ready) {
	opacity: .72;
}

body.gpdm-search-page-active .sidebar,
body.gpdm-search-page-active .widget-area,
body.gpdm-search-page-active [class*="sidebar"] {
	display: none !important;
}

@media (max-width: 680px) {
	.gpdm-search-overlay {
		place-items: stretch;
		padding: 0;
	}

	.gpdm-search-dialog {
		width: 100%;
		height: 100dvh;
		max-height: none;
		border: 0;
		border-radius: 0;
	}

	.gpdm-search-dialog-bar {
		padding: max(14px, env(safe-area-inset-top)) 16px 12px;
	}
}

/* v1.5.1 safety: suppress the retired plugin UI if it is still active/cached. */
.gpdm-overlay {
	display: none !important;
}

/* v1.5.2 — the GPDM overlay owns every search entry point. */
html.gpdm-modern-search-ready .gpdm-overlay,
html.gpdm-modern-search-ready .ast-search-menu-icon.slide-search .search-form,
html.gpdm-modern-search-ready .ast-search-menu-icon.full-screen .ast-search-wrapper,
html.gpdm-modern-search-ready .ast-search-menu-icon .ast-search-wrapper,
html.gpdm-modern-search-ready .ast-search-box.header-cover,
html.gpdm-modern-search-ready .ast-header-search .ast-search-wrapper {
	display: none !important;
}

.gpdm-search-overlay:not([hidden]) {
	animation: gpdm-search-overlay-in .18s ease-out both;
}

.gpdm-search-overlay:not([hidden]) .gpdm-search-dialog {
	animation: gpdm-search-dialog-in .22s ease-out both;
}

@keyframes gpdm-search-overlay-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes gpdm-search-dialog-in {
	from { opacity: 0; transform: translateY(10px) scale(.985); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.gpdm-search-overlay:not([hidden]),
	.gpdm-search-overlay:not([hidden]) .gpdm-search-dialog {
		animation: none;
	}
}
