/**
 * AI Home Search — public styles.
 *
 * Refined editorial-luxury real-estate aesthetic. Everything is scoped under
 * .ahs-search / .ahs-modal so it never leaks into the host theme. Colors defer
 * to the client's GeneratePress accent vars with premium neutral fallbacks.
 *
 * @package AI_Home_Search
 * @since   0.9.0
 */

.ahs-search {
	/* Palette — inherits client accents, falls back to a refined emerald/ink. */
	--ahs-accent: var(--accent, #1f6f5c);
	--ahs-accent-2: var(--accent-2, #16513f);
	/* Aurora gold — self-styled hero accent (badge, headline accent, button, chips). */
	--ahs-gold: #c8962e;
	--ahs-gold-deep: #b07f22;
	--ahs-ink: #14171c;
	--ahs-body: #3a4049;
	--ahs-muted: #79818c;
	--ahs-line: rgba(20, 23, 28, 0.09);
	--ahs-line-strong: rgba(20, 23, 28, 0.16);
	--ahs-surface: #f6f5f2;
	--ahs-card: #ffffff;
	--ahs-radius: 16px;
	--ahs-radius-sm: 11px;
	--ahs-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 28px -12px rgba(16, 24, 40, 0.18);
	--ahs-shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.05), 0 26px 50px -16px rgba(16, 24, 40, 0.30);
	--ahs-ease: cubic-bezier(0.22, 1, 0.36, 1);

	max-width: 100%;
	margin: 0 auto;
	padding: 8px 18px 48px;
	color: var(--ahs-body);
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	/* Aurora hero backdrop — near-white base with two soft amber blooms in the
	   top corners (pure CSS), fading to white before the results grid. */
	background:
		radial-gradient(72% 56% at 12% -10%, rgba(200, 150, 46, 0.14), rgba(200, 150, 46, 0) 60%),
		radial-gradient(64% 50% at 92% -2%, rgba(200, 150, 46, 0.10), rgba(200, 150, 46, 0) 58%),
		linear-gradient(180deg, #fdfbf6 0%, #fdfcfa 42%, #ffffff 100%);
	background-repeat: no-repeat;
}

.ahs-search *,
.ahs-modal * {
	box-sizing: border-box;
}

/* ─────────────────────────  Search hero (Aurora)  ───────────────────────── */

.ahs-search__intro {
	max-width: 840px;
	margin: 0 auto 26px;
	padding: 30px 4px 0;
	text-align: center;
}

/* Pill badge — gold-tinted border + text, uppercase, letter-spaced, with an
   inline sparkle. Self-styled (no theme vars). */
.ahs-search__badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 18px;
	padding: 7px 15px 7px 13px;
	border: 1px solid rgba(200, 150, 46, 0.32);
	border-radius: 999px;
	background: rgba(200, 150, 46, 0.08);
	color: var(--ahs-gold-deep);
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1;
}

.ahs-search__badge-spark {
	flex: 0 0 auto;
	color: var(--ahs-gold);
}

.ahs-search__title {
	margin: 0 0 14px;
	color: var(--ahs-ink);
	font-family: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: clamp(2rem, 1.25rem + 3vw, 3.1rem);
	line-height: 1.06;
	font-weight: 700;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

/* Second headline line — gold accent, forced onto its own line. */
.ahs-search__title-accent {
	display: block;
	color: var(--ahs-gold);
}

.ahs-search__subtitle {
	max-width: 600px;
	margin: 0 auto;
	color: var(--ahs-muted);
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.14rem);
	line-height: 1.6;
	text-wrap: pretty;
}

/* Click-to-fill suggestion chips — centered row tucked beneath the search bar.
   Clicking a chip fills the input (JS); it never submits the form. */
.ahs-search__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	max-width: 840px;
	margin: -18px auto 42px;
}

.ahs-search__chip {
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	background: #ffffff;
	border: 1px solid var(--ahs-line-strong);
	border-radius: 999px;
	padding: 9px 17px;
	color: var(--ahs-body);
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
	transition: background 0.2s var(--ahs-ease), border-color 0.2s var(--ahs-ease), color 0.2s var(--ahs-ease), transform 0.2s var(--ahs-ease);
}

