/*
 * PTGP GeoDirectory Support
 *
 * GD pages are functional interfaces, so they use a wider, lighter layout
 * system than brand/content pages. The goal is maximum usable viewport with
 * a safe gutter, while retaining PTGP colors, typography, panels and buttons.
 *
 * GD architecture:
 * - .pt-gd-section controls vertical rhythm and optional background bands.
 * - .pt-gd-wide controls wide functional width for search, listings, map and GD output.
 * - .pt-gd-content controls readable width for hero text, local context, guidance and CTA.
 * - .pt-gd-panel controls intentional GD widget surfaces such as maps and location sections.
 *
 * Cleanup map:
 * - Location/search/archive/single/pricing rules are grouped below by feature.
 * - Native GD, Bootstrap, WordPress and GeneratePress selectors are intentionally
 *   present even when they do not appear in bundled pattern files.
 * - Search Split, Float and Tabs rules are retained because all three search
 *   patterns are intentionally shipped; Float is the active/default pattern.
 */

:root {
	--pt-gd-wide: 1360px;
	--pt-gd-content: 980px;
	--pt-gd-gutter: clamp(0.85rem, 0.45rem + 1.5vw, 1.5rem);
	--pt-gd-gap: clamp(1rem, 0.75rem + 1.2vw, 1.75rem);
}

.pt-gd-page-shell,
.pt-gd-page,
body.pt-gd-context {
	box-sizing: border-box;
	width: 100%;
	overflow-x: clip;
}

.pt-gd-section,
.wp-block-group.pt-gd-section {
	box-sizing: border-box;
	width: 100%;
	padding-block: clamp(2rem, 1.35rem + 2.8vw, 4rem);
}

.pt-gd-section-compact,
.wp-block-group.pt-gd-section-compact {
	padding-block: clamp(1.35rem, 0.95rem + 1.7vw, 2.5rem);
}

.pt-gd-section-soft,
.wp-block-group.pt-gd-section-soft {
	background: var(--pt-color-bg-soft);
}

.pt-gd-wide,
.wp-block-group.pt-gd-wide,
.pt-gd-content,
.wp-block-group.pt-gd-content {
	box-sizing: border-box;
	width: 100%;
	margin-inline: auto;
	padding-inline: var(--pt-gd-gutter);
}

.pt-gd-wide,
.wp-block-group.pt-gd-wide {
	max-width: calc(var(--pt-gd-wide) + (var(--pt-gd-gutter) * 2));
}

.pt-gd-content,
.wp-block-group.pt-gd-content {
	max-width: calc(var(--pt-gd-content) + (var(--pt-gd-gutter) * 2));
}

.pt-gd-panel,
.wp-block-group.pt-gd-panel {
	box-sizing: border-box;
	width: 100%;
	border: 1px solid var(--pt-color-border);
	border-radius: var(--pt-radius-lg);
	background: var(--pt-color-bg);
	box-shadow: var(--pt-shadow-card);
	padding: clamp(1rem, 0.8rem + 0.85vw, 1.65rem);
}

.pt-gd-panel > :first-child {
	margin-top: 0;
}

.pt-gd-panel > :last-child {
	margin-bottom: 0;
}

.pt-gd-section-head,
.pt-gd-section-head-inline {
	max-width: 760px;
	margin-bottom: var(--pt-space-md);
}

.pt-gd-section-head > :first-child,
.pt-gd-section-head-inline > :first-child {
	margin-top: 0;
}

.pt-gd-section-head > :last-child,
.pt-gd-section-head-inline > :last-child {
	margin-bottom: 0;
}

.pt-gd-section-head-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	max-width: none;
}

.pt-gd-section-head-inline .pt-muted {
	max-width: 520px;
}

/* GD location hero */
.pt-gd-hero,
.wp-block-group.pt-gd-hero {
	background:
		radial-gradient(circle at top right, rgba(201, 151, 47, 0.16), transparent 34rem),
		linear-gradient(180deg, var(--pt-color-bg) 0%, var(--pt-color-bg-soft) 100%);
	padding-block: clamp(3rem, 2.1rem + 4vw, 6rem);
}

.pt-gd-location-summary {
	max-width: 820px;
	color: var(--pt-color-muted);
	font-size: clamp(1.05rem, 1rem + 0.24vw, 1.2rem);
	line-height: 1.72;
}

.pt-gd-location-summary :where(p, div) {
	margin-bottom: 0;
}

.pt-gd-feature-strip,
.wp-block-group.pt-gd-feature-strip {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: 0.85rem;
	margin-top: var(--pt-space-md);
}

/* GD custom layout containers own gap; reset WordPress flow margins on direct children. */
.pt-gd-feature-strip > *,
.pt-gd-decision-grid > *,
.pt-theme .pt-gd-feature-strip > *,
.pt-theme .pt-gd-decision-grid > * {
	margin-block-start: 0;
	margin-block-end: 0;
	align-self: stretch;
	min-width: 0;
}

.pt-gd-feature,
.wp-block-group.pt-gd-feature {
	display: flex;
	align-items: center;
	height: 100%;
	min-height: 74px;
	border: 1px solid rgba(15, 81, 50, 0.12);
	border-radius: var(--pt-radius);
	background: rgba(255, 255, 255, 0.78);
	padding: 0.8rem 0.95rem;
	box-shadow: 0 8px 22px rgba(23, 33, 29, 0.055);
}

.pt-gd-feature-label {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
	margin: 0;
	color: var(--pt-color-text);
	font-size: 0.98rem;
	font-weight: 800;
	line-height: 1.25;
	white-space: nowrap;
}

.pt-gd-feature-label i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 2rem;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	background: rgba(15, 81, 50, 0.09);
	color: var(--pt-color-primary);
	font-size: 0.95rem;
}

