/*
 * WayHome: site pages (about, contact, list your property, valuation, reviews,
 * the legal pages and the static guides).
 */

.contact__office {
	padding: var(--card-pad);
	background-color: var(--color-bg);
	border-radius: var(--radius-l);
}

.contact__office > h2 {
	margin-block-start: 0;
}

.contact__map-section {
	padding-block-end: var(--block-y);
}

.contact__map-section .place-map {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-block-size: 22rem;
	background-color: var(--grey-100);
	border-radius: var(--radius-l);
	overflow: hidden;
}

.place-map__fallback {
	margin-top: var(--space-2xs);
	font-size: var(--step--1);
}

.place-map__fallback a {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
}

/* Reviews. */
.reviews__rating {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
	margin-block-start: var(--space-s);
	padding: var(--space-2xs) var(--space-s);
	font-family: var(--font-heading);
	font-weight: 700;
	background-color: var(--azure-100);
	border-radius: var(--radius-pill);
}

.reviews__rating .icon {
	color: var(--coral-700);
}

.reviews__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.reviews__more {
	margin-block-start: var(--space-m);
}

/* Agent cards on the about page. */

.card-grid--agents {
	grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.card--agent {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-s);
	padding: var(--card-pad);
	text-align: center;
	background-color: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-l);
}

.card--agent__portrait {
	inline-size: 7.5rem;
	block-size: 7.5rem;
	border-radius: var(--radius-pill);
	overflow: hidden;
	background-color: var(--grey-100);
}

.card--agent__portrait img,
.card--agent__portrait .media {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.card--agent .card__body {
	padding: 0;
}
/*
 * WayHome: single place page.
 *
 * One column, because a place page is read top to bottom rather than scanned
 * against a sidebar. The sticky contents strip does the job an aside would,
 * and costs nothing on a phone.
 */

/* --------------------------------------------------------------------------
 * 1. Hero
 * ----------------------------------------------------------------------- */

.place-hero {
	padding-block-start: var(--space-m);
}

.place-hero__gallery {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-2xs);
	border-radius: var(--radius-l);
	overflow: hidden;
}

@media (min-width: 900px) {
	.place-hero__gallery {
		grid-template-columns: 2fr 1fr;
		grid-template-rows: repeat(2, 1fr);
		max-block-size: 26rem;
	}

	.place-hero__item:first-child {
		grid-row: span 2;
	}
}

/* No photography: one panel rather than the three-up mosaic. */
.place-hero__gallery--empty {
	grid-template-columns: 1fr;
	aspect-ratio: 21 / 9;
	max-block-size: 22rem;
}

.place-hero__item {
	display: block;
	position: relative;
	overflow: hidden;
	background-color: var(--color-surface);
}

.place-hero__item .media,
.place-hero__item img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	aspect-ratio: 3 / 2;
}

@media (min-width: 900px) {
	.place-hero__item:first-child .media,
	.place-hero__item:first-child img {
		aspect-ratio: 16 / 10;
	}
}

.place-hero__item--extra {
	display: none;
}

.place-hero__more {
	position: absolute;
	inset-block-end: var(--space-s);
	inset-inline-end: var(--space-s);
	z-index: var(--z-base);
	background-color: var(--color-bg);
	box-shadow: var(--shadow-1);
}

/*
 * The hero text, the body and the sections all sit in one reading column,
 * aligned to the left edge of the container so the breadcrumb, the contents
 * strip and the header line up with them rather than with each other.
 */
.place-hero__intro {
	max-inline-size: 60rem;
	padding-block-start: var(--space-l);
}

.place-hero__pills {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2xs);
	margin: 0 0 var(--space-s);
}

/*
 * White on a hairline, not grey-100: the canvas is grey-50 now, and a
 * grey-100 pill on it is a 1.01 boundary, which read as unstyled text.
 */
.pill {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	border-radius: var(--radius-pill);
	background-color: var(--white);
	border: 1px solid var(--color-border);
	color: var(--grey-700);
	font-family: var(--font-heading);
	font-size: var(--step--1);
	font-weight: var(--weight-heading-strong);
}

