/*
 * OG Trotter Homes (/homes/). Loaded only on Homes pages, after the theme's
 * site.css, and built from its tokens and components (cards, buttons, fields).
 */

/* Photo gallery and optional 360° tour share one media viewer. */
.ogt-home-gallery__main iframe,
.ogt-home-gallery__main video {
	border: 0;
	display: block;
	height: 100%;
	width: 100%;
}

.ogt-home-gallery__tour-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 10px;
	min-height: 38px;
}

.ogt-home-gallery__tour-actions[hidden] {
	display: none;
}

.ogt-home-gallery__tour-thumb {
	background: var(--ogt-ink);
	position: relative;
}

.ogt-home-gallery__tour-thumb img,
.ogt-home-gallery__tour-placeholder {
	display: block;
	height: 64px;
	object-fit: cover;
	width: 88px;
}

.ogt-home-gallery__tour-placeholder {
	background: linear-gradient(135deg, var(--ogt-ink), var(--ogt-brand));
}

.ogt-home-gallery__tour-thumb::after {
	background: linear-gradient(transparent, rgba(0, 0, 0, .7));
	content: '';
	inset: 0;
	position: absolute;
}

.ogt-home-gallery__play {
	align-items: center;
	background: rgba(5, 12, 24, .78);
	border: 1px solid rgba(255, 255, 255, .75);
	border-radius: 50%;
	color: #fff;
	display: flex;
	font-size: 13px;
	height: 34px;
	justify-content: center;
	left: 50%;
	line-height: 1;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 34px;
	z-index: 1;
}

.ogt-home-gallery__tour-label {
	bottom: 4px;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	left: 5px;
	position: absolute;
	z-index: 1;
}

.ogt-home-gallery__empty {
	align-items: center;
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
	justify-content: center;
	text-decoration: none;
}

.ogt-home-gallery__empty .ogt-home-gallery__play {
	position: static;
	transform: none;
}

/* Directory filters */

.ogt-homes-filters {
	align-items: end;
	background: var(--ogt-white);
	border: 1px solid var(--ogt-line);
	border-radius: var(--ogt-r-lg);
	box-shadow: var(--ogt-shadow-sm);
	display: grid;
	gap: 14px 16px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-bottom: clamp(28px, 4vw, 44px);
	padding: clamp(16px, 2.4vw, 24px);
}

.ogt-homes-filters .ogt-field,
.ogt-homes-filters__price {
	min-width: 0;
}

.ogt-homes-filters select {
	padding-right: 40px;
	text-overflow: ellipsis;
}

.ogt-homes-filters .ogt-field:nth-of-type(3) {
	grid-column: 1 / -1;
}

.ogt-homes-filters__price {
	border: 0;
	grid-column: 1 / -1;
	margin: 0;
	padding: 0;
}

.ogt-homes-filters__price legend {
	color: var(--ogt-ink);
	font-size: 14.5px;
	font-weight: 600;
	margin-bottom: 7px;
	padding: 0;
}