.ahs-search__chip:hover,
.ahs-search__chip:focus-visible {
	background: rgba(200, 150, 46, 0.10);
	border-color: rgba(200, 150, 46, 0.5);
	color: var(--ahs-gold-deep);
	outline: none;
}

.ahs-search__chip:active {
	transform: scale(0.96);
}

@media (max-width: 560px) {
	.ahs-search__intro {
		margin-bottom: 22px;
		padding-top: 18px;
	}
	.ahs-search__chips {
		margin-top: -10px;
		margin-bottom: 30px;
		gap: 8px;
	}
	.ahs-search__chip {
		padding: 8px 14px;
		font-size: 0.85rem;
	}
}

/* ─────────────────────────  Search bar  ───────────────────────── */

.ahs-searchbar {
	max-width: 840px;
	margin: 0 auto 38px;
}

.ahs-searchbar__field {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--ahs-card);
	border: 1px solid var(--ahs-line-strong);
	border-radius: 999px;
	padding: 7px 7px 7px 20px;
	box-shadow: var(--ahs-shadow);
	transition: border-color 0.25s var(--ahs-ease), box-shadow 0.25s var(--ahs-ease);
}

.ahs-searchbar__field:focus-within {
	border-color: var(--ahs-accent);
	box-shadow: var(--ahs-shadow-hover);
}

.ahs-searchbar__icon {
	display: flex;
	color: var(--ahs-muted);
	flex: 0 0 auto;
}

.ahs-searchbar__input {
	flex: 1 1 auto;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 1.02rem;
	color: var(--ahs-ink);
	padding: 12px 4px;
	min-width: 0;
}

.ahs-searchbar__input::placeholder {
	color: var(--ahs-muted);
	opacity: 0.85;
}

.ahs-searchbar__btn {
	flex: 0 0 auto;
	border: 0;
	cursor: pointer;
	background: var(--ahs-gold);
	color: #fff;
	font: inherit;
	font-weight: 700;
	letter-spacing: 0.01em;
	font-size: 0.97rem;
	padding: 13px 30px;
	border-radius: 999px;
	box-shadow: 0 6px 16px -6px rgba(200, 150, 46, 0.55);
	transition: background 0.22s var(--ahs-ease), transform 0.22s var(--ahs-ease), box-shadow 0.22s var(--ahs-ease);
}

.ahs-searchbar__btn:hover {
	background: var(--ahs-gold-deep);
	box-shadow: 0 8px 20px -6px rgba(176, 127, 34, 0.6);
}

.ahs-searchbar__btn:active {
	transform: scale(0.97);
}

.ahs-searchbar__btn:disabled {
	opacity: 0.55;
	cursor: default;
}

.ahs-searchbar__btn.is-loading .ahs-searchbar__btn-label {
	visibility: hidden;
}

.ahs-searchbar__btn.is-loading::after {
	content: "";
	position: absolute;
	width: 17px;
	height: 17px;
	margin: -9px 0 0 -9px;
	top: 50%;
	left: 50%;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ahs-spin 0.7s linear infinite;
}

.ahs-searchbar__btn {
	position: relative;
}

.ahs-searchbar__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 11px 6px 0;
	min-height: 18px;
}

.ahs-searchbar__error {
	color: #c0392b;
	font-size: 0.84rem;
	font-weight: 500;
}

.ahs-searchbar__counter {
	margin-left: auto;
	color: var(--ahs-muted);
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}

.ahs-searchbar__counter.is-max {
	color: #c0392b;
}

/* ─────────────────────────  Results grid  ───────────────────────── */

.ahs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(270px, 320px));
	gap: 24px;
	justify-content: center;
}

@media (max-width: 560px) {
	.ahs-grid {
		grid-template-columns: minmax(0, 440px);
	}
}

/* Card */
.ahs-card2 {
	position: relative;
	background: var(--ahs-card);
	border: 1px solid var(--ahs-line);
	border-radius: var(--ahs-radius);
	overflow: hidden;
	cursor: pointer;
	box-shadow: var(--ahs-shadow);
	transition: transform 0.3s var(--ahs-ease), box-shadow 0.3s var(--ahs-ease), border-color 0.3s var(--ahs-ease);
	opacity: 0;
	transform: translateY(14px);
	animation: ahs-rise 0.5s var(--ahs-ease) forwards;
}