.pill--off-plan,
.pill--under-construction {
	background-color: var(--azure-100);
	border-color: transparent;
	color: var(--azure-800);
}

.place-hero__title {
	margin: 0;
}

.place-hero__summary {
	max-inline-size: var(--measure);
	margin-block-start: var(--space-s);
	font-size: var(--step-1);
	color: var(--grey-700);
}

.place-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2xs);
	margin-block-start: var(--space-m);
}

/* --------------------------------------------------------------------------
 * 2. Contents strip
 * ----------------------------------------------------------------------- */

.place-toc {
	border-block: 1px solid var(--color-border);
	background-color: var(--color-bg);
}

/*
 * Sticks *under* the site header, not at the top of the window. At 0 it slid
 * behind the header (which is sticky at 0 with a higher z-index) and the
 * contents disappeared as soon as the page moved.
 */
.place-toc--sticky {
	position: sticky;
	inset-block-start: var(--header-height);
	z-index: var(--z-sticky-bar);
}

.place-toc__list {
	display: flex;
	gap: var(--space-m);
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.place-toc__list li {
	flex: 0 0 auto;
}

.place-toc__list a {
	display: block;
	padding-block: var(--space-xs);
	border-block-end: 2px solid transparent;
	color: var(--grey-700);
	font-family: var(--font-heading);
	font-size: var(--step--1);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.place-toc__list a:hover,
.place-toc__list a:focus-visible {
	color: var(--ink);
}

.place-toc__list a[aria-current="true"] {
	border-block-end-color: var(--azure-600);
	color: var(--ink);
}

/* --------------------------------------------------------------------------
 * 3. Sections
 * ----------------------------------------------------------------------- */

.place__layout {
	max-inline-size: 60rem;
}

.place-section {
	margin-block-start: var(--space-xl);
	/* Header plus the sticky contents strip, or a jump lands behind both. */
	scroll-margin-block-start: calc(var(--header-height) + 3.5rem);
}

.place-section > h2 {
	margin-block-end: var(--space-m);
}

.place .entry-content h2 {
	margin-block-start: var(--space-xl);
	/* Header plus the sticky contents strip, or a jump lands behind both. */
	scroll-margin-block-start: calc(var(--header-height) + 3.5rem);
}

.place .entry-content > :first-child {
	margin-block-start: 0;
}

.place .entry-content p,
.place .entry-content ul,
.place .entry-content ol {
	max-inline-size: var(--measure);
}

/* --------------------------------------------------------------------------
 * 4. Facts box
 * ----------------------------------------------------------------------- */

/*
 * No panel behind the tiles. The tint belongs to the tile, and a tinted box
 * inside a tinted box is two boundaries saying the same thing.
 */
.place-facts > h2 {
	margin-block-start: 0;
}

/*
 * The same tile as the market snapshot, one pair to a tile, so the two boxes on
 * a place page read as one family rather than as a table and a panel.
 */

.fact-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-2xs);
	margin: 0;
}

@media (width >= 560px) {
	.fact-list {
		grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	}
}

.fact-list__row {
	display: flex;
	flex-direction: column;
	padding: var(--tile-pad);
	background-color: var(--tile-bg);
	border: var(--tile-border);
	border-radius: var(--tile-radius);
}

.fact-list dt {
	margin-block-end: var(--space-3xs);
	font-family: var(--font-body);
	font-size: var(--step--1);
	font-weight: 400;
	line-height: 1.35;
	color: var(--grey-700);
}

.fact-list dd {
	margin: 0;
	font-size: var(--step-ui);
	font-weight: 400;
	line-height: 1.4;
	overflow-wrap: anywhere;
	text-wrap: pretty;
}

/* --------------------------------------------------------------------------
 * 5. Unit types and floor plans
 * ----------------------------------------------------------------------- */

.place-units__group + .place-units__group {
	margin-block-start: var(--space-l);
}

.place-units__beds {
	margin-block-end: var(--space-s);
	font-size: var(--step-1);
}

