.project-location,
.project-location-dialog {
	--project-location-chip-bg: var(--global-palette4);
	--project-location-chip-height: 47px;
}

.project-location {
	--project-location-trigger-inset-x: 10px;
	position: relative;
}

@media screen and (max-width: 1024px) {
	.project-location {
		--project-location-trigger-inset-x: calc(-1 * var(--global-content-edge-padding));
	}
}

.project-location__trigger,
.project-location-dialog__toggle {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	min-height: var(--project-location-chip-height);
	margin: 0;
	padding: 5px 16px;
	border: 0;
	border-radius: 0;
	background: var(--project-location-chip-bg);
	box-shadow: none;
	color: var(--global-palette9);
	font-family: var(--global-body-font-family);
	font-size: 1rem;
	font-style: normal;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.2;
	text-align: left;
	text-transform: none;
	min-height: clamp(2.9375rem, 1.9884rem + 1.4815vw, 3.5625rem);
}

.project-location__trigger:hover,
.project-location__trigger:focus,
.project-location__trigger:active,
.project-location-dialog__toggle:hover,
.project-location-dialog__toggle:focus,
.project-location-dialog__toggle:active {
	background: var(--project-location-chip-bg);
	box-shadow: none;
	color: var(--global-palette9);
}

.project-location__trigger {
	width: auto;
	margin: 0 var(--project-location-trigger-inset-x);
}

@media screen and (max-width: 1024px) {
	.project-location__trigger {
		width: calc(100% - 2 * var(--project-location-trigger-inset-x));
	}
	.project-location__trigger,
	.project-location-dialog__toggle {
		min-height: 44px;

	}
}

.project-location__icon {
	flex: 0 0 auto;
}

.project-location__icon--chevron {
	transition: transform 0.2s ease;
}

.project-location__trigger[aria-expanded="true"] .project-location__icon--chevron,
.project-location-dialog__toggle[aria-expanded="true"] .project-location__icon--chevron {
	transform: rotate(180deg);
}

.project-location__trigger-text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