.ahs-card2:hover {
	transform: translateY(-5px);
	box-shadow: var(--ahs-shadow-hover);
	border-color: var(--ahs-line-strong);
}

.ahs-card2:focus-visible {
	outline: 2px solid var(--ahs-accent);
	outline-offset: 3px;
}

.ahs-card2__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, #eceae5, #f6f5f2);
	overflow: hidden;
}

.ahs-card2__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s var(--ahs-ease);
}

.ahs-card2:hover .ahs-card2__img {
	transform: scale(1.05);
}

.ahs-card2__noimg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ahs-muted);
}

.ahs-card2__body {
	padding: 16px 18px 18px;
}

.ahs-card2__price {
	font-size: 1.32rem;
	font-weight: 700;
	color: var(--ahs-ink);
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}

.ahs-card2__addr {
	margin-top: 6px;
	color: var(--ahs-body);
	font-size: 0.94rem;
	line-height: 1.45;
}

.ahs-card2__addr-line2 {
	color: var(--ahs-muted);
	font-size: 0.86rem;
}

.ahs-card2__facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin-top: 13px;
	padding-top: 13px;
	border-top: 1px solid var(--ahs-line);
	color: var(--ahs-body);
	font-size: 0.88rem;
}

.ahs-card2__fact {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ahs-card2__fact-icon {
	display: inline-flex;
	align-items: center;
	color: var(--ahs-muted);
	flex: 0 0 auto;
}

.ahs-card2__fact-icon svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
}

.ahs-card2__fact b {
	font-weight: 650;
	color: var(--ahs-ink);
	font-variant-numeric: tabular-nums;
	font-size: 0.92rem;
}

/* ─────────────────────────  Smart badge (cards + modal)  ───────────────────────── */

