/**
 * Overfuel Places — dealership picker
 *
 * Intentionally unopinionated. The picker sits inside whatever Formidable style
 * the form already uses, so this file sizes and positions things and leaves
 * colour and typography to inherit. Note the theme sets html{font-size:10px},
 * so 1rem here is 10px, not 16px.
 */

.of-places {
	position: relative;
}

.of-places-search {
	width: 100%;
}

.of-places-status:not(:empty) {
	margin-top: 0.6rem;
	font-size: 1.3rem;
	opacity: 0.75;
}

.of-places-results {
	list-style: none;
	margin: 0.6rem 0 0;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 4px;
	max-height: 32rem;
	overflow-y: auto;
}

.of-places-result {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 1rem 1.2rem;
	cursor: pointer;
}

.of-places-result + .of-places-result {
	border-top: 1px solid currentColor;
}

.of-places-result:hover,
.of-places-result:focus {
	outline: none;
	background: rgba( 127, 127, 127, 0.14 );
}

.of-places-result-name {
	font-weight: 600;
}

.of-places-result-address {
	font-size: 1.3rem;
	opacity: 0.75;
}

.of-places-chosen {
	padding: 1.2rem;
	border: 1px solid currentColor;
	border-radius: 4px;
}

.of-places-chosen-name {
	margin: 0;
	font-weight: 600;
}

.of-places-chosen-address {
	margin: 0.2rem 0 0.8rem;
	font-size: 1.3rem;
	opacity: 0.75;
}

/* The theme styles bare <button> elements site-wide — dark fill, padding, the
   lot — and those rules land after this file, so a plain `background: none`
   loses. Scoping to the container raises specificity, and the handful of
   !importants are aimed only at the properties the theme actually sets. This
   control is a text link that happens to be a button for accessibility, so it
   should carry no chrome at all. */
.of-places button.of-places-change,
.of-places .of-places-change {
	background: transparent !important;
	background-image: none !important;
	background-color: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0;
	min-height: 0;
	width: auto;
	font: inherit;
	font-size: 1.3rem;
	line-height: 1.5;
	text-transform: none;
	letter-spacing: normal;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	color: inherit !important;
	opacity: .8;
}

.of-places button.of-places-change:hover,
.of-places button.of-places-change:focus-visible {
	background: transparent !important;
	opacity: 1;
	color: inherit !important;
}

.of-places button.of-places-change:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Builder preview only. */
.of-places-builder-preview input[disabled] {
	width: 100%;
	opacity: 0.6;
}
