/* AMPI Property Search - base styles. Override freely in Elementor's Custom CSS. */

/* Typography: Crimson Text for headings, Open Sans for body copy.
   Scoped to the plugin's own wrappers so the rest of the theme is untouched. */
.ampi-ps-form,
.ampi-ps-grid,
.ampi-ps-card,
.ampi-ps-detail,
.ampi-ps-pagination,
.ampi-ps-similar,
.ampi-ps-results-page {
	font-family: 'Open Sans', sans-serif;
}

.ampi-ps-form h1, .ampi-ps-form h2, .ampi-ps-form h3, .ampi-ps-form h4,
.ampi-ps-grid h1, .ampi-ps-grid h2, .ampi-ps-grid h3, .ampi-ps-grid h4,
.ampi-ps-card h1, .ampi-ps-card h2, .ampi-ps-card h3, .ampi-ps-card h4,
.ampi-ps-detail h1, .ampi-ps-detail h2, .ampi-ps-detail h3, .ampi-ps-detail h4,
.ampi-ps-similar h1, .ampi-ps-similar h2, .ampi-ps-similar h3, .ampi-ps-similar h4,
.ampi-ps-results-page h1, .ampi-ps-results-page h2, .ampi-ps-results-page h3, .ampi-ps-results-page h4,
.ampi-ps-detail-title,
.ampi-ps-detail-subheading,
.ampi-ps-card-title,
.ampi-ps-contact-heading {
	font-family: 'Crimson Text', serif;
}

.ampi-ps-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 1300px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.ampi-ps-grid-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.ampi-ps-grid-row-5 {
	grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1100px) {
	.ampi-ps-grid-row-5 {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 900px) {
	.ampi-ps-grid-row {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.ampi-ps-grid-row {
		/* 2 columns, not 1 — single fields span both via grid-column below,
		   but Price From/To and Bedrooms/Bathrooms stay paired side-by-side
		   on mobile, matching the reference design rather than stacking
		   every field into one column. */
		grid-template-columns: repeat(2, 1fr);
	}

	.ampi-ps-grid-row > .ampi-ps-row:not(.ampi-ps-row-mobile-pair-a):not(.ampi-ps-row-mobile-pair-b):not(.ampi-ps-submit-row) {
		grid-column: 1 / -1;
	}

	.ampi-ps-submit-row {
		grid-column: 1 / -1;
	}
}

.ampi-ps-form input,
.ampi-ps-form select,
.ampi-ps-form button,
.ampi-ps-detail input,
.ampi-ps-detail select,
.ampi-ps-detail textarea,
.ampi-ps-detail button {
	font-family: 'Open Sans', sans-serif;
}

.ampi-ps-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ampi-ps-row-pair {
	display: flex;
	flex: 1 1 100%;
	gap: 16px;
}

.ampi-ps-row-pair > div {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ampi-ps-form label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.7;
}

.ampi-ps-form input,
.ampi-ps-form select {
	padding: 12px 14px;
	border: 1px solid #e3e3e3;
	border-radius: 10px;
	font-size: 15px;
	background: #fafafa;
	color: #333;
	width: 100%;
	box-sizing: border-box;
}

.ampi-ps-form input::placeholder {
	color: #8a8a8a;
}

.ampi-ps-form select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 32px;
}

.ampi-ps-submit {
	padding: 12px 28px;
	border: none;
	border-radius: 10px;
	background: #0F2A44;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
	box-sizing: border-box;
}

.ampi-ps-submit:hover {
	background: #1B4065;
}

.ampi-ps-submit-label-spacer {
	visibility: hidden;
}

/* ---- Features multi-select dropdown ---- */

.ampi-ps-feature-field {
	position: relative;
}

.ampi-ps-feature-dropdown {
	position: relative;
}

.ampi-ps-feature-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #e3e3e3;
	border-radius: 10px;
	background: #fafafa;
	font-size: 15px;
	font-family: 'Open Sans', sans-serif;
	color: #333;
	cursor: pointer;
	box-sizing: border-box;
}

.ampi-ps-feature-toggle:focus {
	border-color: #0F2A44;
	outline: none;
}