.ogt-homes-filters__price > div {
	align-items: center;
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.ogt-homes-filters__submit {
	grid-column: 1 / -1;
}

.ogt-homes-filters__submit .ogt-btn {
	justify-content: center;
	margin: 0;
	width: 100%;
}

@media (min-width: 760px) {
	.ogt-homes-filters {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ogt-homes-filters .ogt-field:nth-of-type(3) {
		grid-column: auto;
	}

	.ogt-homes-filters__price {
		grid-column: span 2;
	}

	.ogt-homes-filters__submit {
		grid-column: auto;
	}
}

@media (min-width: 1180px) {
	.ogt-homes-filters {
		grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr) minmax(0, .9fr) auto;
	}

	.ogt-homes-filters__price {
		grid-column: auto;
	}
}

.ogt-homes-dir__bar {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	justify-content: space-between;
	margin-bottom: 24px;
}

.ogt-homes-dir__count {
	color: var(--ogt-ink);
	font-family: var(--ogt-display);
	font-size: clamp(20px, 2.2vw, 24px);
	font-weight: 800;
	letter-spacing: -.01em;
	margin: 0;
}

.ogt-homes-dir__count span {
	color: var(--ogt-muted);
	font-family: var(--ogt-text);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0;
}

.ogt-homes-dir__clear {
	color: var(--ogt-brand-700);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ogt-homes-empty p {
	margin: 0 auto 10px;
	max-width: 620px;
}

.ogt-homes-empty .ogt-actions {
	justify-content: center;
	margin-top: 20px;
}

/* With JavaScript the results update as soon as a filter changes. */
.ogt-homes-filters.is-live .ogt-homes-filters__submit {
	display: none;
}

@media (max-width: 759px) {
	.ogt-homes-filters.is-live .ogt-field:nth-of-type(4) {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1180px) {
	.ogt-homes-filters.is-live {
		grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr) minmax(0, 1fr);
	}
}

.ogt-homes-dir__results {
	transition: opacity .2s;
}

.ogt-homes-dir__results.is-loading {
	opacity: .45;
	pointer-events: none;
}

.ogt-homes-dir__count:focus {
	outline: none;
}

/* Cards */

.ogt-home-card__facts {
	color: var(--ogt-body);
	font-size: 14.5px;
}

.ogt-home-card__price strong {
	font-size: 18px;
}

.ogt-home-card__avail {
	color: var(--ogt-brand-700);
	font-size: 13.5px;
	font-weight: 600;
}

.ogt-home-card.is-unavailable .ogt-card__media img {
	filter: grayscale(.6);
	opacity: .8;
}

.ogt-card__link:focus-visible {
	border-radius: var(--ogt-r-lg);
	outline: 3px solid var(--ogt-brand);
	outline-offset: 4px;
}

/* General request */

.ogt-homes-request__grid {
	display: grid;
	gap: clamp(28px, 4vw, 56px);
}

@media (min-width: 960px) {
	.ogt-homes-request__grid {
		align-items: start;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	}

	.ogt-homes-request__intro {
		position: sticky;
		top: calc(var(--ogt-header) + 32px);
	}
}

.ogt-homes-request__intro .ogt-lead {
	margin-top: 16px;
}

/* Listing page */

.ogt-home__head {
	padding: clamp(24px, 4vw, 48px) 0 clamp(20px, 3vw, 32px);
}

.ogt-home__title {
	display: grid;
	gap: 16px 32px;
	margin-top: 16px;
}

@media (min-width: 860px) {
	.ogt-home__title {
		align-items: end;
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

.ogt-home__title .ogt-card__kicker {
	display: block;
	margin: 0 0 8px;
}

.ogt-home__title .ogt-h1 {
	overflow-wrap: anywhere;
}

.ogt-home__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
}

.ogt-home__badge {
	background: var(--ogt-brand-50);
	border-radius: 999px;
	color: var(--ogt-brand-700);
	font-size: 13.5px;
	font-weight: 600;
	padding: 5px 12px;
}

.ogt-home__badge--unavailable {
	background: #FFF1D6;
	color: #7A4B00;
}

.ogt-home__price p {
	margin: 0;
}

.ogt-home__price strong {
	color: var(--ogt-ink);
	font-family: var(--ogt-display);
	font-size: clamp(30px, 3.4vw, 40px);
	font-weight: 800;
	letter-spacing: -.02em;
}

@media (min-width: 860px) {
	.ogt-home__price {
		text-align: right;
	}
}

.ogt-home__small {
	color: var(--ogt-muted);
	font-size: 14.5px;
	margin: 4px 0 0;
}

.ogt-home-gallery__main {
	aspect-ratio: 16 / 9;
	background: var(--ogt-soft);
	border-radius: var(--ogt-r-lg);
	margin: 0;
	overflow: hidden;
}

.ogt-home-gallery__main img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.ogt-home-gallery__thumbs {
	display: flex;
	gap: 10px;
	list-style: none;
	margin: 12px 0 0;
	overflow-x: auto;
	padding: 4px 2px 8px;
	scroll-snap-type: x proximity;
}

.ogt-home-gallery__thumbs li {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.ogt-home-gallery__thumbs a {
	border: 2px solid transparent;
	border-radius: var(--ogt-r-sm);
	display: block;
	overflow: hidden;
}

.ogt-home-gallery__thumbs a[aria-current="true"] {
	border-color: var(--ogt-brand);
}

.ogt-home-gallery__thumbs a:focus-visible {
	outline: 3px solid var(--ogt-brand);
	outline-offset: 2px;
}

.ogt-home-gallery__thumbs img {
	display: block;
	height: 64px;
	object-fit: cover;
	width: 88px;
}

.ogt-home__layout {
	display: grid;
	gap: clamp(32px, 5vw, 64px);
}

@media (min-width: 1024px) {
	.ogt-home__layout {
		align-items: start;
		grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
	}

	.ogt-home__aside {
		position: sticky;
		top: calc(var(--ogt-header) + 20px);
	}
}

.ogt-home__main {
	min-width: 0;
}

.ogt-home__main > * + * {
	margin-top: clamp(32px, 4vw, 44px);
}

.ogt-home__main .ogt-h3 {
	margin-bottom: 14px;
}

.ogt-home__sub {
	color: var(--ogt-ink);
	font-size: 16px;
	font-weight: 700;
	margin: 18px 0 6px;
}

.ogt-home__facts {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
}

@media (min-width: 640px) {
	.ogt-home__facts {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.ogt-home__facts div {
	background: var(--ogt-white);
	border: 1px solid var(--ogt-line);
	border-radius: var(--ogt-r-sm);
	padding: 12px 14px;
}

.ogt-home__facts dt {
	color: var(--ogt-muted);
	font-size: 13px;
}

.ogt-home__facts dd {
	color: var(--ogt-ink);
	font-weight: 700;
	margin: 2px 0 0;
	overflow-wrap: anywhere;
}

.ogt-home__amenities {
	columns: 2 220px;
}

.ogt-home__notice {
	background: #FFF7E6;
	border: 1px solid #F3D9A4;
	border-radius: var(--ogt-r);
	color: var(--ogt-ink);
	padding: 16px 20px;
}

.ogt-home__notice p {
	margin: 0;
}

.ogt-home__verified {
	align-items: flex-start;
	border-top: 1px solid var(--ogt-line);
	color: var(--ogt-muted);
	display: flex;
	font-size: 14.5px;
	gap: 10px;
	padding-top: 20px;
}

.ogt-home__verified .ogt-icon {
	color: var(--ogt-brand);
	flex: 0 0 auto;
}

.ogt-home__form .ogt-h3 {
	margin: 0;
}

.ogt-home__form .ogt-home__small {
	margin-bottom: 18px;
}
