/* PEA Location Map */
.pea-lm {
	--pea-purple: #713066;
	--pea-purple-dark: #4f2147;
	--pea-blue: #3793e4;
	--pea-border: #dedede;
	--pea-bg: #f7f5f8;
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
	grid-template-areas:
		"directions directions"
		"map panel";
	gap: 20px;
	margin: 0 0 30px;
	font-size: 16px;
	line-height: 1.5;
}

.pea-lm__directions {
	grid-area: directions;
	background: var(--pea-bg);
	border: 1px solid var(--pea-border);
	border-radius: 6px;
	padding: 18px 20px;
}

.pea-lm__form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	margin: 0;
}

.pea-lm__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	font-weight: 400;
}

.pea-lm__field--office {
	flex: 0 1 220px;
}

.pea-lm__field--address {
	flex: 1 1 300px;
}

.pea-lm__label {
	font-weight: 600;
	color: #3a3a3a;
	font-size: 15px;
}

.pea-lm__address-wrap {
	position: relative;
	display: flex;
}

.pea-lm .pea-lm__address,
.pea-lm .pea-lm__office {
	width: 100%;
	height: 46px;
	padding: 8px 12px;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
	font-size: 16px;
	color: #222;
	box-sizing: border-box;
}

.pea-lm .pea-lm__address {
	padding-right: 46px;
}

.pea-lm .pea-lm__address:focus,
.pea-lm .pea-lm__office:focus {
	outline: 2px solid var(--pea-blue);
	outline-offset: 1px;
	border-color: var(--pea-blue);
}

.pea-lm .pea-lm__geo {
	position: absolute;
	right: 4px;
	top: 4px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--pea-purple);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pea-lm .pea-lm__geo:hover,
.pea-lm .pea-lm__geo:focus {
	background: #ece4ea;
	color: var(--pea-purple-dark);
}

.pea-lm .pea-lm__geo.is-busy svg {
	animation: pea-lm-spin 1s linear infinite;
}

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

.pea-lm .pea-lm__submit,
.pea-lm .pea-lm__button {
	display: inline-block;
	height: 46px;
	line-height: 46px;
	padding: 0 22px;
	border: 0;
	border-radius: 4px;
	background: var(--pea-purple);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease;
	box-sizing: border-box;
}

.pea-lm .pea-lm__submit:hover,
.pea-lm .pea-lm__submit:focus,
.pea-lm .pea-lm__button:hover,
.pea-lm .pea-lm__button:focus {
	background: var(--pea-purple-dark);
	color: #fff;
}

.pea-lm .pea-lm__submit[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.pea-lm__status {
	margin-top: 10px;
	min-height: 1.4em;
	font-size: 15px;
	color: #555;
}

.pea-lm__status.is-error {
	color: #b3261e;
}

.pea-lm__map-wrap {
	grid-area: map;
	position: relative;
	min-width: 0;
}

.pea-lm__map {
	width: 100%;
	min-height: 300px;
	border: 1px solid var(--pea-border);
	border-radius: 6px;
	background: #e9e9e9;
}

.pea-lm__map-error {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 6px;
	text-align: center;
	padding: 20px;
}

.pea-lm__map-error[hidden] {
	display: none;
}

.pea-lm__map-error p {
	margin: 0;
	font-weight: 600;
}

.pea-lm__map-error-reason {
	display: block;
	max-width: 420px;
	font-size: 13px;
	color: #777;
}

.pea-lm__panel {
	grid-area: panel;
	min-width: 0;
}

.pea-lm__office-card {
	display: none;
	border: 1px solid var(--pea-border);
	border-radius: 6px;
	padding: 18px 20px;
	background: #fff;
}

.pea-lm__office-card.is-active {
	display: block;
}

.pea-lm .pea-lm__office-name {
	margin: 0 0 8px;
	font-size: 22px;
	color: var(--pea-purple);
}

.pea-lm__office-address {
	font-style: normal;
	margin: 0 0 10px;
}

.pea-lm .pea-lm__office-meta {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.pea-lm .pea-lm__office-meta li {
	margin: 0 0 2px;
}

.pea-lm__hours dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 2px 14px;
	margin: 4px 0 12px;
}

.pea-lm__hours dt {
	font-weight: 400;
	color: #555;
}

.pea-lm__hours dd {
	margin: 0;
}

.pea-lm__notes {
	font-size: 14px;
	color: #555;
	margin: 0 0 14px;
}

.pea-lm__route {
	margin-top: 20px;
	border: 1px solid var(--pea-border);
	border-left: 4px solid var(--pea-blue);
	border-radius: 6px;
	padding: 16px 20px;
	background: #fff;
}

.pea-lm__route[hidden] {
	display: none;
}

.pea-lm .pea-lm__route-title {
	margin: 0 0 6px;
	font-size: 20px;
	color: var(--pea-purple);
}

.pea-lm__route-summary {
	margin: 0 0 10px;
	font-weight: 600;
}

.pea-lm .pea-lm__route-steps {
	margin: 0 0 14px 20px;
	padding: 0;
	max-height: 260px;
	overflow-y: auto;
	font-size: 14px;
}

.pea-lm .pea-lm__route-steps li {
	margin: 0 0 6px;
}

.pea-lm .pea-lm__route-steps li span {
	color: #777;
	white-space: nowrap;
}

/* Google Places autocomplete dropdown (legacy widget) should sit above the theme */
.pac-container {
	z-index: 10000;
}

@media (max-width: 800px) {
	.pea-lm {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"directions"
			"map"
			"panel";
	}

	.pea-lm .pea-lm__submit {
		width: 100%;
	}
}