/* Search, listings and map presentation */
.pt-gd-search-panel {
	border-color: rgba(15, 81, 50, 0.18);
	box-shadow: var(--pt-shadow-soft);
}

body.pt-gd-context .geodir-search,
body.pt-gd-context .gd-search-bar,
.pt-gd-panel .geodir-search,
.pt-gd-panel .gd-search-bar {
	border-radius: var(--pt-radius);
	border: 1px solid var(--pt-color-border);
	background: var(--pt-color-bg);
	box-shadow: none;
	padding: clamp(0.8rem, 0.65rem + 0.65vw, 1.25rem);
}

body.pt-gd-context .geodir-search label,
body.pt-gd-context .gd-search-bar label {
	color: var(--pt-color-text);
	font-weight: 700;
}

body.pt-gd-context .geodir-search input,
body.pt-gd-context .geodir-search select,
body.pt-gd-context .gd-search-bar input,
body.pt-gd-context .gd-search-bar select {
	border-radius: var(--pt-radius-sm);
	border-color: var(--pt-color-border);
}

body.pt-gd-context .geodir-search button,
body.pt-gd-context .gd-search-bar button,
body.pt-gd-context .geodir_submit_search {
	border-radius: 999px;
	background: var(--pt-color-primary);
	color: var(--pt-color-on-primary);
	font-weight: 700;
}

.pt-gd-categories-panel,
.pt-gd-listings-zone,
.pt-gd-locations-wrapper {
	padding: clamp(0.85rem, 0.72rem + 0.65vw, 1.3rem);
}

.pt-gd-listings-zone {
	background: var(--pt-color-bg-soft);
}

/* GeoDirectory listing wrappers/rows keep their native Bootstrap spacing.
 * Do not add flex/grid gap here: GD renders listing grids as Bootstrap rows,
 * and horizontal gap breaks row-cols calculations.
 */

/* GeoDirectory listing rows and columns are layout structures.
 * Visual card treatment belongs to the actual card wrapper only.
 */
body.pt-gd-context .geodir-post > .card {
	border-radius: var(--pt-radius);
	border: 1px solid var(--pt-color-border);
	background: var(--pt-color-bg);
	box-shadow: 0 8px 22px rgba(23, 33, 29, 0.055);
	overflow: hidden;
}

body.pt-gd-context .geodir-post .geodir-post-content {
	padding: 1rem;
}

body.pt-gd-context .geodir-post img {
	max-width: 100%;
	height: auto;
}

body.pt-gd-context .geodir-post > .card img.card-img-top,
body.pt-gd-context .geodir-post > .card .geodir-post-image img,
body.pt-gd-context .geodir-post > .card .geodir-images img {
	object-fit: cover;
}

body.pt-gd-context .geodir-entry-title,
body.pt-gd-context .geodir-post-title {
	margin-top: 0;
	font-size: 1.08rem;
	line-height: 1.25;
}

body.pt-gd-context .geodir-post .geodir-post-title a,
body.pt-gd-context .geodir-entry-title a {
	color: var(--pt-color-text);
	text-decoration: none;
}

body.pt-gd-context .geodir-post .geodir-post-title a:hover,
body.pt-gd-context .geodir-entry-title a:hover {
	color: var(--pt-color-primary);
}

body.pt-gd-context .geodir_post_meta,
body.pt-gd-context .geodir-output-location {
	color: var(--pt-color-muted);
	font-size: 0.92rem;
	line-height: 1.55;
}

body.pt-gd-context .geodir-output-location i,
body.pt-gd-context .geodir_post_meta i {
	color: var(--pt-color-primary);
}

body.pt-gd-context .geodir-badge,
body.pt-gd-context .badge,
body.pt-gd-context .gd-badge {
	border-radius: 999px;
	font-weight: 700;
}

.pt-gd-map-frame {
	padding: clamp(0.55rem, 0.45rem + 0.5vw, 0.9rem);
}

.pt-gd-map-frame :where(.geodir-map-wrap, .geodir_map_container, iframe) {
	border-radius: var(--pt-radius);
	overflow: hidden;
}

/* Local context and guidance */
.pt-gd-location-description {
	font-size: 1rem;
	line-height: 1.76;
}

.pt-gd-location-description :where(p, ul, ol) {
	color: var(--pt-color-muted);
}

.pt-gd-decision-grid,
.wp-block-group.pt-gd-decision-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--pt-gd-gap);
}

.pt-gd-decision-card,
.wp-block-group.pt-gd-decision-card {
	border: 1px solid var(--pt-color-border);
	border-radius: var(--pt-radius);
	background: var(--pt-color-bg);
	padding: clamp(1rem, 0.8rem + 0.8vw, 1.45rem);
	box-shadow: 0 8px 22px rgba(23, 33, 29, 0.055);
}

.pt-gd-decision-card > :first-child {
	margin-top: 0;
}

.pt-gd-decision-card > :last-child {
	margin-bottom: 0;
}

.pt-gd-locations-wrapper :where(.geodir-locations, .geodir-location-grid, .gd-location-grid) {
	margin-top: 0;
}

/* Light support for GD single/detail sections without archive-card side effects. */
body.pt-gd-context.geodir-page-single .geodir-tabs,
body.pt-gd-context.geodir-page-single .geodir-post-meta-container,
body.pt-gd-context.geodir-page-single .geodir-field-group {
	border-radius: var(--pt-radius);
	border: 1px solid var(--pt-color-border);
	background: var(--pt-color-bg);
	padding: clamp(1rem, 0.85rem + 0.75vw, 1.5rem);
	box-shadow: var(--pt-shadow-card);
}

