/**
 * IDX listing page — only what the theme's native single-property CSS
 * (mshm-modern.css) has no equivalent for: the inquiry form (Havenlytics'
 * own form CSS isn't loaded here), the map, the IDX badge, notices and the
 * attribution footer. Everything else is the theme's own styling, driven by
 * the same mshm-* classes and Customizer variables as a native listing.
 */

.mshm-badge.mshm-badge--idx {
	background: #171717;
	color: #fff;
}

/* "Listing no longer available" state — the header is transparent here, so
   clear it the way a hero normally would. */
.mshm-idx-missing .mshm-content {
	padding: 200px 0 90px;
	text-align: center;
}

.mshm-idx-missing__text {
	font-size: 1.1rem;
	margin-bottom: 24px;
}

/* ---------- Inquiry form (matches the native form's look) ---------- */
.mshm-idx-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mshm-idx-form {
	margin: 0;
}

.mshm-idx-form__field {
	display: block;
	margin: 0 0 18px;
}

.mshm-idx-form__field > span {
	display: block;
	margin-bottom: 4px;
	font: 600 13px/1.3 var(--mshm-sans, Arial, Helvetica, sans-serif);
	color: #151515;
}

.mshm-idx-form__field em {
	color: #c0392b;
	font-style: normal;
}

.mshm-idx-form .mshm-idx-form__field input,
.mshm-idx-form .mshm-idx-form__field textarea {
	display: block;
	width: 100%;
	padding: 10px 0;
	border: 0;
	border-bottom: 1px solid #cfcfcf;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font: 400 15px/1.5 var(--mshm-sans, Arial, Helvetica, sans-serif);
	color: #151515;
	resize: vertical;
}

.mshm-idx-form .mshm-idx-form__field input:focus,
.mshm-idx-form .mshm-idx-form__field textarea:focus {
	outline: none;
	border-bottom-color: var(--mshm-accent, #173d64);
}

.mshm-idx-form__actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 8px;
}

.mshm-idx-form .mshm-idx-form__submit {
	padding: 14px 28px;
	border: 0;
	border-radius: var(--mshm-button-radius, 10px);
	background: #111;
	color: #fff;
	font: 500 var(--mshm-button-size, 14px)/1 var(--mshm-sans, Arial, Helvetica, sans-serif);
	cursor: pointer;
}

.mshm-idx-form .mshm-idx-form__submit:hover {
	background: var(--mshm-button-hover, #000);
}

.mshm-idx-notice {
	margin: 0 0 16px;
	padding: 12px 14px;
	font-size: 14px;
	border-radius: 6px;
}

.mshm-idx-notice--ok {
	background: #e8f5ee;
	color: #14693f;
}

.mshm-idx-notice--err {
	background: #fbeaea;
	color: #a12b2b;
}

/* ---------- Map ---------- */
.mshm-idx-map {
	width: 100%;
	height: 380px;
	border-radius: var(--mshm-card-radius, 12px);
	background: #ececec;
	z-index: 0;
}

/* ---------- IDX attribution ---------- */
.mshm-idx-courtesy {
	margin: 36px 0 60px;
	padding-top: 20px;
	border-top: 1px solid var(--mshm-line, #dedede);
	font: 300 12px/1.6 var(--mshm-sans, Arial, Helvetica, sans-serif);
	color: #777;
}

.mshm-idx-courtesy strong {
	color: #151515;
	font-weight: 500;
}

/* ---------- Hero gallery fixes ---------- */

/* Kadence's Splide stylesheet (needed for arrow positioning) loads after the
   theme's, so its 2em x 3em arrow box wins over the theme's 58px circle —
   re-assert the theme's own size here so the arrows are true circles. */
.mshm-idx-listing .mshm-hero-gallery-thumbs .splide__arrow {
	width: 58px;
	height: 58px;
	border-radius: 50% !important;
}

/* Listings can have 40+ photos: one pagination dot each would smear a long
   row across the hero image. The thumbnail strip below already navigates, so
   hide the dots on photo-heavy listings (few-photo listings keep them, as on
   a native listing). */
.mshm-idx-listing--many-photos .mshm-hero-slider .splide__pagination {
	display: none;
}

/* ---------- Contact Agent popup (same pattern as the theme's mortgage modal) ---------- */
.mshm-idx-contact-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
}

.mshm-idx-contact-modal[hidden] {
	display: none !important;
}

.mshm-idx-contact-panel {
	width: min(520px, calc(100vw - 32px));
}

.mshm-idx-contact-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
	padding-right: 28px;
}

.mshm-idx-contact-head__avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
}

.mshm-idx-contact-head h2 {
	margin: 0 !important;
	font: 400 24px/1.15 var(--mshm-serif, Georgia, serif) !important;
}

.mshm-idx-contact-head__sub {
	margin: 4px 0 0;
	font-size: 13px;
	color: #777;
}

body.mshm-idx-contact-open {
	overflow: hidden;
}