.place-units__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: var(--space-m);
}

.unit-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-m);
	background-color: var(--color-bg);
	overflow: hidden;
}

.unit-card__plan {
	display: block;
	background-color: var(--color-surface);
}

.unit-card__plan .media--empty {
	inline-size: 100%;
	aspect-ratio: 4 / 3;
}

.unit-card__plan .media,
.unit-card__plan img {
	display: block;
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
}

.unit-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--space-2xs);
	padding: var(--space-s);
}

.unit-card__name {
	margin: 0;
	font-size: var(--step-0);
}

.unit-card__facts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-s);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--step--1);
	color: var(--grey-700);
}

.unit-card__facts li {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
}

.unit-card__price {
	margin: 0;
	font-family: var(--font-heading);
	font-weight: 700;
}

.unit-card__download {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
	margin-block-start: auto;
	font-size: var(--step--1);
}

/* --------------------------------------------------------------------------
 * 6. Downloads
 * ----------------------------------------------------------------------- */

.doc-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.doc-list__item {
	display: flex;
	align-items: center;
	gap: var(--space-s);
	padding-block: var(--space-xs);
	border-block-end: 1px solid var(--color-border);
}

.doc-list__label {
	flex: 1;
}

/* --------------------------------------------------------------------------
 * 7. Homes tabs
 * ----------------------------------------------------------------------- */

.place-homes__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2xs);
	margin-block-end: var(--space-m);
}

/*
 * The tab strip ships hidden and place.js reveals it. A display rule on the
 * class would otherwise beat the user agent's [hidden] rule and leave dead
 * buttons on the page when the script does not run.
 */
.place-homes__tabs[hidden] {
	display: none;
}

.place-homes__tab {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
	padding: 0.5rem 1rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	background-color: var(--color-bg);
	color: var(--grey-700);
	font-family: var(--font-heading);
	font-size: var(--step--1);
	font-weight: 600;
	cursor: pointer;
}

.place-homes__tab[aria-selected="true"] {
	border-color: var(--navy-900);
	background-color: var(--navy-900);
	color: var(--color-text-invert);
}

.place-homes__count {
	padding-inline: 0.4rem;
	border-radius: var(--radius-pill);
	background-color: rgb(17 17 17 / 8%);
	font-size: var(--step--1);
}

.place-homes__tab[aria-selected="true"] .place-homes__count {
	background-color: rgb(255 255 255 / 20%);
}

.place-homes__heading {
	display: flex;
	align-items: center;
	gap: var(--space-2xs);
	font-size: var(--step-1);
}

.place-homes__panel + .place-homes__panel {
	margin-block-start: var(--space-l);
}

.place-homes__all {
	margin-block-start: var(--space-m);
}

.card-grid--tight {
	grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

/* --------------------------------------------------------------------------
 * 8. Amenities
 * ----------------------------------------------------------------------- */

.amenity-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: var(--space-m);
	margin: 0;
	padding: 0;
	list-style: none;
}

.amenity {
	display: flex;
	gap: var(--space-2xs);
}

.amenity .icon {
	flex: 0 0 auto;
	margin-block-start: 0.2em;
	color: var(--azure-700);
}

.amenity__name {
	margin: 0;
	font-family: var(--font-heading);
	font-weight: 600;
}

.amenity__note {
	margin: 0;
	font-size: var(--step--1);
	color: var(--grey-700);
}

/* --------------------------------------------------------------------------
 * 9. Location and nearby
 * ----------------------------------------------------------------------- */

.place-map {
	display: flex;
	align-items: center;
	justify-content: center;
	block-size: 22rem;
	border-radius: var(--radius-l);
	background-color: var(--color-surface);
	overflow: hidden;
}

.place-map .leaflet-container {
	inline-size: 100%;
	block-size: 100%;
}

.place-map__fallback {
	margin-block-start: var(--space-2xs);
	font-size: var(--step--1);
}

.place-location__subtitle {
	margin-block-start: var(--space-l);
	font-size: var(--step-1);
}