body.pt-gd-context .geodir-tabs .nav-link,
body.pt-gd-context .geodir-tabs a {
	font-weight: 700;
}

body.pt-gd-context.geodir-page-single .geodir-field-group + .geodir-field-group,
body.pt-gd-context.geodir-page-single .geodir-post-meta-container + .geodir-post-meta-container {
	margin-top: var(--pt-space-md);
}

@media (max-width: 900px) {
	.pt-gd-decision-grid,
	.wp-block-group.pt-gd-decision-grid {
		grid-template-columns: 1fr;
	}

	.pt-gd-section-head-inline {
		display: block;
	}
}

@media (max-width: 600px) {
	:root {
		--pt-gd-gutter: 0.9rem;
	}

	.pt-gd-section,
	.wp-block-group.pt-gd-section {
		padding-block: 1.75rem;
	}

	.pt-gd-hero,
	.wp-block-group.pt-gd-hero {
		padding-block: 2.5rem;
	}

	.pt-gd-panel,
.wp-block-group.pt-gd-panel {
		border-radius: var(--pt-radius);
		padding: 1rem;
	}

	.pt-gd-feature-strip,
	.wp-block-group.pt-gd-feature-strip {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		align-items: stretch;
		gap: 0.45rem;
	}

	.pt-gd-feature,
	.wp-block-group.pt-gd-feature {
		justify-content: center;
		min-height: 64px;
		padding: 0.65rem 0.45rem;
	}

	.pt-gd-feature-label {
		flex-direction: column;
		justify-content: center;
		gap: 0.35rem;
		text-align: center;
		font-size: 0.76rem;
		line-height: 1.15;
		white-space: normal;
	}

	.pt-gd-feature-label i {
		flex-basis: 1.85rem;
		width: 1.85rem;
		height: 1.85rem;
		font-size: 0.82rem;
	}

}

/* ==========================================================================
 * GD Search Page
 *
 * Layout architecture:
 * - .pt-gd-search-page is the page-level wrapper. Three variants:
 *   .pt-gd-search-page-split  - listings on left, sticky map on right
 *   .pt-gd-search-page-float  - listings first, FAB opens full-screen map overlay
 *   .pt-gd-search-page-tabs   - Listings / Map tabs with native GD lazy map
 * - .pt-gd-search-bar-section is the sticky Search Command Area.
 *   It hosts the GD title, GD search block and GD loop/search utility actions
 *   as one connected workflow.
 * - The title uses GD output when a search has term/near context, with a
 *   PT fallback of "Property Search" on direct empty search-page visits.
 * - .pt-gd-search-layout owns the split grid; collapses to single column on tablets.
 * - .pt-gd-map-sticky pins the map within its column on desktop.
 * - .pt-gd-search-command-row contains gd_loop_actions inside the search command area; GeoDirectory may suppress sort on search pages.
 *
 * WIDTH BREAKOUT:
 * On the search page, we override GeneratePress' .grid-container max-width
 * so .pt-gd-wide can actually reach 1480px. Without this, GP clamps content
 * to its Customizer container width (~1200px default), which restricts the
 * effective width regardless of the value of --pt-gd-wide.
 * ========================================================================== */

body.geodir-page-search .grid-container,
body.geodir-page-search .inside-article,
body.geodir-page-search .site-content,
body.geodir-page-search .content-area,
body.geodir-page-search .inside-content,
.pt-gd-search-page,
.pt-gd-search-page .grid-container,
.pt-gd-search-page .inside-article,
.pt-gd-search-page .inside-content {
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}

body.geodir-page-search .entry-content,
.pt-gd-search-page .entry-content {
	margin-top: 0;
}

/* Bump wide width specifically for the search page so it can breathe */
.pt-gd-search-page {
	--pt-gd-wide: 1480px;
}

/* Search Command Area header */
.pt-gd-search-command-header,
.wp-block-group.pt-gd-search-command-header {
	margin-bottom: clamp(0.65rem, 0.45rem + 0.7vw, 1rem);
}

.pt-gd-search-page .pt-gd-search-title,
.pt-gd-search-page .geodir-page-title-container,
.pt-gd-search-page .geodir-page-title-container h1,
.pt-gd-search-page h1.pt-gd-search-title {
	margin: 0;
	color: var(--pt-color-text);
	font-weight: 720;
	letter-spacing: -0.02em;
	line-height: 1.18;
	font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.9rem);
}

/* Sticky Search Command Area */
.pt-gd-search-page .pt-gd-search-bar-section {
	position: sticky;
	top: 0;
	z-index: 25;
	background: var(--pt-color-bg-soft);
	padding-block: clamp(0.85rem, 0.6rem + 1vw, 1.35rem);
	border-bottom: 1px solid var(--pt-color-border);
}

/* Frosted-glass effect only on viewports with the GPU headroom for it
 * (desktop/tablet). Mobile keeps the solid background above for smooth
 * scrolling and battery. The semi-transparent bg + blur are applied
 * together so content scrolling behind reads as layered. */
@media (min-width: 768px) {
	@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
		.pt-gd-search-page .pt-gd-search-bar-section {
			background: rgba(247, 245, 239, 0.82);
			-webkit-backdrop-filter: blur(12px);
			backdrop-filter: blur(12px);
		}
	}
}

.pt-gd-search-command-row,
.wp-block-group.pt-gd-search-command-row {
	margin-top: clamp(0.65rem, 0.45rem + 0.7vw, 1rem);
}

/* Results section gets its own padding now that there's no .pt-gd-section wrapper */
.pt-gd-search-page .pt-gd-results-section {
	padding-block: clamp(1rem, 0.7rem + 1.2vw, 1.75rem);
}

