/**
 * Homepage mobile search drawer styles (max-width: 991px only).
 *
 * @package Havenlytics_Realty
 */

body.hvn-theme-home.hvn-theme-home-msd-no-scroll {
	overflow: hidden;
	height: 100%;
}

body.hvn-theme-home .hvn-theme-home-msd-root {
	--hvn-theme-home-msd-primary: var(--hvn-theme-deep, #1f3a3a);
	--hvn-theme-home-msd-primary-light: var(--hvn-theme-deep-soft, #2a4c4a);
	--hvn-theme-home-msd-gold: var(--hvn-theme-gold, #a9803f);
	--hvn-theme-home-msd-text: var(--hvn-theme-ink, #151a1f);
	--hvn-theme-home-msd-muted: var(--hvn-theme-ink-soft, #3c454c);
	--hvn-theme-home-msd-border: var(--hvn-theme-line, #e3dccd);
	--hvn-theme-home-msd-glass-bg: rgba(255, 255, 255, 0.72);
	--hvn-theme-home-msd-glass-border: rgba(255, 255, 255, 0.55);
}

body.hvn-theme-home .hvn-theme-home-msd-scrim {
	position: fixed;
	inset: 0;
	background: rgba(8, 10, 9, 0.4);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
	z-index: 1180;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

body.hvn-theme-home .hvn-theme-home-msd-scrim.hvn-theme-home-msd-scrim-visible {
	opacity: 1;
	pointer-events: auto;
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: calc(var(--hvn-theme-home-msd-bottom-offset, 16px) + env(safe-area-inset-bottom));
	z-index: 1200;
	opacity: 0;
	transform: translate3d(0, 36px, 0) scale(0.94);
	transition:
		opacity var(--hvn-theme-home-msd-anim-duration, 460ms) var(--hvn-theme-home-msd-ease-dock, cubic-bezier(0.22, 1, 0.36, 1)),
		transform calc(var(--hvn-theme-home-msd-anim-duration, 460ms) * 1.13) var(--hvn-theme-home-msd-ease-spring, cubic-bezier(0.22, 1.12, 0.32, 1)),
		left 0.42s var(--hvn-theme-home-msd-ease-dock, cubic-bezier(0.22, 1, 0.36, 1)),
		right 0.42s var(--hvn-theme-home-msd-ease-dock, cubic-bezier(0.22, 1, 0.36, 1)),
		bottom 0.42s var(--hvn-theme-home-msd-ease-dock, cubic-bezier(0.22, 1, 0.36, 1));
	will-change: transform, opacity;
	pointer-events: none;
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap.hvn-theme-home-msd-dock-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0) scale(1);
	pointer-events: auto;
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap.hvn-theme-home-msd-drawer-open {
	left: 0;
	right: 0;
	bottom: 0;
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap.hvn-theme-home-msd-dragging {
	transition: none !important;
}

body.hvn-theme-home .hvn-theme-home-msd-dock {
	background: var(--hvn-theme-home-msd-glass-bg);
	border: 1px solid var(--hvn-theme-home-msd-glass-border);
	border-radius: 30px;
	box-shadow: 0 18px 45px rgba(20, 30, 25, 0.22), 0 2px 8px rgba(20, 30, 25, 0.08);
	backdrop-filter: blur(22px) saturate(160%);
	-webkit-backdrop-filter: blur(22px) saturate(160%);
	padding: 12px;
	transition: border-radius 0.4s cubic-bezier(0.22, 1, 0.36, 1), padding 0.4s ease, background 0.3s ease, box-shadow 0.4s ease;
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap.hvn-theme-home-msd-drawer-open .hvn-theme-home-msd-dock {
	border-radius: 0;
	background: rgba(255, 255, 255, 0.94);
	padding: 10px 16px 12px;
	box-shadow: none;
	border-bottom: 1px solid var(--hvn-theme-home-msd-border);
}

body.hvn-theme-home .hvn-theme-home-msd-pills-scroll {
	position: relative;
}

body.hvn-theme-home .hvn-theme-home-msd-pills-fade {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 28px;
	pointer-events: none;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.22s ease;
}

body.hvn-theme-home .hvn-theme-home-msd-pills-fade--start {
	left: 0;
	background: linear-gradient(to right, var(--hvn-theme-home-msd-fade-bg, rgba(255, 255, 255, 0.92)), transparent);
}

body.hvn-theme-home .hvn-theme-home-msd-pills-fade--end {
	right: 0;
	background: linear-gradient(to left, var(--hvn-theme-home-msd-fade-bg, rgba(255, 255, 255, 0.92)), transparent);
}

body.hvn-theme-home .hvn-theme-home-msd-pills-scroll.hvn-theme-home-msd-can-scroll-start .hvn-theme-home-msd-pills-fade--start,
body.hvn-theme-home .hvn-theme-home-msd-pills-scroll.hvn-theme-home-msd-can-scroll-end .hvn-theme-home-msd-pills-fade--end {
	opacity: 1;
}

body.hvn-theme-home .hvn-theme-home-msd-pills {
	display: flex;
	gap: var(--hvn-theme-home-msd-dept-gap, 8px);
	overflow-x: auto;
	overflow-y: hidden;
	padding: 2px 4px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scroll-padding-inline: 12px;
}

body.hvn-theme-home .hvn-theme-home-msd-pills::-webkit-scrollbar {
	display: none;
}

body.hvn-theme-home .hvn-theme-home-msd-pill {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border-radius: 999px;
	border: 1.5px solid rgba(28, 28, 30, 0.08);
	background: rgba(255, 255, 255, 0.6);
	color: var(--hvn-theme-home-msd-text);
	font-size: var(--hvn-theme-home-msd-dept-font-size, 13.5px);
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	scroll-snap-align: center;
	scroll-margin-inline: 8px;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: background 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.28s ease, border-color 0.28s ease, transform 0.22s cubic-bezier(0.34, 1.4, 0.4, 1), box-shadow 0.28s ease;
}

body.hvn-theme-home .hvn-theme-home-msd-pill svg {
	flex-shrink: 0;
}

body.hvn-theme-home .hvn-theme-home-msd-pill.hvn-theme-home-msd-pill-active {
	background: var(--hvn-theme-home-msd-active-bg, var(--hvn-theme-home-msd-primary));
	border-color: var(--hvn-theme-home-msd-active-bg, var(--hvn-theme-home-msd-primary));
	color: var(--hvn-theme-home-msd-active-text, #fff);
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(31, 58, 58, 0.32);
}

body.hvn-theme-home .hvn-theme-home-msd-drawer {
	background: rgba(255, 255, 255, 0.97);
	backdrop-filter: blur(28px) saturate(160%);
	-webkit-backdrop-filter: blur(28px) saturate(160%);
	border-radius: 0 0 28px 28px;
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.36s ease;
	display: flex;
	flex-direction: column;
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap.hvn-theme-home-msd-drawer-open .hvn-theme-home-msd-drawer {
	max-height: var(--hvn-theme-home-msd-max-height, 70vh);
	opacity: 1;
	border-radius: 0;
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap.hvn-theme-home-msd-drawer-open {
	box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.3);
	border-radius: 26px 26px 0 0;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.97);
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap.hvn-theme-home-msd-drawer-open .hvn-theme-home-msd-dock {
	border-radius: 26px 26px 0 0;
}

body.hvn-theme-home .hvn-theme-home-msd-drag-handle-wrap {
	display: flex;
	justify-content: center;
	padding: 4px 0 2px;
	touch-action: none;
	cursor: grab;
	flex-shrink: 0;
}

body.hvn-theme-home .hvn-theme-home-msd-drag-handle {
	width: 38px;
	height: 5px;
	border-radius: 4px;
	background: #dcdcdd;
}

body.hvn-theme-home .hvn-theme-home-msd-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 20px 12px;
	flex-shrink: 0;
}

body.hvn-theme-home .hvn-theme-home-msd-drawer-header h3 {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

body.hvn-theme-home .hvn-theme-home-msd-drawer-header h3 span {
	color: var(--hvn-theme-home-msd-gold);
}

body.hvn-theme-home .hvn-theme-home-msd-close-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: none;
	background: #f1f2f1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--hvn-theme-home-msd-text);
	flex-shrink: 0;
}

body.hvn-theme-home .hvn-theme-home-msd-close-btn:active {
	background: #e6e7e6;
}

body.hvn-theme-home .hvn-theme-home-msd-form {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

body.hvn-theme-home .hvn-theme-home-msd-drawer-body {
	overflow-y: auto;
	padding: 6px 20px 16px;
	flex: 1;
	min-height: 0;
	-webkit-overflow-scrolling: touch;
	opacity: 0;
	transform: translate3d(0, 10px, 0);
	transition: opacity 0.34s ease 0.1s, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap.hvn-theme-home-msd-drawer-open .hvn-theme-home-msd-drawer-body {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

body.hvn-theme-home .hvn-theme-home-msd-field {
	margin-bottom: 16px;
}

body.hvn-theme-home .hvn-theme-home-msd-field__label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--hvn-theme-home-msd-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 7px;
	padding-left: 2px;
}

body.hvn-theme-home .hvn-theme-home-msd-input-wrap {
	position: relative;
}

body.hvn-theme-home .hvn-theme-home-msd-field input,
body.hvn-theme-home .hvn-theme-home-msd-field select {
	width: 100%;
	padding: 14px;
	border: 1.5px solid var(--hvn-theme-home-msd-border);
	border-radius: 16px;
	font-size: 15px;
	background: #fafaf8;
	color: var(--hvn-theme-home-msd-text);
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.hvn-theme-home .hvn-theme-home-msd-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2383878a' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 40px;
}

body.hvn-theme-home .hvn-theme-home-msd-field input:focus,
body.hvn-theme-home .hvn-theme-home-msd-field select:focus {
	outline: none;
	border-color: var(--hvn-theme-home-msd-gold);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(169, 128, 63, 0.14);
}

body.hvn-theme-home .hvn-theme-home-msd-row2 {
	display: flex;
	gap: 10px;
}

body.hvn-theme-home .hvn-theme-home-msd-row2 .hvn-theme-home-msd-field {
	flex: 1;
}

body.hvn-theme-home .hvn-theme-home-msd-chip-group {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

body.hvn-theme-home .hvn-theme-home-msd-chip {
	padding: 9px 16px;
	border-radius: 999px;
	border: 1.5px solid var(--hvn-theme-home-msd-border);
	background: #fafaf8;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--hvn-theme-home-msd-text);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: all 0.22s ease;
}

body.hvn-theme-home .hvn-theme-home-msd-chip.hvn-theme-home-msd-chip-active {
	background: rgba(169, 128, 63, 0.14);
	border-color: var(--hvn-theme-home-msd-gold);
	color: #8a6c24;
}

body.hvn-theme-home .hvn-theme-home-msd-stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 1.5px solid var(--hvn-theme-home-msd-border);
	border-radius: 16px;
	padding: 6px 10px;
	background: #fafaf8;
}

body.hvn-theme-home .hvn-theme-home-msd-stepper-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1.5px solid var(--hvn-theme-home-msd-border);
	background: #fff;
	font-size: 18px;
	font-weight: 700;
	color: var(--hvn-theme-home-msd-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

body.hvn-theme-home .hvn-theme-home-msd-stepper-btn:active {
	background: #f1f2f1;
}

body.hvn-theme-home .hvn-theme-home-msd-stepper-val {
	font-size: 15px;
	font-weight: 700;
	min-width: 30px;
	text-align: center;
}

body.hvn-theme-home .hvn-theme-home-msd-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

body.hvn-theme-home .hvn-theme-home-msd-drawer-footer {
	padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--hvn-theme-home-msd-border);
	background: rgba(255, 255, 255, 0.98);
	flex-shrink: 0;
	opacity: 0;
	transition: opacity 0.3s ease 0.15s;
}

body.hvn-theme-home .hvn-theme-home-msd-dock-wrap.hvn-theme-home-msd-drawer-open .hvn-theme-home-msd-drawer-footer {
	opacity: 1;
}

body.hvn-theme-home .hvn-theme-home-msd-search-submit {
	width: 100%;
	border: none;
	background: linear-gradient(135deg, var(--hvn-theme-home-msd-primary), var(--hvn-theme-home-msd-primary-light));
	color: #fff;
	padding: 16px;
	border-radius: 18px;
	font-size: 16px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
	box-shadow: 0 10px 24px rgba(31, 58, 58, 0.36);
}

body.hvn-theme-home .hvn-theme-home-msd-search-submit:active {
	transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
	body.hvn-theme-home .hvn-theme-home-msd-dock-wrap,
	body.hvn-theme-home .hvn-theme-home-msd-scrim,
	body.hvn-theme-home .hvn-theme-home-msd-pill,
	body.hvn-theme-home .hvn-theme-home-msd-chip,
	body.hvn-theme-home .hvn-theme-home-msd-drawer,
	body.hvn-theme-home .hvn-theme-home-msd-dock,
	body.hvn-theme-home .hvn-theme-home-msd-drawer-body {
		transition: none !important;
	}
}
