/* amm - Riemeier Tankstellen | Frontend-Styles */

.amm-rt-widget {
	width: 100%;
}

/* Kopfzeile */
.amm-rt-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.amm-rt-header-title {
	font-weight: 700;
	font-size: 1.25rem;
	color: #c0392b;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.amm-rt-header-count {
	background: #c0392b;
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
}

.amm-rt-layout {
	display: flex;
	align-items: stretch;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.amm-rt-map-column {
	flex: 1 1 0%;
	min-width: 0;
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.amm-rt-map {
	width: 100%;
	height: 520px;
	z-index: 1;
}

.amm-rt-sidebar {
	flex: 0 0 auto;
	width: 35%;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	height: 100%;
	min-height: 0;
}

/* Filter-Umschalt-Button */
.amm-rt-filter-toggle-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	flex: 0 0 auto;
	border: none;
	cursor: pointer;
	background: #c0392b;
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	margin-bottom: 0.75rem;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.amm-rt-filter-toggle-icon {
	display: inline-flex;
	transition: transform 0.2s ease;
}

/* Filter-Panel (Slide) */
.amm-rt-filter-panel {
	display: block;
	flex: 0 0 auto;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease, padding 0.3s ease;
	background: #f7f7f7;
	border-radius: 6px;
	padding: 0 1rem;
}

.amm-rt-filter-panel.is-open {
	max-height: 1200px;
	padding: 1rem;
	margin-bottom: 0.75rem;
}

.amm-rt-filter-group {
	margin-bottom: 1rem;
}

.amm-rt-filter-group:last-child {
	margin-bottom: 0;
}

.amm-rt-filter-heading {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #333;
	margin-bottom: 0.5rem;
}

/* Suche */
.amm-rt-search {
	position: relative;
	display: flex;
	align-items: stretch;
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid #ddd;
}

.amm-rt-search input {
	flex: 1 1 auto;
	border: none;
	background: transparent;
	padding: 0.65rem 0.75rem;
	box-sizing: border-box;
	font-size: 0.95rem;
	outline: none;
}

.amm-rt-search-btn {
	flex: 0 0 auto;
	border: none;
	background: #c0392b;
	color: #fff;
	width: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

/* Aktuellen Standort verwenden */
.amm-rt-standort-btn {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	background: none;
	border: none;
	padding: 0.6rem 0 0;
	cursor: pointer;
	font-size: 0.85rem;
	color: #2c3e50;
	text-decoration: underline;
	transition: color 0.15s ease;
}

.amm-rt-standort-icon {
	display: inline-flex;
	color: #c0392b;
	transition: color 0.15s ease;
}

.amm-rt-standort-btn.is-active {
	color: #27ae60;
}

.amm-rt-radius-wrapper {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.6rem;
}

.amm-rt-radius-label {
	font-size: 0.85rem;
	color: #333;
}

.amm-rt-radius-select {
	padding: 0.3rem 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
}

/* Services-Filter-Chips */
.amm-rt-service-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.amm-rt-service-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.9rem;
	border: 1px solid #ddd;
	border-radius: 20px;
	background: #fff;
	color: #333;
	cursor: pointer;
	font-size: 0.85rem;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.amm-rt-service-chip.is-active {
	background: #2c3e50;
	color: #fff;
	border-color: #2c3e50;
}

.amm-rt-service-chip-icon {
	display: inline-flex;
}

/* Legacy: Status-Filter Zeile (Schalter direkt, ohne eigenes Panel) */
.amm-rt-filter {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	user-select: none;
}

.amm-rt-filter-icon {
	display: inline-flex;
}

.amm-rt-filter-label {
	flex: 1 1 auto;
	font-size: 0.9rem;
}

.amm-rt-filter-switch {
	position: relative;
	display: inline-block;
	width: 38px;
	height: 22px;
	flex: 0 0 auto;
}

.amm-rt-filter-toggle {
	opacity: 0;
	width: 0;
	height: 0;
}

.amm-rt-filter-slider {
	position: absolute;
	inset: 0;
	background-color: #ccc;
	border-radius: 22px;
	transition: 0.2s;
}

.amm-rt-filter-slider::before {
	content: "";
	position: absolute;
	height: 16px;
	width: 16px;
	left: 3px;
	top: 3px;
	background-color: #fff;
	border-radius: 50%;
	transition: 0.2s;
}

.amm-rt-filter-toggle:checked + .amm-rt-filter-slider::before {
	transform: translateX(16px);
}

/* Liste */
.amm-rt-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	overflow-y: auto;
	flex: 1 1 auto;
	min-height: 0;
}

.amm-rt-list-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.amm-rt-list-distance {
	position: absolute;
	top: 0.6rem;
	right: 2.1rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: #c0392b;
}

.amm-rt-list-chevron {
	flex: 0 0 auto;
	font-size: 1.4rem;
	line-height: 1;
	color: #bbb;
	transition: color 0.15s ease;
}

.amm-rt-list-image {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 4px;
	flex: 0 0 auto;
}

.amm-rt-list-text {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
}

.amm-rt-list-title-row {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.amm-rt-list-icon {
	display: inline-flex;
	align-items: center;
	transition: color 0.15s ease;
}

.amm-rt-list-title {
	font-weight: 600;
	color: #1a1a1a;
}

.amm-rt-list-address {
	font-size: 0.85rem;
	color: #666;
}

.amm-rt-list-status {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	margin-top: 0.15rem;
}

.amm-rt-list-status.is-open {
	color: #27ae60;
}

.amm-rt-list-status.is-closed {
	color: #b02a2a;
}

.amm-rt-empty {
	text-align: center;
	padding: 1rem;
	color: #777;
}

/* Marker */
.amm-rt-marker-pin {
	width: 34px;
	height: 34px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	background-color: #c0392b;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.amm-rt-marker-pin i {
	transform: rotate(45deg);
}

.amm-rt-marker-pin.is-hover,
.amm-rt-marker-pin.is-active {
	transform: rotate(-45deg) scale(1.12);
}

/* Popup */
.amm-rt-popup {
	min-width: 220px;
}

.amm-rt-popup-title {
	font-weight: 700;
	margin: 0 0 0.35rem;
	font-size: 1rem;
}

.amm-rt-popup-body p {
	margin: 0.15rem 0;
	font-size: 0.9rem;
}

.amm-rt-popup-address {
	margin-bottom: 0.2rem;
}

.amm-rt-popup-status {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin: 0.15rem 0 0.5rem;
}

.amm-rt-popup-status.is-open {
	color: #27ae60;
}

.amm-rt-popup-status.is-closed {
	color: #b02a2a;
}

.amm-rt-popup-distance {
	font-size: 0.8rem;
	font-weight: 700;
	color: #c0392b;
	margin: 0 0 0.5rem;
}

.amm-rt-popup-section {
	margin: 0.6rem 0;
}

.amm-rt-popup-heading {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #c0392b;
	margin-bottom: 0.25rem;
}

.amm-rt-popup-hours-row {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	font-size: 0.85rem;
	padding: 0.1rem 0;
}

.amm-rt-popup-hours-day {
	font-weight: 600;
	flex: 0 0 auto;
}

.amm-rt-popup-hours-24h {
	font-size: 0.85rem;
	margin: 0;
	padding: 0.1rem 0;
}

.amm-rt-popup-services {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin: 0.4rem 0;
}

.amm-rt-popup-service-badge {
	font-size: 0.75rem;
	background: #eef1f2;
	color: #333;
	padding: 0.15rem 0.55rem;
	border-radius: 12px;
}

.amm-rt-popup-contact a {
	color: inherit;
	text-decoration: underline;
}

.amm-rt-popup-route {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.5rem;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.15s ease;
}

.leaflet-container a.leaflet-popup-close-button {
	display: none !important;
}

.amm-rt-popup {
	position: relative;
}

.amm-rt-popup-close-btn {
	position: absolute;
	top: -0.35rem;
	right: -0.35rem;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: #999999;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	padding: 0;
	text-decoration: none;
}

/* Borlabs Consent Placeholder */
.amm-rt-consent-placeholder {
	width: 100%;
	height: 100%;
	min-height: 320px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eef1f2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3C/svg%3E") center/cover;
	border-radius: 6px;
	text-align: center;
	padding: 2rem;
	box-sizing: border-box;
}

.amm-rt-gated-content {
	height: 100%;
}

.amm-rt-consent-box p {
	margin: 0 0 1rem;
	color: #333;
}

.amm-rt-consent-btn {
	display: inline-block;
	padding: 0.6rem 1.4rem;
	background: #2c3e50;
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	cursor: pointer;
}

/* Responsive */
@media (max-width: 767px) {
	.amm-rt-layout {
		flex-direction: column;
		height: auto !important;
	}

	.amm-rt-sidebar {
		flex-basis: auto;
		width: 100%;
		height: auto;
	}

	.amm-rt-map-column {
		height: auto;
	}

	.amm-rt-list {
		flex: none;
		max-height: 60vh;
	}

	.amm-rt-layout--liste-zuerst .amm-rt-sidebar {
		order: -1;
	}

	.amm-rt-layout--karte-zuerst .amm-rt-map-column {
		order: -1;
	}
}

/* Leaflet-Attribution: Theme-CSS überschreibt teils die Standardgröße von Leaflet
   (11px) mit einer viel größeren Schrift – hier hart zurücksetzen. */
.amm-rt-map.leaflet-container {
	font-size: 12px;
}

.amm-rt-map .leaflet-control-attribution,
.amm-rt-map .leaflet-control-attribution a {
	font-size: 11px !important;
	line-height: 1.4 !important;
}

/* Icon-Farben: Elementor rendert Icons je nach globaler Einstellung entweder als
   Font-Icon (<i>) oder als Inline-SVG. Bei SVG folgt die Füllfarbe nicht
   automatisch der CSS "color"-Eigenschaft, daher hier für alle Icon-Wrapper
   im Widget explizit absichern. */
.amm-rt-widget i,
.amm-rt-widget svg {
	color: inherit;
}

.amm-rt-widget svg {
	fill: currentColor;
	width: 1em;
	height: 1em;
}