/* Search Split option (pattern: pt/search): listings + sticky map column.
 * Retained as an optional search layout; do not delete while pt/search ships. */
.pt-gd-search-layout,
.wp-block-group.pt-gd-search-layout {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: var(--pt-gd-gap);
}

.pt-gd-search-layout > *,
.pt-theme .pt-gd-search-layout > * {
	margin-block-start: 0;
	margin-block-end: 0;
	min-width: 0;
}

.pt-gd-results-column {
	display: flex;
	flex-direction: column;
	gap: var(--pt-gd-gap);
}

.pt-gd-map-column {
	position: relative;
}

.pt-gd-map-sticky {
	position: sticky;
	top: calc(var(--pt-search-bar-offset, 5rem));
}

.pt-gd-map-sticky .pt-gd-map-frame {
	padding: clamp(0.45rem, 0.35rem + 0.4vw, 0.75rem);
}

.pt-gd-map-sticky .pt-gd-map-frame :where(.geodir-map-wrap, .geodir_map_container, iframe) {
	border-radius: var(--pt-radius);
	overflow: hidden;
}

/* Results list and pagination */
.pt-gd-results-list,
.pt-gd-results-paging {
	box-sizing: border-box;
}

.pt-gd-results-paging,
.wp-block-group.pt-gd-results-paging {
	margin-top: 0.5rem;
}

.pt-gd-search-page .pt-gd-results-paging .pagination,
.pt-gd-search-page .pt-gd-results-paging .page-numbers {
	justify-content: center;
}

/* Help CTA at end of results */
.pt-gd-help-section .pt-cta-band {
	background: linear-gradient(135deg, var(--pt-color-primary) 0%, var(--pt-color-primary-dark) 100%);
	color: var(--pt-color-on-primary);
	padding: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
	border-radius: var(--pt-radius-lg);
}

.pt-gd-help-section .pt-cta-band .pt-eyebrow,
.pt-gd-help-section .pt-cta-band .pt-subheading,
.pt-gd-help-section .pt-cta-band p {
	color: var(--pt-color-on-primary);
}

.pt-gd-help-section .pt-cta-band .pt-eyebrow {
	color: rgba(255, 255, 255, 0.78);
}

.pt-gd-help-section .pt-cta-band p {
	color: rgba(255, 255, 255, 0.92);
	max-width: 620px;
}

.pt-gd-help-section .pt-cta-band .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: var(--pt-color-accent);
	border-color: var(--pt-color-accent);
	color: var(--pt-color-text);
}

.pt-gd-help-section .pt-cta-band .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: var(--pt-color-accent);
	border-color: var(--pt-color-accent);
}

.pt-gd-help-section .pt-cta-band .wp-block-button.is-style-outline .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.55);
	color: var(--pt-color-on-primary);
}

.pt-gd-help-section .pt-cta-band .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: var(--pt-color-on-primary);
}

/* Tablet collapse: stack listings (first) above map */
@media (max-width: 960px) {
	.pt-gd-search-layout,
	.wp-block-group.pt-gd-search-layout {
		grid-template-columns: 1fr;
	}

	.pt-gd-map-sticky {
		position: static;
	}
}

/* Mobile: relax sticky search command area */
@media (max-width: 600px) {
	.pt-gd-search-page .pt-gd-search-bar-section {
		position: static;
		border-bottom: 0;
		padding-block: 0.85rem;
	}

}

/* ==========================================================================
 * Float Search Variant
 *
 * A floating Map button (FAB) opens a full-viewport overlay. The map widget
 * remains in the normal GD/WordPress lifecycle, while GD native Click to Load
 * controls when the map/API payload is requested. JS toggles
 * .pt-gd-overlay-active on <body> and switches `inert` on the overlay so it
 * leaves the accessibility tree / tab order when closed.
 *
 * Map fill: the overlay body is position:relative; the widget inside is
 * position:absolute inset:0 so percentage heights inside GD's nested map
 * markup all resolve against an element with explicit pixel dimensions —
 * sidestepping the well-known flex + percentage-height cascade quirk.
 * ========================================================================== */

/* FAB button - primary page utility; GP back-to-top is moved above it on pages that use this control. */
.pt-gd-map-fab {
	position: fixed;
	right: clamp(1rem, 1.4vw + 0.5rem, 1.75rem);
	bottom: clamp(1rem, 1.4vw + 0.5rem, 1.75rem);
	z-index: 90;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-height: 52px;
	padding: 0.85rem 1.4rem;
	border: 0;
	border-radius: 999px;
	background: var(--pt-color-primary);
	color: var(--pt-color-on-primary);
	font-family: inherit;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 12px 28px rgba(15, 81, 50, 0.35);
	transition: transform 0.18s ease, box-shadow 0.18s ease, background var(--pt-transition);
	-webkit-tap-highlight-color: transparent;
}