.ampi-ps-feature-caret {
	font-size: 12px;
	opacity: 0.6;
	margin-left: 8px;
}

.ampi-ps-feature-panel {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 20;
	background: #fff;
	border: 1px solid #e3e3e3;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	max-height: 240px;
	overflow-y: auto;
	padding: 8px 0;
}

.ampi-ps-feature-panel.ampi-ps-feature-panel-open {
	display: block;
}

.ampi-ps-feature-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 400;
	text-transform: none;
	cursor: pointer;
	opacity: 1;
}

.ampi-ps-feature-option:hover {
	background: #fafafa;
}

.ampi-ps-feature-option input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: #0F2A44;
}

.ampi-ps-feature-empty {
	padding: 12px 16px;
	font-size: 14px;
	opacity: 0.6;
}

/* ---- Search Results heading + toolbar ---- */

.ampi-ps-results-heading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 24px 0;
	margin-bottom: 16px;
}

.ampi-ps-results-heading h1 {
	margin: 0;
	font-size: 34px;
}

.ampi-ps-results-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 14px 20px;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	background: #fff;
	margin-bottom: 20px;
}

.ampi-ps-sort-form {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ampi-ps-sort-form label {
	font-size: 14px;
	font-weight: 600;
}

.ampi-ps-sort-form select {
	padding: 7px 12px;
	border: 1px solid #c7d3de;
	border-radius: 20px;
	font-size: 14px;
	background: #eef3f7;
	color: #0F2A44;
	font-weight: 600;
}

.ampi-ps-notify-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: none;
	border-radius: 6px;
	background: #0F2A44;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: not-allowed;
}

@media (max-width: 600px) {
	.ampi-ps-results-heading {
		flex-direction: column;
		text-align: center;
	}
	.ampi-ps-results-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
}

.ampi-ps-meta {
	margin-bottom: 16px;
	font-size: 14px;
	opacity: 0.7;
}

.ampi-ps-notice {
	padding: 16px;
	border-radius: 6px;
	background: #f5f5f5;
}

.ampi-ps-notice.ampi-ps-error {
	background: #fdecea;
	color: #8a1f11;
}

.ampi-ps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.ampi-ps-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 28px;
}

.ampi-ps-page-link {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	font-size: 14px;
	font-weight: 600;
	color: #0F2A44;
	text-decoration: none;
}

.ampi-ps-page-link:hover {
	background: #f3f8f5;
}

.ampi-ps-page-current {
	background: #0F2A44;
	border-color: #0F2A44;
	color: #fff;
}

.ampi-ps-page-ellipsis {
	padding: 0 4px;
	opacity: 0.5;
}

.ampi-ps-card {
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ampi-ps-card:hover,
.ampi-ps-card:focus {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
	color: inherit;
}

.ampi-ps-card-photo {
	position: relative;
	height: 180px;
	background-size: cover;
	background-position: center;
	background-color: #eee;
}

.ampi-ps-card-photo-placeholder {
	background: linear-gradient(135deg, #e9e9e9, #f5f5f5);
}

/* ---- Save / wishlist heart icon ---- */

.ampi-ps-save-heart {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #0F2A44;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: transform 0.1s ease;
}

.ampi-ps-save-heart:hover {
	transform: scale(1.08);
}

.ampi-ps-save-heart svg {
	fill: none;
	stroke: currentColor;
	transition: fill 0.15s ease;
}

.ampi-ps-save-heart-active {
	color: #c0392b;
}

.ampi-ps-save-heart-active svg {
	fill: #c0392b;
	stroke: #c0392b;
}

.ampi-ps-detail-hero {
	position: relative;
}

/* ---- Floating wishlist widget ---- */

.ampi-ps-wishlist-widget {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9999;
	font-family: 'Open Sans', sans-serif;
}

.ampi-ps-wishlist-toggle {
	position: relative;
	width: 56px;
	height: 56px;
	border: none;
	border-radius: 50%;
	background: #0F2A44;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.ampi-ps-wishlist-toggle svg {
	fill: #fff;
}

.ampi-ps-wishlist-count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: #c0392b;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ampi-ps-wishlist-panel {
	display: none;
	position: absolute;
	bottom: 68px;
	right: 0;
	width: 320px;
	max-height: 70vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
	padding: 16px;
}

.ampi-ps-wishlist-panel.ampi-ps-wishlist-panel-open {
	display: block;
}

.ampi-ps-wishlist-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.ampi-ps-wishlist-panel-header h3 {
	margin: 0;
	font-family: 'Crimson Text', serif;
	font-size: 18px;
}

.ampi-ps-wishlist-panel-header button {
	border: none;
	background: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #666;
}

.ampi-ps-wishlist-email-gate p {
	font-size: 13px;
	margin: 0 0 10px;
	opacity: 0.75;
}

.ampi-ps-wishlist-email-gate input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #e3e3e3;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 10px;
}

