/* Stores Map – bewusst OHNE font-family/font-size, damit das Theme-CSS greift.
   Es werden nur Layout, Abstände, Farben, Radien gestylt. */

.sm-stores-wrapper {
	width: 100%;
}

/* ---------- Toolbar (Filter + Locate) ---------- */

.sm-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.6em;
	margin-bottom: 1em;
}

.sm-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.sm-filter-btn {
	appearance: none;
	cursor: pointer;
	background: #fff;
	color: #111;
	border: 1px solid #ddd;
	border-radius: 999px;
	padding: 0.55em 1.3em;
	line-height: 1.2;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sm-filter-btn:hover {
	border-color: #111;
}

.sm-filter-btn.is-active {
	background: #111;
	border-color: #111;
	color: #fff;
}

.sm-locate-btn {
	appearance: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background: #fff;
	color: #111;
	border: 1px solid #ddd;
	border-radius: 999px;
	padding: 0.55em 1.3em;
	line-height: 1.2;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sm-locate-btn:hover {
	border-color: #111;
}

.sm-locate-btn.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.sm-locate-icon {
	width: 0.9em;
	height: 0.9em;
	border-radius: 50%;
	border: 2px solid currentColor;
	position: relative;
	flex: 0 0 auto;
}

.sm-locate-icon::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0.3em;
	height: 0.3em;
	background: currentColor;
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

/* ---------- Layout: Karte + Liste ---------- */

.sm-layout {
	display: flex;
	gap: 1.5em;
	flex-wrap: wrap;
	align-items: flex-start;
}

.sm-map-col {
	flex: 1 1 60%;
	min-width: 280px;
}

.sm-has-list .sm-map-col {
	flex: 2 1 420px;
}

.sm-list-col {
	flex: 1 1 280px;
	max-width: 380px;
	min-width: 260px;
}

.sm-map {
	width: 100%;
	min-height: 320px;
	position: relative;
	z-index: 1;
	border-radius: 4px;
	overflow: hidden;
}

/* ---------- Store-Liste ---------- */

/* Schutz gegen Theme-/Slider-CSS, das global auf ul/li wirkt
   (z.B. Carousel-Styles mit position:absolute, feste Höhen, negative Margins).
   Alles innerhalb des Plugin-Wrappers wird hart zurückgesetzt. */
.sm-stores-wrapper ul,
.sm-stores-wrapper li {
	position: static !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	float: none !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	opacity: 1 !important;
	transform: none !important;
	box-sizing: border-box !important;
}

.sm-store-list {
	display: flex !important;
	flex-direction: column !important;
	list-style: none;
	margin: 0;
	padding: 0.6em;
	overflow-y: auto;
	border: 1px solid #eee;
	border-radius: 10px;
	background: #fafafa;
	gap: 0.6em;
}

.sm-store-list li {
	flex: 0 0 auto !important;
	width: 100% !important;
}

.sm-store-empty {
	padding: 1em;
	opacity: 0.65;
}

.sm-store-card {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: left;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 10px;
	cursor: pointer;
	padding: 1em 1.1em;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sm-store-card:hover {
	border-color: #ccc;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sm-store-card.is-active {
	border-color: #111;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sm-store-card .sm-store-name {
	margin: 0 0 0.55em 0;
	font-weight: 600;
}

.sm-store-meta {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	margin-bottom: 0.6em;
}

.sm-meta-row {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	opacity: 0.85;
}

.sm-meta-icon {
	flex: 0 0 auto;
	display: inline-flex;
	margin-top: 0.15em;
	opacity: 0.6;
}

.sm-meta-icon svg {
	display: block;
}

.sm-store-distance {
	display: inline-block;
	margin-bottom: 0.6em;
	opacity: 0.6;
}

.sm-store-distance:empty {
	display: none;
}

.sm-store-actions {
	display: flex;
	align-items: center;
	gap: 0.5em;
}

.sm-btn-view {
	appearance: none;
	cursor: pointer;
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	background: #111;
	color: #fff;
	border: 1px solid #111;
	border-radius: 999px;
	padding: 0.6em 1em;
	line-height: 1.2;
	transition: background 0.15s ease;
}

.sm-btn-view:hover {
	background: #000;
}

.sm-btn-view-arrow {
	display: inline-flex;
}

.sm-icon-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4em;
	height: 2.4em;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	color: #111;
	text-decoration: none !important;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sm-icon-btn:hover {
	border-color: #111;
}

.sm-call-btn {
	background: #111;
	border-color: #111;
	color: #fff;
}

.sm-call-btn:hover {
	background: #000;
}

/* ---------- Popup-Inhalt: nur Layout, keine Typografie ---------- */

.sm-popup {
	max-width: 240px;
}

.sm-popup img {
	width: 100%;
	height: auto;
	display: block;
	margin-bottom: 0.5em;
	border-radius: 3px;
}

.sm-popup .sm-popup-title {
	margin: 0 0 0.35em 0;
}

.sm-popup .sm-popup-row {
	margin: 0 0 0.25em 0;
}

.sm-popup a {
	text-decoration: underline;
}

.sm-no-stores {
	opacity: 0.7;
}

/* ---------- Leaflet Overrides: Schwarz/Weiß-Feinschliff ---------- */

.leaflet-control-zoom a {
	color: #111 !important;
	border-radius: 4px !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	border-radius: 6px;
}

@media (max-width: 680px) {
	.sm-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.sm-list-col {
		max-width: none;
	}

	.sm-store-list {
		max-height: none !important;
		overflow: visible !important;
	}
}