.pt-gd-map-fab:hover,
.pt-gd-map-fab:focus-visible {
	background: var(--pt-color-primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 16px 36px rgba(15, 81, 50, 0.42);
	outline: none;
}

.pt-gd-map-fab:focus-visible {
	box-shadow: var(--pt-focus-ring), 0 16px 36px rgba(15, 81, 50, 0.42);
}

.pt-gd-map-fab:active {
	transform: translateY(0);
}

.pt-gd-map-fab i {
	font-size: 1.05rem;
}


/* Move GeneratePress back-to-top above the page-specific floating utility buttons. */
body:has(.pt-gd-map-fab) .generate-back-to-top,
body:has(.pt-gd-map-fab) a.generate-back-to-top,
body:has(.pt-single-floating-contact) .generate-back-to-top,
body:has(.pt-single-floating-contact) a.generate-back-to-top {
	bottom: clamp(5rem, 4.5rem + 1.5vw, 6rem);
}

/* Hide FAB while overlay is open */
body.pt-gd-overlay-active .pt-gd-map-fab {
	display: none;
}

/* Overlay container: always rendered at full size; offscreen via transform.
 * No visibility:hidden — that can cause some map engines to skip tile loads
 * and prevents the map iframe from sizing correctly at boot. */
.pt-gd-map-overlay,
.wp-block-group.pt-gd-map-overlay {
	position: fixed;
	inset: 0;
	z-index: 95;
	display: flex;
	flex-direction: column;
	background: var(--pt-color-bg);
	transform: translateY(100%);
	transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
	pointer-events: none;
	margin-top: 0 !important;
}

body.pt-gd-overlay-active .pt-gd-map-overlay {
	transform: translateY(0);
	pointer-events: auto;
}

/* Body scroll lock while overlay is open */
body.pt-gd-overlay-active {
	overflow: hidden;
}

/* Overlay header */
.pt-gd-map-overlay-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: clamp(0.7rem, 0.5rem + 0.6vw, 1rem) clamp(1rem, 0.7rem + 1vw, 1.5rem);
	background: var(--pt-color-bg);
	border-bottom: 1px solid var(--pt-color-border);
	z-index: 2;
	flex: 0 0 auto;
}

.pt-gd-map-overlay-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 720;
	letter-spacing: -0.01em;
	color: var(--pt-color-text);
}

.pt-gd-map-overlay-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: var(--pt-color-bg-soft);
	color: var(--pt-color-text);
	border: 1px solid var(--pt-color-border);
	border-radius: 999px;
	font-size: 1rem;
	cursor: pointer;
	transition: background var(--pt-transition), color var(--pt-transition), border-color var(--pt-transition);
}

.pt-gd-map-overlay-close:hover {
	background: var(--pt-color-text);
	color: var(--pt-color-on-primary);
	border-color: var(--pt-color-text);
}

.pt-gd-map-overlay-close:focus-visible {
	outline: none;
	box-shadow: var(--pt-focus-ring);
}

/* Overlay body: provides a sized, relative-positioned canvas for the map */
.pt-gd-map-overlay-body,
.wp-block-group.pt-gd-map-overlay-body {
	flex: 1 1 auto;
	min-height: 0;
	position: relative;
	overflow: hidden;
}

/* Force the GD map widget and all its nested wrappers to fill the body.
 * Using absolute positioning on the widget means its children's height:100%
 * resolves against a parent with explicit dimensions (regardless of flex
 * cascade quirks). */
.pt-gd-map-overlay-body .wp-block-geodirectory-geodir-widget-map {
	position: absolute;
	inset: 0;
	margin: 0 !important;
}

.pt-gd-map-overlay-body :where(
	.geodir-map-wrap,
	.geodir_map_container,
	.geodir_map,
	.main_map_wrapper,
	.stick_trigger_container
) {
	height: 100% !important;
	width: 100% !important;
	max-height: none !important;
	max-width: none !important;
}

.pt-gd-map-overlay-body [id^="geodir_map_canvas"],
.pt-gd-map-overlay-body [id^="map_canvas"] {
	height: 100% !important;
	width: 100% !important;
}

@media (max-width: 600px) {
	.pt-gd-map-fab {
		padding: 0.8rem 1.15rem;
		font-size: 0.9rem;
	}

	.pt-gd-map-fab i {
		font-size: 1rem;
	}

	.pt-gd-map-overlay-title {
		font-size: 0.98rem;
	}
}

/* ==========================================================================
 * Tabbed Search Variant
 *
 * Listings are visible by default. The Map tab contains the normal GD archive
 * map widget and relies on GD's native Click to Load lazy map mode. The tab JS
 * only reveals the panel and refits the map. The optional auto-load switch in
 * pt-search.js is kept false by default, so Google Maps/API stays unloaded
 * until the visitor explicitly clicks the map placeholder.
 * ========================================================================== */
.pt-gd-search-tabs-nav {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem;
	margin-bottom: 1rem;
	border: 1px solid var(--pt-color-border);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.86);
	box-shadow: var(--pt-shadow-card);
}

.pt-gd-search-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0.65rem 1.1rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--pt-color-muted);
	font-family: inherit;
	font-size: 0.94rem;
	font-weight: 720;
	line-height: 1;
	cursor: pointer;
	transition: background var(--pt-transition), color var(--pt-transition), box-shadow var(--pt-transition);
}

.pt-gd-search-tab:hover,
.pt-gd-search-tab:focus-visible {
	color: var(--pt-color-text);
	outline: none;
}

.pt-gd-search-tab:focus-visible {
	box-shadow: var(--pt-focus-ring);
}

.pt-gd-search-tab.is-active {
	background: var(--pt-color-primary);
	color: var(--pt-color-on-primary);
	box-shadow: 0 8px 20px rgba(15, 81, 50, 0.22);
}

.pt-gd-search-tab-panel[hidden] {
	display: none !important;
}

.pt-gd-search-tab-panel-map .pt-gd-map-frame-wide {
	padding: clamp(0.45rem, 0.35rem + 0.4vw, 0.75rem);
}

.pt-gd-search-tab-panel-map :where(.geodir-map-wrap, .geodir_map_container, iframe) {
	border-radius: var(--pt-radius);
	overflow: hidden;
}

.pt-gd-search-tab-panel-map .geodir-lazyload-div,
.pt-gd-map-overlay-body .geodir-lazyload-div {
	height: 100% !important;
	min-height: 100% !important;
}

@media (max-width: 600px) {
	.pt-gd-search-tabs-nav {
		display: flex;
		width: 100%;
	}

	.pt-gd-search-tab {
		flex: 1 1 0;
		padding-inline: 0.8rem;
	}
}