.ampi-ps-wishlist-email-gate .ampi-ps-submit {
	width: 100%;
}

.ampi-ps-wishlist-empty {
	font-size: 13px;
	opacity: 0.6;
	text-align: center;
	padding: 20px 0;
}

.ampi-ps-wishlist-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ampi-ps-wishlist-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
	padding: 8px;
	border-radius: 8px;
	transition: background 0.1s ease;
}

.ampi-ps-wishlist-item:hover {
	background: #f7f7f5;
}

.ampi-ps-wishlist-item-photo {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	background-color: #eee;
}

.ampi-ps-wishlist-item-body {
	flex: 1;
	min-width: 0;
}

.ampi-ps-wishlist-item-name {
	font-size: 13px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ampi-ps-wishlist-item-price {
	font-size: 12px;
	color: #0F2A44;
	font-weight: 700;
}

.ampi-ps-wishlist-item-remove {
	flex-shrink: 0;
	border: none;
	background: none;
	font-size: 18px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 4px;
}

.ampi-ps-wishlist-item-remove:hover {
	color: #c0392b;
}

@media (max-width: 480px) {
	.ampi-ps-wishlist-panel {
		width: calc(100vw - 48px);
	}
}

.ampi-ps-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ampi-ps-card-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
}

.ampi-ps-card-location {
	font-size: 13px;
	opacity: 0.65;
}

.ampi-ps-card-price {
	font-size: 16px;
	font-weight: 700;
	color: #0F2A44;
}

.ampi-ps-card-specs {
	display: flex;
	gap: 12px;
	font-size: 13px;
	opacity: 0.75;
}

.ampi-ps-card-specs span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ampi-ps-card-specs svg {
	flex-shrink: 0;
	color: #0F2A44;
}

.ampi-ps-card-link {
	margin-top: 8px;
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	color: #0F2A44;
	text-decoration: underline;
}

/* Property Detail Page */

.ampi-ps-detail {
	/* No max-width here on purpose — the theme's own content/container
	   width controls how wide this gets, per site design. */
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ---- Gallery: hero + 2x2 thumbnail grid (desktop), stacked (mobile) ---- */

.ampi-ps-detail-gallery {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 10px;
}

.ampi-ps-detail-gallery-single,
.ampi-ps-detail-gallery:has(.ampi-ps-detail-hero:only-child) {
	grid-template-columns: 1fr;
}

.ampi-ps-detail-hero {
	height: 100%;
	min-height: 360px;
	border-radius: 10px;
	background-size: cover;
	background-position: center;
	background-color: #eee;
}

.ampi-ps-detail-thumb-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 10px;
}

.ampi-ps-detail-thumb-grid-item {
	position: relative;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	background-color: #eee;
	min-height: 100px;
	cursor: pointer;
}

.ampi-ps-detail-thumb-more {
	position: absolute;
	inset: 0;
	border-radius: 8px;
	background: rgba(27, 64, 101, 0.78);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 15px;
}

/* Optional extra strip — only appears when the gallery has more than 5 photos */
.ampi-ps-detail-thumbs {
	display: flex;
	gap: 10px;
	margin-top: 4px;
	overflow-x: auto;
	grid-column: 1 / -1;
}

