/**
 * SAIMEX Umkreissuche – Darstellung.
 * Das finale Aussehen (Höhe, Rahmen, Radius, Schrift, Hintergrund) wird per
 * JavaScript vom Ort-Feld übernommen; diese Werte sind der Fallback.
 * Variablen aus den Plugin-Einstellungen:
 *   --saimex-umkreis-accent  (Akzentfarbe)
 *   --saimex-umkreis-width   (Breite auf Desktop)
 */

.saimex-umkreis {
	position: relative;
	display: inline-block;
	vertical-align: top;
	width: var(--saimex-umkreis-width, 160px);
	max-width: 100%;
}

.saimex-umkreis-select,
.saimex-umkreis-input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	height: 56px;
	padding: 0 36px 0 18px;
	margin: 0;
	background-color: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 4px;
	font-family: inherit;
	font-size: 15px;
	color: var(--saimex-value-color, #333);
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.saimex-umkreis-select {
	cursor: pointer;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
}

/* Platzhalter-Zustand im gleichen Grau wie die Theme-Platzhalter */
.saimex-umkreis-select.is-empty {
	color: #9a9a9a;
}
.saimex-umkreis-input::placeholder {
	color: #9a9a9a;
	opacity: 1;
}

/* Zahlen-Spinner ausblenden (freie Eingabe) */
.saimex-umkreis-input::-webkit-outer-spin-button,
.saimex-umkreis-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.saimex-umkreis-input[type="number"] {
	-moz-appearance: textfield;
}

.saimex-umkreis-select:hover,
.saimex-umkreis-input:hover {
	border-color: #d5d5d5;
}

.saimex-umkreis-select:focus,
.saimex-umkreis-input:focus {
	outline: none;
	border-color: var(--saimex-umkreis-accent, #c0392b) !important;
	box-shadow: 0 0 0 1px var(--saimex-umkreis-accent, #c0392b) !important;
}

.saimex-umkreis-select option {
	color: #333;
	font-weight: normal;
}

/* Einheiten-Anzeige "km" rechts im freien Eingabefeld */
.saimex-umkreis-unit {
	position: absolute;
	top: 50%;
	right: 38px;
	transform: translateY(-50%);
	color: #9a9a9a;
	font-size: 14px;
	pointer-events: none;
}

/* Zurück-zur-Liste-Button (Modus "beides") */
.saimex-umkreis-back {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 22px;
	height: 22px;
	line-height: 20px;
	text-align: center;
	border: 0;
	border-radius: 50%;
	background: #f0f0f0;
	color: #777;
	font-size: 13px;
	cursor: pointer;
	padding: 0;
}
.saimex-umkreis-back:hover {
	background: var(--saimex-umkreis-accent, #c0392b);
	color: #fff;
}

/* --------------------------------------------------------------------
 * Einbindung in die Filterleiste der Job-Seite (.job_filters)
 * ------------------------------------------------------------------ */
.job_filters .search_jobs .saimex-umkreis {
	margin: 0 0 15px;
	padding: 0 10px 0 0;
}

/* --------------------------------------------------------------------
 * Einbindung in die Hero-/Startseiten-Suchleiste
 * ------------------------------------------------------------------ */
.job-search-form .saimex-umkreis,
.listing-search-form .saimex-umkreis,
.listing-search-box .saimex-umkreis {
	margin: 0 8px 0 0;
}

/* --------------------------------------------------------------------
 * Mobil: volle Breite
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
	.saimex-umkreis {
		display: block;
		width: 100%;
		margin: 10px 0 0;
	}
}

/* --------------------------------------------------------------------
 * Entfernungs-Anzeige an den Job-Karten
 * ------------------------------------------------------------------ */
.saimex-distance {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 8px;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.05);
	color: #777;
	font-size: 0.85em;
	white-space: nowrap;
}

/* --------------------------------------------------------------------
 * 0-Treffer-Fallback (nächstgelegene Jobs + Job-Alert-Hinweis)
 * ------------------------------------------------------------------ */
li.saimex-fallback-note,
li.saimex-fallback-alert {
	list-style: none;
	padding: 18px 20px;
	margin: 10px 0;
	background: #fff;
	border-left: 3px solid var(--saimex-umkreis-accent, #c0392b);
}

li.saimex-fallback-note p,
li.saimex-fallback-alert p {
	margin: 0;
	color: #444;
	font-size: 15px;
}

li.saimex-fallback-alert {
	border-left-color: #999;
}

li.saimex-fallback-alert p {
	color: #777;
	font-size: 14px;
}
