/**
 * WP-ImmoMakler — Places Autocomplete library styles.
 *
 * Ships with assets-plus/js/places-autocomplete.js so the dropdown is
 * styled consistently regardless of which skin or page builder hosts the
 * input. The wrapper must be `position: relative` so the absolutely
 * positioned suggestion list anchors to the input, not to <body>.
 */

.immomakler-ac-wrap {
	position: relative;
	display: block;
	width: 100%;
}
.immomakler-ac-wrap > input {
	position: static;
	display: block;
	/* Themes commonly set `transition: all` (or transition background /
	   padding) on inputs. When the library adds `.immomakler-has-value`,
	   the place-pin marker would otherwise animate from the default
	   `0% 0%` position into `10px center` — visible as the SVG flying in
	   from the top-left. !important defeats higher-specificity theme
	   rules like `.entry-content input`. */
	transition: none !important;
}

/* `margin`, `padding`, and `list-style` use !important because themes
   commonly target `.entry-content ul` (specificity 0,1,1) — Astra in
   particular sets `padding: revert; margin: revert;` there, which falls
   back to the browser's default ~40px <ul> indent and pushes every
   suggestion row off the left edge of the input. The defensive
   !important here matches the pattern in the original (pre-extraction)
   radius-search CSS. */
.immomakler-ac-list {
	position: absolute;
	z-index: 99999;
	left: 0;
	right: 0;
	top: 100%;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: auto;
	max-height: 320px;
	box-shadow:
		0 2px 4px rgba(0, 0, 0, 0.08),
		0 8px 16px rgba(0, 0, 0, 0.12);
}

.immomakler-ac-item {
	padding: 8px 10px 8px 30px;
	position: relative;
	cursor: pointer;
}

.immomakler-ac-item::before {
	content: "";
	position: absolute;
	left: 10px;
	top: 50%;
	width: 14px;
	height: 14px;
	transform: translateY(-50%);
	background: #777;
	-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5S10.62 6.5 12 6.5s2.5 1.12 2.5 2.5S13.38 11.5 12 11.5z"/></svg>');
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5S10.62 6.5 12 6.5s2.5 1.12 2.5 2.5S13.38 11.5 12 11.5z"/></svg>');
	mask-repeat: no-repeat;
	mask-size: contain;
}

.immomakler-ac-item:hover::before,
.immomakler-ac-item[aria-selected="true"]::before {
	background: #333;
}

.immomakler-ac-item:hover,
.immomakler-ac-item[aria-selected="true"] {
	background: #f0f0f0;
}

.immomakler-ac-attrib {
	text-align: right;
	padding: 1px 10px;
	border-top: 1px solid #eee;
	background: #fafafa;
	font-size: 10px;
	list-style: none;
}
/* Themes commonly target `.entry-content a` (Astra ships
   `.ast-single-post .entry-content a` with specificity 0,2,1) and add
   underline / colour / hover effects. !important on every state defeats
   that without us having to chase per-theme selectors. */
.immomakler-ac-attrib a,
.immomakler-ac-attrib a:hover,
.immomakler-ac-attrib a:focus,
.immomakler-ac-attrib a:active,
.immomakler-ac-attrib a:visited {
	text-decoration: none !important;
	color: #777 !important;
	background: transparent !important;
	box-shadow: none !important;
}
.immomakler-ac-attrib svg {
	width: 15px;
	height: auto;
}

/* Once a place is selected, show a map-pin marker on the left side of the
   input. `padding-left` uses !important because callers (test pages,
   theme/builder forms) often set a shorthand `padding` inline, which
   would otherwise win on specificity and let the marker overlap the
   typed text. */
.immomakler-ac-wrap > input.immomakler-has-value {
	padding-left: 30px !important;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23777" d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5S10.62 6.5 12 6.5s2.5 1.12 2.5 2.5S13.38 11.5 12 11.5z"/></svg>');
	background-repeat: no-repeat;
	background-position: 10px center;
	background-size: 14px 14px;
}