.ampi-ps-detail-thumb {
	flex: 0 0 110px;
	height: 80px;
	border-radius: 6px;
	background-size: cover;
	background-position: center;
	background-color: #eee;
}

@media (max-width: 800px) {
	.ampi-ps-detail-gallery {
		grid-template-columns: 1fr;
	}
	.ampi-ps-detail-hero {
		min-height: 260px;
	}
}

/* ---- Two-column body: main content + sidebar ---- */

.ampi-ps-detail-columns {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 32px;
	align-items: start;
}

.ampi-ps-detail-main {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0; /* prevents long descriptions from overflowing the grid track */
}

.ampi-ps-detail-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: sticky;
	top: 24px;
}

@media (max-width: 900px) {
	.ampi-ps-detail-columns {
		grid-template-columns: 1fr;
	}
	.ampi-ps-detail-sidebar {
		position: static;
	}
}

.ampi-ps-detail-header {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ampi-ps-detail-title {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
}

.ampi-ps-detail-location {
	font-size: 14px;
	opacity: 0.65;
}

.ampi-ps-detail-price {
	font-size: 24px;
	font-weight: 700;
	color: #0F2A44;
	margin-top: 4px;
}

.ampi-ps-detail-tags {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.ampi-ps-tag {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 4px 10px;
	border-radius: 20px;
	background: #eef3f7;
	color: #0F2A44;
}

.ampi-ps-detail-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	padding: 16px 0;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
	font-size: 14px;
}

.ampi-ps-detail-specs div {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ampi-ps-detail-specs svg {
	flex-shrink: 0;
	color: #0F2A44;
}

.ampi-ps-detail-description {
	font-size: 15px;
	line-height: 1.7;
}

/* ---- Features tag list (detail page) ---- */

.ampi-ps-feature-group {
	margin-bottom: 20px;
}

.ampi-ps-feature-group:last-of-type {
	margin-bottom: 0;
}

.ampi-ps-feature-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ampi-ps-feature-tag {
	display: inline-block;
	padding: 7px 14px;
	border-radius: 20px;
	background: #eef3f7;
	color: #0f2a44;
	font-size: 13px;
	font-weight: 600;
}

.ampi-ps-feature-tags-note {
	margin: 10px 0 0;
	font-size: 12px;
	opacity: 0.55;
	font-style: italic;
}

.ampi-ps-detail-video a {
	font-weight: 600;
	color: #0F2A44;
}

.ampi-ps-detail-subheading {
	font-size: 19px;
	font-weight: 700;
	margin: 0 0 14px;
}

/* ---- Agent contact box (sidebar) ---- */

.ampi-ps-agent-box {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #f7f7f5;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	padding: 20px;
}

.ampi-ps-agent-name {
	font-size: 16px;
	font-weight: 700;
}

.ampi-ps-agent-details {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ampi-ps-agent-phone,
.ampi-ps-agent-email {
	font-size: 14px;
	font-weight: 600;
	color: #0F2A44;
	text-decoration: none;
}

.ampi-ps-agent-phone:hover,
.ampi-ps-agent-email:hover {
	text-decoration: underline;
}

/* ---- Map embed ---- */

.ampi-ps-map-embed iframe {
	border-radius: 10px;
	border: 1px solid #e6e6e6;
	display: block;
}

.ampi-ps-map-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #0F2A44;
	text-decoration: underline;
}

/* ---- Similar properties ---- */

.ampi-ps-similar {
	border-top: 1px solid #e6e6e6;
	padding-top: 32px;
	margin-top: 8px;
}

/* ---- Thumbnail switcher ---- */

.ampi-ps-detail-thumbs {
	display: flex;
	gap: 10px;
	margin-top: 10px;
	overflow-x: auto;
	padding-bottom: 4px;
}

.ampi-ps-detail-thumb {
	opacity: 0.65;
	transition: opacity 0.2s, outline 0.2s;
	outline: 3px solid transparent;
	outline-offset: 2px;
}

.ampi-ps-detail-thumb:hover {
	opacity: 0.9;
}

.ampi-ps-thumb-active {
	opacity: 1;
	outline-color: #0F2A44;
}

/* ---- Contact / Enquiry Form ---- */

.ampi-ps-contact {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	padding: 20px;
}

.ampi-ps-contact-heading {
	margin: 0 0 20px;
	font-size: 22px;
	font-weight: 700;
}

.ampi-ps-contact-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ampi-ps-contact-row {
	display: flex;
	gap: 16px;
}

.ampi-ps-contact-row .ampi-ps-contact-field {
	flex: 1;
}

/* The contact form now lives in a fixed-width sidebar column, which is too
   narrow for side-by-side fields regardless of the viewport's own width —
   so always stack here, rather than relying on a viewport media query. */
.ampi-ps-detail-sidebar .ampi-ps-contact-row {
	flex-direction: column;
}

.ampi-ps-contact-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ampi-ps-contact-field label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.7;
}

.ampi-ps-contact-field label span {
	color: #c0392b;
	opacity: 1;
}

.ampi-ps-contact-field input,
.ampi-ps-contact-field textarea {
	padding: 10px 12px;
	border: 1px solid #d8d8d8;
	border-radius: 6px;
	font-size: 15px;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.15s;
}

.ampi-ps-contact-field input:focus,
.ampi-ps-contact-field textarea:focus {
	outline: none;
	border-color: #0F2A44;
	box-shadow: 0 0 0 3px rgba(26, 77, 60, 0.12);
}

.ampi-ps-contact-field input[readonly] {
	background: #f5f5f5;
	color: #777;
	cursor: default;
}

.ampi-ps-contact-field textarea {
	resize: vertical;
	min-height: 120px;
}

.ampi-ps-contact-footer {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.ampi-ps-contact-submit {
	padding: 12px 28px;
	border: none;
	border-radius: 6px;
	background: #0F2A44;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s;
}

.ampi-ps-contact-submit:hover {
	background: #1B4065;
}

.ampi-ps-contact-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ampi-ps-contact-notice {
	font-size: 14px;
	font-weight: 500;
}

.ampi-ps-contact-notice--ok {
	color: #0F2A44;
}

.ampi-ps-contact-notice--err {
	color: #8a1f11;
}

@media ( max-width: 600px ) {
	.ampi-ps-contact-row {
		flex-direction: column;
	}
}

/* ---- Map search view ---- */

.ampi-ps-mapsearch {
	display: grid;
	grid-template-columns: 380px 1fr;
	gap: 0;
	height: 75vh;
	min-height: 500px;
	border: 1px solid #ececec;
	border-radius: 14px;
	overflow: hidden;
}

.ampi-ps-mapsearch-map {
	height: 100%;
	width: 100%;
}

.ampi-ps-mapsearch-results {
	display: flex;
	flex-direction: column;
	border-right: 1px solid #ececec;
	overflow-y: auto;
}

.ampi-ps-mapsearch-meta {
	padding: 14px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #0F2A44;
	border-bottom: 1px solid #ececec;
	flex-shrink: 0;
}

.ampi-ps-mapsearch-list {
	grid-template-columns: 1fr !important;
	gap: 12px;
	padding: 12px;
}

.ampi-ps-mapsearch-list .ampi-ps-card-photo {
	height: 120px;
}

/* ---- Desktop filter bar (above the map/list split) ---- */

.ampi-ps-mapsearch-filterbar {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 14px;
	padding: 14px 16px;
	margin-bottom: 16px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 10px;
}

.ampi-ps-mapsearch-filter {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 130px;
}

.ampi-ps-mapsearch-filter label {
	font-size: 12px;
	font-weight: 600;
	opacity: 0.65;
}

.ampi-ps-mapsearch-filter input,
.ampi-ps-mapsearch-filter select {
	padding: 9px 10px;
	border: 1px solid #e3e3e3;
	border-radius: 8px;
	font-size: 14px;
	background: #fafafa;
	font-family: 'Open Sans', sans-serif;
}

.ampi-ps-mapsearch-filter-checkbox {
	min-width: auto;
	justify-content: center;
}

.ampi-ps-mapsearch-filter-checkbox label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	opacity: 1;
	white-space: nowrap;
}

.ampi-ps-mapsearch-filter-checkbox input {
	width: 16px;
	height: 16px;
	accent-color: #0F2A44;
}

.ampi-ps-mapsearch-reset-link {
	border: none;
	background: none;
	color: #0F2A44;
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	white-space: nowrap;
}

.ampi-ps-mapsearch-apply-btn {
	white-space: nowrap;
	padding: 10px 22px;
}

/* ---- Mobile "Filters" button + slide-over (hidden on desktop) ---- */

.ampi-ps-mapsearch-filters-mobile-btn {
	display: none;
}

.ampi-ps-mapsearch-filters-overlay {
	display: none;
}

@media (max-width: 900px) {
	.ampi-ps-mapsearch-filterbar {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 85vw;
		max-width: 340px;
		flex-direction: column;
		align-items: stretch;
		overflow-y: auto;
		z-index: 10000;
		border-radius: 0;
		margin-bottom: 0;
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
	}

	.ampi-ps-mapsearch-filterbar.ampi-ps-mapsearch-filterbar-open {
		display: flex;
	}

	.ampi-ps-mapsearch-filter {
		min-width: 0;
	}

	.ampi-ps-mapsearch-filters-mobile-btn {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		margin-bottom: 12px;
		padding: 10px 16px;
		border: 1px solid #e3e3e3;
		border-radius: 8px;
		background: #fff;
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
	}

	.ampi-ps-mapsearch-filters-overlay.ampi-ps-mapsearch-filters-overlay-open {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		z-index: 9999;
	}

	.ampi-ps-mapsearch {
		grid-template-columns: 1fr;
		grid-template-rows: 50vh 1fr;
		height: auto;
	}

	.ampi-ps-mapsearch-map {
		order: -1;
	}

	.ampi-ps-mapsearch-results {
		border-right: none;
		border-top: 1px solid #ececec;
		max-height: none;
	}
}

/* ---- Sales / Rentals / Map view toggle ---- */

.ampi-ps-view-toggle {
	display: inline-flex;
	gap: 8px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.ampi-ps-view-toggle-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	border-radius: 8px;
	background: #f0f0ee;
	color: #333;
	font-size: 14px;
	font-weight: 600;
	font-family: 'Open Sans', sans-serif;
	text-decoration: none;
	cursor: pointer;
	border: none;
}

.ampi-ps-view-toggle-active {
	background: #0F2A44;
	color: #fff;
}

/* ---- [ampi_listings_grid] / [ampi_listings_carousel] widgets ---- */

.ampi-ps-listings-widget-grid {
	/* grid-template-columns is set inline per the shortcode's columns attribute */
}

@media (max-width: 900px) {
	.ampi-ps-listings-widget-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 560px) {
	.ampi-ps-listings-widget-grid {
		grid-template-columns: 1fr !important;
	}
}

.ampi-ps-listings-carousel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ampi-ps-listings-carousel-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 4px 2px 16px;
	flex: 1;
}

.ampi-ps-listings-carousel-item {
	flex: 0 0 280px;
	scroll-snap-align: start;
}

@media (max-width: 560px) {
	.ampi-ps-listings-carousel-item {
		flex-basis: 220px;
	}
}

.ampi-ps-carousel-arrow {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border: 1px solid #e3e3e3;
	border-radius: 50%;
	background: #fff;
	font-size: 20px;
	line-height: 1;
	color: #0F2A44;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ampi-ps-carousel-arrow:hover {
	background: #f7f7f5;
}

/* ── Licence notices ─────────────────────────────────────── */
.ampi-ps-licence-notice {
    background: #fff8e6;
    border: 1px solid #f5c842;
    border-left: 4px solid #f5c842;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.6;
}

.ampi-ps-licence-notice p { margin: 0 0 8px; }
.ampi-ps-licence-notice p:last-child { margin: 0; }
.ampi-ps-licence-notice a { color: #8B3A2A; font-weight: 600; }

.ampi-ps-licence-notice--error {
    background: #fdf0ee;
    border-color: #D1756A;
    border-left-color: #8B3A2A;
}