.nearby-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nearby {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--space-2xs) var(--space-s);
	padding-block: var(--space-xs);
	border-block-end: 1px solid var(--color-border);
}

.nearby__main {
	flex: 1 1 14rem;
}

.nearby__name {
	font-family: var(--font-heading);
	font-weight: 600;
}

.nearby__type {
	margin-inline-start: var(--space-2xs);
	font-size: var(--step--1);
	color: var(--grey-700);
}

.nearby__distance {
	font-variant-numeric: tabular-nums;
	color: var(--grey-700);
}

.nearby__links {
	display: inline-flex;
	gap: var(--space-2xs);
	font-size: var(--step--1);
}

/* --------------------------------------------------------------------------
 * 10. Market snapshot
 * ----------------------------------------------------------------------- */

/*
 * Three equal tiles, one per figure, collapsing to a single column on a phone.
 * The tile itself carries the tint, so there is no panel behind the tiles and
 * no second border around the first: see the `--tile-*` tokens in tokens.css.
 */

.market-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-2xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (width >= 720px) {
	.market-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.market-grid__item {
	display: flex;
	flex-direction: column;
	padding: var(--tile-pad);
	background-color: var(--tile-bg);
	border: var(--tile-border);
	border-radius: var(--tile-radius);
}

.market-grid__label {
	display: block;
	margin-block-end: var(--space-3xs);
	font-size: var(--step--2);
	line-height: 1.35;
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
	color: var(--grey-700);
}

/*
 * The body face at reading size. A service charge reads "AED 14 per sqft per
 * year", which is a sentence, not a headline, so it wraps rather than pushing
 * the tile wider.
 */
.market-grid__value {
	display: block;
	font-family: var(--font-body);
	font-size: var(--step-0);
	font-weight: 500;
	line-height: 1.4;
	color: var(--navy-900);
	overflow-wrap: anywhere;
	text-wrap: pretty;
}

.developer-card {
	padding: var(--space-l);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-l);
}

.developer-card__name {
	margin: 0;
	font-family: var(--font-heading);
	font-size: var(--step-2);
	font-weight: 700;
}

.developer-card__text {
	max-inline-size: var(--measure);
}
/*
 * WayHome: lead forms.
 *
 * Only what the theme's components.css does not already cover. Field, label,
 * hint, error, reference, required marker and button styling come from the
 * theme; this file adds the layout, the honeypot, the choice rows, the notices
 * and the dialog. Every custom property carries a fallback, so a form still
 * looks right if it is rendered on a page that has not loaded tokens.css.
 *
 * This sheet is enqueued after the theme's bundle, so anything declared here at
 * the same specificity wins. Nothing the theme is meant to own may be set here.
 */

.wh-form-wrap {
	display: flow-root;
	max-width: 46rem;
}

.wh-form__title {
	margin: 0 0 var(--space-2xs, 0.5rem);
	font-family: var(--font-heading, system-ui, sans-serif);
	line-height: var(--lh-heading, 1.2);
}

.wh-form__intro {
	margin: 0 0 var(--space-m, 1.5rem);
	color: var(--color-text-muted, #484848);
}

.wh-form {
	display: flex;
	flex-direction: column;
	gap: var(--wh-form-gap, 0.75rem);
}

.wh-form__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wh-form-gap, 0.75rem);
}

@media (min-width: 40em) {
	.wh-form__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wh-form__grid > .field {
		grid-column: 1 / -1;
	}

	.wh-form__grid > .field--half {
		grid-column: auto;
	}
}

.wh-form-wrap--compact .wh-form__grid {
	grid-template-columns: 1fr;
}

/* The theme styles .field; these only fill the gaps. */