/* ==========================================================================
 * GD Archive Item Card Pattern
 * ========================================================================== */
.ptgp-gd-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.ptgp-gd-card,
.ptgp-gd-card > .wp-block-group,
.ptgp-gd-card .wp-block-group,
.ptgp-gd-card .wp-block-shortcode,
.ptgp-gd-card p {
	margin-block-start: 0;
	margin-block-end: 0;
}

.ptgp-gd-card-media {
	position: relative;
	overflow: hidden;
	margin: 0;
	background: var(--pt-color-surface-soft);
}

.ptgp-gd-card-actions {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 4;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}

.ptgp-gd-card-actions .wp-block-shortcode {
	margin: 0;
	line-height: 1;
}

.ptgp-gd-card-distance {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	z-index: 3;
	margin: 0;
}

.ptgp-gd-card-body {
	flex: 1 1 auto;
	padding: 1rem;
	margin: 0;
}

.ptgp-gd-card-body .geodir-post-title,
.ptgp-gd-card-body h2 {
	margin: 0 0 0.6rem;
	font-size: 1.05rem;
	line-height: 1.32;
}

.ptgp-gd-card-price {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	margin: 0 0 0.65rem;
	padding: 0;
}

.ptgp-gd-card-price-main {
	margin: 0;
	padding: 0;
	font-weight: 780;
	color: var(--pt-color-text);
	line-height: 1.2;
}

.ptgp-gd-card-price-unit {
	margin: 0;
	padding: 0;
	font-size: 0.86rem;
	color: var(--pt-color-muted);
	line-height: 1.25;
}

.ptgp-gd-card-meta {
	margin: 0;
	padding: 0;
	font-size: 0.92rem;
	color: var(--pt-color-text);
}

.ptgp-gd-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0;
	padding: 0.7rem 1rem;
	border-top: 1px solid var(--pt-color-border);
	background: var(--pt-color-surface-soft);
}

.ptgp-gd-card-reference {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
	font-size: 0.82rem;
	line-height: 1.2;
	color: var(--pt-color-muted);
}

.ptgp-gd-card-reference .fw-semibold,
.ptgp-gd-card-id strong {
	font-weight: 700;
}

.ptgp-gd-card-category {
	font-weight: 400;
	color: var(--pt-color-muted);
}

.ptgp-gd-card-contact {
	margin: 0 0 0 auto;
	padding: 0;
	flex: 0 0 auto;
}

.ptgp-gd-card-reference p {
	margin: 0;
}


/* GD Archive Item Card: List Save action */
.ptgp-gd-card-actions .ptgp-gd-card-list-save {
	width: 37px;
	height: 37px;
	min-width: 37px;
	min-height: 37px;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--pt-color-bg) !important;
	color: var(--pt-color-muted) !important;
	border: 1px solid var(--pt-color-border);
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
	line-height: 1;
	overflow: hidden;
}

.ptgp-gd-card-actions .ptgp-gd-card-list-save .gd-badge {
	width: 100%;
	height: 100%;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	color: inherit !important;
	border: 0 !important;
	box-shadow: none !important;
	line-height: 1;
}

.ptgp-gd-card-actions .ptgp-gd-card-list-save .gd-list-icon {
	margin: 0 !important;
	color: inherit !important;
}

.ptgp-gd-card-actions .ptgp-gd-card-list-save .gd-secondary {
	display: none !important;
}

.ptgp-gd-card-actions .ptgp-gd-card-list-save.gd-lists-is-in-user-lists {
	background: var(--pt-color-bg) !important;
	color: var(--pt-color-primary) !important;
	border-color: var(--pt-color-border);
}
/* ==========================================================================
 * GD Single Listing Detail
 *
 * Flat detail layout: follows the Search page / GD card language. Sections are
 * separated by spacing and dividers, not raised cards.
 * ========================================================================== */
.pt-single-listing,
.wp-block-group.pt-single-listing {
	box-sizing: border-box;
	max-width: calc(var(--pt-gd-wide, 1360px) + (var(--pt-gd-gutter, 1.5rem) * 2));
	margin-inline: auto;
	padding: clamp(1rem, 0.6rem + 1.4vw, 1.75rem) var(--pt-gd-gutter, 1.5rem) clamp(2.5rem, 1.7rem + 3vw, 4rem);
}

.pt-single-listing > * {
	margin-block-start: 0;
}

.pt-single-listing > * + * {
	margin-block-start: clamp(1rem, 0.75rem + 1vw, 1.6rem);
}

.pt-single-header,
.wp-block-group.pt-single-header {
	display: block;
	padding: 0 0 clamp(1rem, 0.75rem + 1vw, 1.5rem);
	border-bottom: 1px solid var(--pt-color-border);
	background: transparent;
}

.pt-single-header-main,
.wp-block-group.pt-single-header-main,
.pt-single-price-row,
.wp-block-group.pt-single-price-row,
.pt-single-actions,
.wp-block-group.pt-single-actions,
.pt-single-price,
.wp-block-group.pt-single-price {
	margin: 0;
	padding: 0;
}

.pt-single-header-main,
.wp-block-group.pt-single-header-main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}

.pt-single-header-main > *,
.wp-block-group.pt-single-header-main > * {
	margin-block: 0 !important;
}

.pt-single-title .geodir-entry-title,
.pt-single-title h1,
.pt-single-header .geodir-entry-title,
.pt-single-header h1 {
	margin: 0;
	font-size: clamp(1.8rem, 1.25rem + 2.3vw, 3rem);
	font-weight: 680;
	line-height: 1.06;
	letter-spacing: -0.04em;
	color: var(--pt-color-text);
}