@media screen and (max-width: 1024px) {
	.project-location__trigger-text {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

.project-location__trigger-label {
	color: var(--global-palette6);
	font-size: 1rem;
	line-height: 1.1;
	white-space: nowrap;
}

.project-location__trigger-value {
	max-width: 12ch;
	overflow: hidden;
	color: var(--global-palette9);
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.project-location-dialog {
	--project-location-error-color: #ffb4a9;
	--project-location-gutter-x: 40px;
	--project-location-gutter-y: 16px;
	--project-location-viewport-gutter: 16px;
	position: fixed;
	inset: 0;
	z-index: 100;
}

.project-location-dialog[hidden] {
	display: none;
}

.project-location-dialog.is-anchored {
	position: absolute;
	inset: 0 0 auto;
}

.project-location-dialog__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
	z-index: 100;
}

.project-location-dialog__panel {
	position: fixed;
	top: var(--project-location-viewport-gutter);
	right: 0;
	left: 0;
	z-index: 100;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: fit-content;
	min-height: 0;
	max-width: calc(100vw - 2 * var(--project-location-viewport-gutter));
	max-height: calc(100vh - 2 * var(--project-location-viewport-gutter));
	max-height: calc(100dvh - 2 * var(--project-location-viewport-gutter));
	margin: 0 auto;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: var(--project-location-gutter-y) var(--project-location-gutter-x);
	background: var(--global-palette3);
	color: var(--global-palette9);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.project-location-dialog.is-anchored .project-location-dialog__panel {
	position: absolute;
	top: calc(-1 * var(--project-location-gutter-y));
	right: calc(var(--project-location-trigger-inset-x) - var(--project-location-gutter-x));
	left: calc(var(--project-location-trigger-inset-x) - var(--project-location-gutter-x));
	width: auto;
	max-width: none;
	max-height: calc(100vh - var(--project-location-anchor-top, 0px) + var(--project-location-gutter-y) - var(--project-location-viewport-gutter));
	max-height: calc(100dvh - var(--project-location-anchor-top, 0px) + var(--project-location-gutter-y) - var(--project-location-viewport-gutter));
	margin: 0;
}

.project-location-dialog__toggle {
	flex: 0 0 auto;
	width: 100% !important;
	transition: none;
	margin: 0 !important;
}

@media screen and (max-width: 1024px) {
	.project-location-dialog__panel {
		top: 0;
		width: 100%;
		max-width: none;
		padding: 0 20px 20px;
	}

	.project-location-dialog.is-anchored .project-location-dialog__panel {
		top: 0;
		right: var(--project-location-trigger-inset-x);
		left: var(--project-location-trigger-inset-x);
		max-height: calc(100vh - var(--project-location-anchor-top, 0px) - var(--project-location-viewport-gutter));
		max-height: calc(100dvh - var(--project-location-anchor-top, 0px) - var(--project-location-viewport-gutter));
	}

	.project-location-dialog__toggle {
		width: calc(100% + 40px) !important;
		margin: 0 -20px !important;
	}
}

@media screen and (max-width: 768px) and (orientation: landscape) {
	.project-location-dialog__panel {
		max-height: unset;
		height: 100dvh;
	}
}

.project-location-form {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	gap: 12px;
	margin: 0;
	padding: 20px 0 0;
}

.project-location-form__label {
	color: var(--global-palette9);
	font-family: var(--global-body-font-family);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
}

.project-location-dialog .project-location-form__input {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	min-height: 54px;
	padding: 10px;
	border: 1px solid var(--global-palette4);
	border-radius: 0;
	background: var(--global-palette9);
	box-shadow: none;
	color: var(--global-palette3);
	font-family: var(--global-body-font-family);
	font-size: 1rem;
	line-height: 1.5;
}

.project-location-dialog .project-location-form__input::placeholder {
	color: var(--global-palette5);
}

.project-location-dialog .project-location-form__input:focus {
	border-color: var(--global-palette4);
	box-shadow: none;
	color: var(--global-palette3);
	outline: 2px solid var(--global-palette2);
	outline-offset: 2px;
}

.project-location-form__error {
	margin: 0;
	color: var(--project-location-error-color);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
}

.project-location-form__save {
	width: 100%;
	min-height: var(--project-location-chip-height);
	margin: 8px 0;
	padding: 12px 16px;
	border: 2px solid var(--global-palette2);
	border-radius: 0;
	font-family: var(--global-heading-font-family);
	font-size: clamp(1rem, 0.7rem + 0.8vw, 1.5rem);
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	background-color: var(--global-palette2);
	color: var(--global-palette3);
	box-shadow: none;
}

.project-location-form__save:hover,
.project-location-form__save:focus,
.project-location-form__save:active {
	background: var(--global-palette1);
	color: var(--global-palette9);
	border-color: var(--global-palette1);
}

.project-location-form__clear,
.project-location-form__clear:hover,
.project-location-form__clear:focus,
.project-location-form__clear:active {
	background: transparent;
	box-shadow: none;
	color: var(--global-palette6);
}

.project-location-form__clear {
	align-self: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	font-family: var(--global-body-font-family);
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.3;
	text-decoration: underline;
	text-transform: none;
}

.project-location-form__clear:hover {
	color: var(--global-palette9);
	text-underline-offset: 2px;
}

html.project-location-open {
	overflow: hidden;
	scrollbar-gutter: stable;
}

.project-location-zip,
.project-location-zip:hover,
.project-location-zip:focus,
.project-location-zip:active {
	background: transparent;
	box-shadow: none;
	color: inherit;
}

.project-location-zip {
	display: inline;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	font: inherit;
	letter-spacing: inherit;
	text-decoration: underline;
	text-transform: none;
	cursor: pointer;
}

.project-location-zip:focus-visible {
	outline: 2px solid var(--global-palette2);
	outline-offset: 2px;
}

.project-location-form__field {
	position: relative;
}

.project-location-dialog .project-location-form__field--locate .project-location-form__input {
	padding-right: 44px;
}

.project-location-form__locate,
.project-location-form__locate:hover,
.project-location-form__locate:focus,
.project-location-form__locate:active {
	background: transparent;
	box-shadow: none;
	color: var(--global-palette3);
}

.project-location-form__locate {
	position: absolute;
	top: 8px;
	right: 4px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.project-location-form__locate[hidden],
.project-location-form__suggestions[hidden] {
	display: none;
}

.project-location-form__locate:focus-visible {
	outline: 2px solid var(--global-palette2);
	outline-offset: 0;
}

.project-location-form__locate.is-locating svg {
	animation: project-location-locating 1s ease-in-out infinite;
}

@keyframes project-location-locating {
	50% {
		opacity: 0.35;
	}
}

@media (prefers-reduced-motion: reduce) {
	.project-location-form__locate.is-locating svg {
		animation: none;
		opacity: 0.5;
	}
}

.project-location-form__suggestions {
	position: relative;
	z-index: 2;
	top: 100%;
	left: 0;
	width: 100%;
	border: 1px solid var(--global-palette4);
	border-top: 0;
	background: var(--global-palette9);
}

.project-location-form__suggestions ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.project-location-form__suggestions [role="option"] {
	padding: 10px;
	color: var(--global-palette3);
	font-family: var(--global-body-font-family);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
	cursor: pointer;
}

.project-location-form__suggestions [role="option"]:hover,
.project-location-form__suggestions [aria-selected="true"] {
	background: var(--global-palette4);
	color: var(--global-palette9);
}

.project-location-form__suggestions img {
	display: block;
	max-width: 60px;
	margin: 6px 10px;
}