.field--checkbox_group {
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.field__error[hidden] {
	display: none;
}

.field__error::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 1.1em;
	block-size: 1.1em;
	margin-inline-end: 0.35em;
	font-weight: 700;
	color: var(--white, #fff);
	background-color: var(--coral-700, #c63b40);
	border-radius: var(--radius-pill, 999px);
}

/* --- Choices ----------------------------------------------------------- */

.wh-choices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: var(--space-2xs, 0.5rem);
	margin-block-start: var(--space-3xs, 0.25rem);
}

.wh-choice {
	display: flex;
	align-items: flex-start;
	gap: var(--space-2xs, 0.5rem);
	padding: var(--space-2xs, 0.5rem);
	line-height: var(--lh-ui, 1.35);
	border-radius: var(--radius-m, 8px);
	cursor: pointer;
}

.wh-choice:hover {
	background-color: var(--grey-100, #f7f7f7);
}

.wh-choice input[type="checkbox"] {
	inline-size: 1.25rem;
	block-size: 1.25rem;
	min-block-size: 0;
	margin-block-start: 0.15em;
	flex: none;
	accent-color: var(--coral-700, #c63b40);
}

.field--consent {
	font-size: var(--step--1, 0.875rem);
}

.field--consent .wh-choice {
	padding-inline: 0;
}

.field--consent .wh-choice:hover {
	background-color: transparent;
}

/* --- Honeypot ----------------------------------------------------------
 * Off screen rather than display:none, because the simplest bots skip
 * anything that is display none and fill everything else.
 * -------------------------------------------------------------------- */

.wh-hp {
	position: absolute !important;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- Reference row -------------------------------------------------------
 * A quiet line of context, not a highlighted panel. The theme sets the size
 * and the colour; only the line-up belongs here.
 * ---------------------------------------------------------------------- */

.wh-form__ref {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3xs, 0.25rem);
	align-items: baseline;
	margin: 0;
}

/* --- Actions, status, notices ------------------------------------------- */

.wh-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-s, 1rem);
	align-items: center;
}

.wh-form__busy {
	font-size: var(--step--1, 0.875rem);
	color: var(--color-text-muted, #484848);
}

.wh-form__busy[hidden] {
	display: none;
}

.wh-form__status:empty {
	display: none;
}

.wh-form__notice,
.wh-form__status:not(:empty) {
	padding: var(--space-xs, 0.75rem) var(--space-s, 1rem);
	margin-block-end: var(--space-m, 1.5rem);
	background-color: var(--color-bg-alt, #eef8fb);
	border-inline-start: 4px solid var(--sky-700, #0b6a7e);
	border-radius: var(--radius-s, 4px);
}

.wh-form__notice--error,
.wh-form__status--error {
	border-inline-start-color: var(--coral-700, #c63b40);
}

.wh-form__done[hidden] {
	display: none;
}

.wh-form__done {
	padding: var(--space-s, 1rem);
	background-color: var(--color-bg-alt, #eef8fb);
	border-inline-start: 4px solid var(--sky-700, #0b6a7e);
	border-radius: var(--radius-s, 4px);
}

.wh-form__done p {
	margin: 0 0 var(--space-2xs, 0.5rem);
}

.wh-form__done p:last-child {
	margin-block-end: 0;
}

.wh-form[data-wayhome-busy="true"] {
	opacity: 0.6;
	pointer-events: none;
}

.wh-form__turnstile {
	min-block-size: 65px;
}

/* --- Dialog ------------------------------------------------------------- */

.wh-dialog {
	inline-size: min(34rem, calc(100vw - 2rem));
	padding: 0;
	color: var(--color-text, #111);
	background-color: var(--color-bg, #fff);
	border: 1px solid var(--color-border, #ebebeb);
	border-radius: var(--radius-l, 16px);
	box-shadow: var(--shadow-2, 0 12px 32px rgb(17 17 17 / 18%));
}

.wh-dialog::backdrop {
	background-color: rgb(17 17 17 / 55%);
}

.wh-dialog__inner {
	position: relative;
	padding: var(--space-l, 2rem);
}

.wh-dialog__close {
	position: absolute;
	inset-block-start: var(--space-2xs, 0.5rem);
	inset-inline-end: var(--space-2xs, 0.5rem);
}

.wh-dialog .wh-form-wrap {
	max-width: none;
}

@media (prefers-reduced-motion: reduce) {
	.wh-form,
	.wh-choice {
		transition: none;
	}
}