.ahs-badge {
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* Card variant — a Zillow-style overlay pill in the photo's top-left corner.
   Truncates long insight text to a single tidy line. */
.ahs-badge--card {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: block;
	max-width: calc(100% - 24px);
	background: rgba(17, 19, 22, 0.82);
	color: #fff;
	font-size: 0.75rem;
	padding: 6px 12px;
	border-radius: 999px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

/* Modal variant — a tasteful neutral chip in the header's right column. */
.ahs-badge--modal {
	display: inline-block;
	background: var(--ahs-surface, #f4f5f7);
	color: var(--ahs-ink, #14171c);
	border: 1px solid var(--ahs-line, rgba(20, 23, 28, 0.09));
	font-size: 0.8rem;
	line-height: 1.3;
	padding: 6px 13px;
	border-radius: 999px;
}

/* ─────────────────────────  Skeleton loading  ───────────────────────── */

.ahs-skel {
	background: var(--ahs-card);
	border: 1px solid var(--ahs-line);
	border-radius: var(--ahs-radius);
	overflow: hidden;
}

.ahs-skel__media {
	aspect-ratio: 4 / 3;
}

.ahs-skel__body {
	padding: 16px 18px 20px;
}

.ahs-skel__line {
	height: 13px;
	border-radius: 6px;
	margin-bottom: 10px;
}

.ahs-skel__line--price {
	height: 22px;
	width: 45%;
	margin-bottom: 14px;
}

.ahs-skel__line--short {
	width: 70%;
}

.ahs-skel__line--tiny {
	width: 50%;
	margin-bottom: 0;
}

.ahs-shimmer {
	background: linear-gradient(100deg, #eeece7 30%, #f6f4f0 50%, #eeece7 70%);
	background-size: 200% 100%;
	animation: ahs-shimmer 1.3s ease-in-out infinite;
}

.ahs-loading-label {
	text-align: center;
	color: var(--ahs-muted);
	font-size: 0.92rem;
	letter-spacing: 0.02em;
	margin: 0 0 24px;
}

/* ─────────────────────────  Empty / error  ───────────────────────── */

.ahs-state {
	text-align: center;
	padding: 30px 18px 10px;
	max-width: 540px;
	margin: 0 auto;
}

.ahs-state__icon {
	color: var(--ahs-accent);
	margin-bottom: 14px;
	display: inline-flex;
}

.ahs-state__title {
	color: var(--ahs-ink);
	font-size: 1.28rem;
	font-weight: 650;
	margin: 0 0 6px;
	letter-spacing: -0.01em;
}

.ahs-state__text {
	color: var(--ahs-muted);
	font-size: 0.96rem;
	line-height: 1.55;
	margin: 0;
}

/* ─────────────────────────  Below-results CTA  ───────────────────────── */

.ahs-more {
	text-align: center;
	margin: 44px auto 6px;
	max-width: 560px;
}

.ahs-more__text {
	color: var(--ahs-body);
	font-size: 1.04rem;
	margin: 0 0 22px;
}

.ahs-more__text b {
	color: var(--ahs-ink);
	font-weight: 650;
}

/* ─────────────────────────  Agent card (reusable x3)  ───────────────────────── */

/* One reusable VERTICAL card — used in the modal aside, below results, and the
   empty/error state. Photo on top, name/title/brokerage, then the actions. */
.ahs-agent {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: var(--ahs-surface);
	border: 1px solid var(--ahs-line);
	border-radius: var(--ahs-radius);
	padding: 28px 24px 24px;
	max-width: 380px;
	margin: 0 auto;
	box-shadow: 2px 2px 15px #bcbcbc;
}

.ahs-agent__photo {
	flex: 0 0 auto;
	width: 100%;
	max-width: 180px;
	aspect-ratio: 12 / 16;
	max-height: 240px;
	border-radius: var(--ahs-radius);
	overflow: hidden;
	background: #e6e3dc;
	box-shadow: 0 8px 20px -6px rgba(16, 24, 40, 0.28);
	margin-bottom: 16px;
}

.ahs-agent__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ahs-agent__info {
	width: 100%;
	min-width: 0;
}

.ahs-agent__name {
	color: var(--ahs-ink);
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.ahs-agent__title {
	color: var(--ahs-accent);
	font-size: 0.84rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	margin: 5px 0 0;
}

.ahs-agent__brokerage {
	color: var(--ahs-muted);
	font-size: 0.84rem;
	margin: 3px 0 0;
}

/* "Schedule a Showing" header above the Email/Call buttons. */
.ahs-agent__cta-label {
	width: 100%;
	margin: 22px 0 0;
	color: var(--ahs-muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ahs-agent__actions {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	width: 100%;
}

.ahs-agent__btn {
	flex: 1 1 0;
	min-width: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
	padding: 11px 16px;
	border-radius: 999px;
	transition: background 0.2s var(--ahs-ease), transform 0.2s var(--ahs-ease), border-color 0.2s var(--ahs-ease), color 0.2s var(--ahs-ease);
	line-height: 1;
}

.ahs-agent__btn--primary {
	background: var(--accent, #000);
	color: var(--base, #fff);
}

.ahs-agent__btn--primary:hover {
	background: var(--accent-2, #1a1a1a);
	color: var(--base, #fff);
}

.ahs-agent__btn--ghost {
	background: var(--accent, #000);
	color: var(--base, #fff);
}

.ahs-agent__btn--ghost:hover {
	background: var(--accent-2, #1a1a1a);
	color: var(--base, #fff);
}

.ahs-agent__btn:active {
	transform: scale(0.96);
}

.ahs-agent__btn svg {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	stroke: currentColor;
}

/* ─────────────────────────  Modal  ───────────────────────── */

.ahs-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.28s var(--ahs-ease);
	color: #3a4049;
}

.ahs-modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

.ahs-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 18, 22, 0.62);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.ahs-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 20px;
	width: min(1000px, 100%);
	max-height: min(92vh, 1200px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 40px 90px -24px rgba(0, 0, 0, 0.5);
	transform: translateY(18px) scale(0.985);
	transition: transform 0.32s var(--ahs-ease);
}

.ahs-modal.is-open .ahs-modal__dialog {
	transform: translateY(0) scale(1);
}

/* Reset any host-theme button chrome (GeneratePress gives <button> an accent
   gradient + light text, which previously hid the X). Force a neutral white
   chip with an explicit dark icon so the close glyph is always visible. */
.ahs-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 5;
	width: 42px;
	height: 42px;
	padding: 0;
	border-radius: 50%;
	border: 0;
	-webkit-appearance: none;
	appearance: none;
	background-image: none;
	background-color: rgba(255, 255, 255, 0.95);
	color: #14171c;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
	transition: transform 0.25s var(--ahs-ease), background-color 0.2s var(--ahs-ease);
}

.ahs-modal__close:hover,
.ahs-modal__close:focus {
	transform: rotate(90deg);
	background-color: #fff;
	/* Beat GeneratePress's button hover chrome, which otherwise turns the
	   glyph white and hides it against the white chip. */
	color: #000;
}

.ahs-modal__close svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	display: block;
}

.ahs-modal__close:hover svg,
.ahs-modal__close:focus svg {
	stroke: #000;
}

.ahs-modal__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* Gallery */
.ahs-gallery {
	position: relative;
	background: #111316;
}

.ahs-gallery__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	aspect-ratio: 16 / 9;
}

.ahs-gallery__track::-webkit-scrollbar {
	display: none;
}

.ahs-gallery__slide {
	flex: 0 0 100%;
	scroll-snap-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #111316;
}

.ahs-gallery__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ahs-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	border: 0;
	-webkit-appearance: none;
	appearance: none;
	background-image: none;
	background-color: rgba(255, 255, 255, 0.92);
	color: #14171c;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.25);
	transition: background-color 0.2s var(--ahs-ease), opacity 0.2s var(--ahs-ease);
}

.ahs-gallery__nav:hover,
.ahs-gallery__nav:focus {
	background-color: #fff;
	/* Beat GeneratePress's button hover chrome — keep the chevron dark/visible. */
	color: #000;
}

.ahs-gallery__nav svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	display: block;
}

.ahs-gallery__nav:hover svg,
.ahs-gallery__nav:focus svg {
	stroke: #000;
}

.ahs-gallery__nav--prev {
	left: 14px;
}

.ahs-gallery__nav--next {
	right: 14px;
}

.ahs-gallery__nav[hidden] {
	display: none;
}

.ahs-gallery__dots {
	position: absolute;
	bottom: 12px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 7px;
	pointer-events: none;
}

.ahs-gallery__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	transition: background 0.25s var(--ahs-ease), transform 0.25s var(--ahs-ease);
}

.ahs-gallery__dot.is-active {
	background: #fff;
	transform: scale(1.4);
}

.ahs-gallery__count {
	position: absolute;
	top: 14px;
	left: 14px;
	background: rgba(17, 19, 22, 0.7);
	color: #fff;
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
	padding: 5px 11px;
	border-radius: 999px;
	letter-spacing: 0.03em;
}

/* Modal detail body */
.ahs-detail {
	padding: 32px 36px 38px;
}

/* Two-column on desktop: details left, vertical agent card right (top-aligned,
   scrolls with content — not sticky). Single stacked column below 768px. */
@media (min-width: 768px) {
	.ahs-detail.has-aside {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 312px;
		gap: 44px;
		align-items: start;
	}
}

.ahs-detail__price {
	font-size: 2.1rem;
	font-weight: 750;
	color: var(--ahs-ink, #14171c);
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	line-height: 1.02;
}

.ahs-detail__addr {
	margin-top: 9px;
	color: #3a4049;
	font-size: 1.06rem;
	font-weight: 500;
	line-height: 1.5;
}

.ahs-detail__addr-line2 {
	color: #79818c;
	font-size: 0.92rem;
	font-weight: 400;
	margin-top: 2px;
}

/* Header — price/address (left) + property type & smart badge (right,
   top-aligned with the price). Wraps to stacked on narrow screens. */
.ahs-detail__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px 24px;
	flex-wrap: wrap;
}

.ahs-detail__head-left {
	flex: 1 1 260px;
	min-width: 0;
}

.ahs-detail__head-right {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 9px;
	text-align: right;
	padding-top: 6px;
}

.ahs-detail__type {
	color: var(--ahs-body, #3a4049);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* Get Directions — pin icon + label, directly below the address. */
.ahs-detail__directions {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	color: var(--ahs-accent, #1f6f5c);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.ahs-detail__directions:hover {
	text-decoration: underline;
}

.ahs-detail__directions svg {
	width: 15px;
	height: 15px;
	stroke: currentColor;
	flex: 0 0 auto;
}

/* Stat pills — self-styled NEUTRAL chips. Deliberately NOT themed with the
   GeneratePress accent vars: an icon tile beside a value over a small label. */
.ahs-detail__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 24px 0 0;
	padding: 24px 0 4px;
	border-top: 1px solid var(--ahs-line, rgba(20, 23, 28, 0.09));
}

.ahs-detail__pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #f4f5f7;
	border: 1px solid rgba(20, 23, 28, 0.06);
	border-radius: 14px;
	padding: 9px 15px;
}

.ahs-detail__pill-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: #e8eaef;
	color: #5b6472;
	flex: 0 0 auto;
}

.ahs-detail__pill-icon svg {
	width: 17px;
	height: 17px;
	stroke: currentColor;
}

.ahs-detail__pill-text {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.ahs-detail__pill-val {
	font-size: 1.02rem;
	font-weight: 700;
	color: #14171c;
	font-variant-numeric: tabular-nums;
}

.ahs-detail__pill-label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #79818c;
	font-weight: 600;
	margin-top: 2px;
}

/* MLS disclaimer — bottom of the modal detail and beneath the results. Plain
   text (white-space:pre-line keeps admin line breaks), optional logo + link. */
.ahs-disclaimer {
	margin-top: 30px;
	padding-top: 22px;
	border-top: 1px solid var(--ahs-line, rgba(20, 23, 28, 0.09));
}

.ahs-disclaimer__logo {
	margin-bottom: 12px;
}

.ahs-disclaimer__logo img {
	max-width: 170px;
	max-height: 56px;
	width: auto;
	height: auto;
	display: block;
}

.ahs-disclaimer__text {
	color: #79818c;
	font-size: 0.78rem;
	line-height: 1.6;
	margin: 0;
	white-space: pre-line;
}

.ahs-disclaimer__link {
	display: inline-block;
	margin-top: 8px;
	color: var(--accent, #14171c);
	font-size: 0.78rem;
	font-weight: 600;
	text-decoration: underline;
}

.ahs-disclaimer__link:hover {
	opacity: 0.8;
}

/* Below-results variant — centered, capped, with extra breathing room. */
.ahs-disclaimer--results {
	max-width: 720px;
	margin: 40px auto 0;
	text-align: center;
	border-top: 0;
	padding-top: 0;
}

.ahs-disclaimer--results .ahs-disclaimer__logo {
	display: flex;
	justify-content: center;
}

.ahs-detail__broker {
	margin-top: 28px;
	color: #ababab;
	font-size: 0.9rem;
	line-height: 1.5;
}

@media (max-width: 767px) {
	.ahs-detail {
		padding: 26px 24px 30px;
	}
	.ahs-detail__aside {
		margin-top: 30px;
		padding-top: 28px;
		border-top: 1px solid var(--ahs-line, rgba(20, 23, 28, 0.09));
	}
}

@media (max-width: 600px) {
	.ahs-detail {
		padding: 22px 20px 28px;
	}
	.ahs-detail__price {
		font-size: 1.6rem;
	}
	/* Header stacks: type + badge sit left-aligned under the address. */
	.ahs-detail__head-right {
		align-items: flex-start;
		text-align: left;
		padding-top: 4px;
	}
	.ahs-modal {
		padding: 0;
	}
	.ahs-modal__dialog {
		max-height: 100vh;
		height: 100%;
		width: 100%;
		border-radius: 0;
	}
}

/* ─────────────────────────  Motion  ───────────────────────── */

@keyframes ahs-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes ahs-shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

@keyframes ahs-rise {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

body.ahs-modal-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.ahs-search *,
	.ahs-modal * {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
	.ahs-card2 {
		opacity: 1;
		transform: none;
	}
}