.pt-single-address,
.pt-single-header .geodir_post_meta.geodir-field-address,
.pt-single-header .geodir-post-address {
	margin-top: 0.55rem !important;
	color: var(--pt-color-muted);
	line-height: 1.28;
}

.pt-single-address :where(.geodir_post_meta, .geodir-output-location, p),
.pt-single-header .geodir-post-address :where(.geodir_post_meta, p) {
	margin-block: 0;
}

.pt-single-header .wp-block-geodirectory-geodir-widget-post-address,
.pt-single-header .wp-block-geodirectory-geodir-widget-post-meta {
	margin-block: 0 !important;
}

.pt-single-price-row,
.wp-block-group.pt-single-price-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
	width: 100%;
	margin-top: 1.15rem !important;
}

.pt-single-price,
.wp-block-group.pt-single-price {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.12rem;
	min-width: 0;
}

.pt-single-price-main {
	margin: 0 !important;
	font-size: clamp(1.25rem, 1rem + 0.9vw, 1.8rem);
	font-weight: 800;
	line-height: 1.05;
	color: var(--pt-color-primary-dark);
}

.pt-single-price-unit {
	margin: 0 !important;
	font-size: 0.92rem;
	line-height: 1.18;
	color: var(--pt-color-muted);
}

.pt-single-price :where(.geodir_post_meta, .wp-block-geodirectory-geodir-widget-post-meta) {
	margin: 0 !important;
	padding: 0 !important;
	line-height: inherit;
}

.pt-single-actions,
.wp-block-group.pt-single-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
	flex: 0 0 auto;
	margin-top: 0.05rem;
}

.pt-single-actions .wp-block-shortcode,
.pt-single-floating-contact .wp-block-shortcode {
	margin: 0;
	line-height: 1;
}

.pt-single-actions :where(.pt-single-action-fav, .pt-single-action-list-save, .pt-single-action-share) {
	box-sizing: border-box;
	width: 37px;
	height: 37px;
	min-width: 37px;
	min-height: 37px;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	border-radius: 999px !important;
	border: 1px solid var(--pt-color-border) !important;
	background: var(--pt-color-bg) !important;
	color: var(--pt-color-muted) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	line-height: 1;
	text-decoration: none !important;
	overflow: hidden;
}

.pt-single-actions :where(.pt-single-action-list-save .gd-badge) {
	width: 100%;
	height: 100%;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
}

.pt-single-actions :where(.pt-single-action-list-save .gd-secondary, .pt-single-action-list-save .geodir-output-location-label) {
	display: none !important;
}

.pt-single-gallery,
.wp-block-group.pt-single-gallery {
	overflow: hidden;
	border-radius: 0;
	background: transparent;
}

.pt-single-gallery :where(.geodir-post-slider, .geodir-image-container, .geodir-image-wrapper),
.pt-single-location :where(.geodir-map-wrap, .geodir_map_container, iframe) {
	overflow: hidden;
}

.pt-single-main,
.wp-block-group.pt-single-main {
	display: flex;
	flex-direction: column;
	gap: clamp(1.15rem, 0.85rem + 1.1vw, 1.75rem);
}

.pt-single-block,
.pt-single-related,
.wp-block-group.pt-single-block,
.wp-block-group.pt-single-related {
	margin: 0;
	padding: clamp(1rem, 0.7rem + 1vw, 1.5rem) 0 0;
	border-top: 1px solid var(--pt-color-border);
	background: transparent;
}

.pt-single-section-title,
.pt-single-block .widget-title,
.pt-single-related .widget-title {
	margin: 0 0 0.9rem;
	font-size: clamp(1.15rem, 1rem + 0.55vw, 1.45rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--pt-color-text);
}

.pt-single-facts,
.wp-block-group.pt-single-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: clamp(1.1rem, 0.8rem + 1vw, 1.75rem);
	row-gap: 0;
	border-top: 1px solid var(--pt-color-border);
	background: transparent;
}

.pt-single-facts > * {
	min-width: 0;
	margin: 0 !important;
	padding: 0.68rem 0 !important;
	border: 0 !important;
	border-bottom: 1px solid var(--pt-color-border) !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.pt-single-facts :where(.geodir_post_meta, .list-group, .list-group-item) {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.pt-single-facts :where(.geodir-output-location-label, .geodir_post_meta_title, .gd-secondary, .text-muted) {
	font-size: 0.76rem;
	font-weight: 760;
	text-transform: uppercase;
	letter-spacing: 0.055em;
	color: var(--pt-color-muted) !important;
}

.pt-single-facts :where(.geodir-output-location-value, .geodir_post_meta_value) {
	font-size: 0.96rem;
	font-weight: 650;
	color: var(--pt-color-text) !important;
}

.pt-single-fact-id {
	display: flex;
	flex-direction: column;
	gap: 0.18rem;
}

.pt-single-fact-id-label {
	font-size: 0.76rem;
	font-weight: 760;
	text-transform: uppercase;
	letter-spacing: 0.055em;
	color: var(--pt-color-muted);
}

.pt-single-fact-id-value {
	font-size: 0.96rem;
	font-weight: 760;
	color: var(--pt-color-text);
}

.pt-single-description .geodir-post-content-container,
.pt-single-description .geodir_post_meta {
	margin: 0;
}

.pt-single-description :where(p, ul, ol) {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--pt-color-text);
}

.pt-single-description :where(p, ul, ol):last-child {
	margin-bottom: 0;
}

.pt-single-details .geodir-output-location-detail {
	border: 0;
	border-radius: 0;
	overflow: visible;
}

.pt-single-details .list-group-item {
	padding-inline: 0;
	background: transparent;
}

.pt-single-location .wp-block-geodirectory-geodir-widget-map {
	overflow: hidden;
}

.pt-single-cta,
.wp-block-group.pt-single-cta {
	padding-top: clamp(1rem, 0.7rem + 1vw, 1.5rem);
}

.pt-single-related .wp-block-geodirectory-geodir-widget-listings {
	margin: 0;
}

/* ==========================================================================
 * GD Single Listing Floating Contact
 * ========================================================================== */
.pt-single-floating-contact,
.wp-block-group.pt-single-floating-contact {
	position: fixed;
	right: clamp(1rem, 1.4vw + 0.5rem, 1.75rem);
	bottom: clamp(1rem, 1.4vw + 0.5rem, 1.75rem);
	z-index: 90;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	line-height: 1;
}

.pt-single-floating-contact .wp-block-shortcode {
	margin: 0;
	line-height: 1;
}

.pt-single-floating-contact .proptara-contact-icons {
	min-height: 52px !important;
	height: 52px !important;
	padding-inline: 1.1rem !important;
	border-radius: 999px !important;
	background: var(--pt-color-primary) !important;
	color: var(--pt-color-on-primary) !important;
	box-shadow: 0 12px 28px rgba(15, 81, 50, 0.35) !important;
}

.pt-single-floating-contact .proptara-contact-icons :where(a, button, span, i, svg) {
	background: transparent !important;
	color: var(--pt-color-on-primary) !important;
	fill: currentColor !important;
	border-color: transparent !important;
}

.pt-single-floating-contact .proptara-contact-icons :where(a, button) {
	box-shadow: none !important;
}

.pt-single-floating-contact .proptara-contact-icons:hover,
.pt-single-floating-contact .proptara-contact-icons:focus-visible {
	background: var(--pt-color-primary-dark, var(--pt-color-primary)) !important;
	transform: translateY(-2px);
	box-shadow: 0 16px 36px rgba(15, 81, 50, 0.42) !important;
}

@media (max-width: 900px) {
	.pt-single-facts,
	.wp-block-group.pt-single-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {

	.pt-single-title .geodir-entry-title,
	.pt-single-title h1,
	.pt-single-header .geodir-entry-title,
	.pt-single-header h1 {
		font-size: clamp(2rem, 7.5vw, 3rem);
		line-height: 1.1;
	}

	.pt-single-address,
	.pt-single-header .geodir_post_meta.geodir-field-address,
	.pt-single-header .geodir-post-address {
		margin-top: 0.65rem !important;
	}

	.pt-single-price-row,
	.wp-block-group.pt-single-price-row {
		align-items: flex-start;
		gap: 0.75rem;
		margin-top: 1.15rem !important;
	}


	.pt-single-facts,
	.wp-block-group.pt-single-facts {
		grid-template-columns: 1fr;
	}


	.pt-single-actions,
	.wp-block-group.pt-single-actions {
		justify-content: flex-end;
		gap: 0.4rem;
	}

}

/* --------------------------------------------------------------------------
 * Batch 1: GeoDirectory deboxing refinement
 *
 * Intent:
 * - Keep GD pages functional.
 * - Keep search/listing/enquiry actions clear.
 * - Reduce the visual weight of generic GD panels, location feature cards and
 *   helper sections so search results and contact actions become the focus.
 * -------------------------------------------------------------------------- */

.pt-gd-panel,
.wp-block-group.pt-gd-panel {
	border-color: rgba(15, 81, 50, 0.09);
	background: rgba(255, 255, 255, 0.76);
	box-shadow: 0 8px 22px rgba(23, 33, 29, 0.04);
}

/* Search remains an intentional control surface, but less bulky. */
.pt-gd-search-panel {
	border-color: rgba(15, 81, 50, 0.13);
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 14px 36px rgba(23, 33, 29, 0.06);
}

body.pt-gd-context .geodir-search,
body.pt-gd-context .gd-search-bar,
.pt-gd-panel .geodir-search,
.pt-gd-panel .gd-search-bar {
	border-color: rgba(15, 81, 50, 0.10);
	background: rgba(255, 255, 255, 0.82);
}

/* Location features and decision cards should feel like guidance, not boxed
 * product cards. */
.pt-gd-feature,
.wp-block-group.pt-gd-feature,
.pt-gd-decision-card,
.wp-block-group.pt-gd-decision-card {
	border-color: rgba(15, 81, 50, 0.08);
	background: rgba(255, 255, 255, 0.64);
	box-shadow: none;
}

.pt-gd-feature-label i {
	background: rgba(15, 81, 50, 0.075);
}

/* GD single/detail native groups: flatter dossier feel with dividers. */
body.pt-gd-context.geodir-page-single .geodir-tabs,
body.pt-gd-context.geodir-page-single .geodir-post-meta-container,
body.pt-gd-context.geodir-page-single .geodir-field-group {
	border-color: rgba(15, 81, 50, 0.085);
	background: rgba(255, 255, 255, 0.78);
	box-shadow: none;
}

/* Preserve listing cards as intentional comparison units; soften only the
 * footer divider so they do not look like nested cards. */
.ptgp-gd-card-footer {
	border-top-color: rgba(15, 81, 50, 0.08);
	background: rgba(245, 247, 249, 0.70);
}

/* Map frames are functional panels; keep containment but reduce box weight. */
.pt-gd-map-frame {
	background: rgba(255, 255, 255, 0.68);
	box-shadow: none;
}

@media (max-width: 700px) {
	.pt-gd-panel,
	.wp-block-group.pt-gd-panel {
		padding: 0.9rem;
		box-shadow: none;
	}

	.pt-gd-feature,
	.wp-block-group.pt-gd-feature {
		min-height: 64px;
		padding: 0.72rem 0.75rem;
	}
}

