/* 5 to go – Hartă locații */
.ftg-locator {
	--ftg-primary: #2B7C70;
	--ftg-dark: #232226;
	--ftg-height: 640px;
	--ftg-muted: #667085;
	--ftg-border: #E2EAEA;
	--ftg-bg: #FFFFFF;
	--ftg-soft: #F4F1EB;
	--ftg-radius: 14px;
	display: grid;
	grid-template-columns: minmax(300px, 380px) 1fr;
	height: var(--ftg-height);
	border: 1px solid var(--ftg-border);
	border-radius: var(--ftg-radius);
	overflow: hidden;
	background: var(--ftg-bg);
	color: var(--ftg-dark);
	font-family: inherit;
	box-sizing: border-box;
}
.ftg-locator *,
.ftg-locator *::before,
.ftg-locator *::after { box-sizing: border-box; }

.ftg-panel {
	display: flex;
	flex-direction: column;
	min-height: 0;
	border-right: 1px solid var(--ftg-border);
	background: var(--ftg-bg);
}

.ftg-search {
	display: flex;
	gap: 8px;
	padding: 14px;
	margin: 0;
	border-bottom: 1px solid var(--ftg-border);
}
.ftg-locator .ftg-search-input {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--ftg-border);
	border-radius: 10px;
	font-size: 16px; /* evită zoom-ul automat pe iOS */
	background: #fff;
	color: var(--ftg-dark);
	outline: none;
}
.ftg-locator .ftg-search-input:focus { border-color: var(--ftg-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ftg-primary) 20%, transparent); }

.ftg-locator .ftg-locate-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 44px;
	padding: 0 14px;
	border: 0;
	border-radius: 10px;
	background: var(--ftg-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}
.ftg-locator .ftg-locate-btn:hover { filter: brightness(1.08); }
.ftg-locator.is-locating .ftg-locate-btn svg { animation: ftg-spin 1.2s linear infinite; }
@keyframes ftg-spin { to { transform: rotate(360deg); } }

.ftg-status {
	padding: 10px 14px;
	font-size: 13px;
	color: var(--ftg-muted);
	border-bottom: 1px solid var(--ftg-border);
	min-height: 38px;
}
.ftg-status.is-notice { color: #8a4b00; background: #fff7e8; }

.ftg-locator .ftg-list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	flex: 1;
	-webkit-overflow-scrolling: touch;
}
.ftg-locator .ftg-item {
	margin: 0;
	padding: 14px;
	border-bottom: 1px solid var(--ftg-border);
	cursor: pointer;
	transition: background .15s;
	outline: none;
}
.ftg-locator .ftg-item:hover,
.ftg-locator .ftg-item:focus-visible { background: var(--ftg-soft); }
.ftg-locator .ftg-item.is-active { background: color-mix(in srgb, var(--ftg-primary) 10%, #fff); box-shadow: inset 3px 0 0 var(--ftg-primary); }
.ftg-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ftg-item-name { font-size: 15px; font-weight: 700; color: var(--ftg-dark); }
.ftg-dist { flex: none; font-size: 12px; font-weight: 600; color: var(--ftg-primary); white-space: nowrap; }
.ftg-item-addr { margin-top: 3px; font-size: 13px; color: var(--ftg-muted); line-height: 1.4; }
.ftg-item .ftg-nav { margin-top: 10px; }
.ftg-item--geocode { cursor: default; }
.ftg-locator .ftg-link { background: none; border: 0; padding: 0; color: var(--ftg-primary); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: underline; text-align: left; }

/* Butoane navigare */
.ftg-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.ftg-locator .ftg-btn,
.ftg-pop .ftg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	min-height: 36px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid var(--ftg-border);
	background: #fff;
	color: var(--ftg-dark) !important;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
}
.ftg-locator .ftg-btn--primary,
.ftg-pop .ftg-btn--primary { background: var(--ftg-primary); border-color: var(--ftg-primary); color: #fff !important; }
.ftg-locator .ftg-btn:hover { filter: brightness(.97); }

/* Hartă */
.ftg-map-wrap { position: relative; min-width: 0; min-height: 0; }
.ftg-map { position: absolute; inset: 0; background: #eef1f1; }

.ftg-pin { background: none; border: 0; }
.ftg-pin svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.ftg-pin-body { fill: var(--ftg-dark); stroke: #fff; stroke-width: 2; }
.leaflet-marker-icon.ftg-pin:hover .ftg-pin-body { fill: var(--ftg-primary); }
.ftg-pin-text { fill: #fff; font: 700 15px/1 Arial, sans-serif; }

.ftg-cluster {
	display: flex !important;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--ftg-primary);
	color: #fff;
	font: 700 13px/1 Arial, sans-serif;
	box-shadow: 0 0 0 5px color-mix(in srgb, var(--ftg-primary) 30%, transparent), 0 2px 6px rgba(0, 0, 0, .3);
}

.ftg-user span {
	display: block;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #1a73e8;
	border: 3px solid #fff;
	box-shadow: 0 0 0 0 rgba(26, 115, 232, .5), 0 1px 4px rgba(0, 0, 0, .4);
	animation: ftg-pulse 2s infinite;
}
@keyframes ftg-pulse {
	0% { box-shadow: 0 0 0 0 rgba(26, 115, 232, .5), 0 1px 4px rgba(0, 0, 0, .4); }
	70% { box-shadow: 0 0 0 14px rgba(26, 115, 232, 0), 0 1px 4px rgba(0, 0, 0, .4); }
	100% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0), 0 1px 4px rgba(0, 0, 0, .4); }
}
.ftg-accuracy { fill: #1a73e8; fill-opacity: .1; stroke: #1a73e8; stroke-opacity: .35; stroke-width: 1; }

/* Popup */
.ftg-locator .leaflet-popup-content-wrapper { border-radius: 12px; }
.ftg-locator .leaflet-popup-content { margin: 14px 16px; }
.ftg-pop-name { font-size: 15px; font-weight: 700; color: var(--ftg-dark); margin-bottom: 4px; }
.ftg-pop-addr, .ftg-pop-meta { font-size: 13px; color: var(--ftg-muted); line-height: 1.4; }
.ftg-pop-meta a { color: var(--ftg-primary); }
.ftg-pop-dist { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ftg-primary); }
.ftg-pop .ftg-nav { margin-top: 12px; }
.ftg-pop .ftg-btn { flex: 1; }
.ftg-pop .ftg-btn--primary { flex: 1 1 100%; min-height: 42px; font-size: 14px; }

.ftg-locator .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ------------------------------------------------------------------ Skin-uri hartă */
.ftg-locator .leaflet-gl-layer, .ftg-locator .maplibregl-canvas { outline: none; }

/* Fundalul vectorial e recolorat în JS; aici doar fundalul și rezerva raster. */
.ftg-skin-brand .ftg-map { background: #F4F1EB; }
.ftg-skin-dark .ftg-map { background: #1E1D21; }
.ftg-skin-brand.ftg-raster .leaflet-tile-pane { filter: grayscale(.6) brightness(1.04) contrast(.92); }
.ftg-skin-dark.ftg-raster .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) grayscale(.85) brightness(.82) contrast(.92); }
.ftg-skin-dark .ftg-pin-body { fill: var(--ftg-primary); }
.ftg-skin-dark .leaflet-control-attribution { background: rgba(35, 34, 38, .75); color: #bbb; }
.ftg-skin-dark .leaflet-control-attribution a { color: #ddd; }

/* Controale în stilul brandului */
.ftg-locator .leaflet-bar { border: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(35, 34, 38, .18); }
.ftg-locator .leaflet-bar a,
.ftg-locator .leaflet-bar a:hover { width: 36px; height: 36px; line-height: 36px; font-size: 20px; color: var(--ftg-dark); background: #fff; border-bottom-color: var(--ftg-border); }
.ftg-locator .leaflet-bar a:hover { background: var(--ftg-soft); color: var(--ftg-primary); }
.ftg-locator .leaflet-control-attribution { font-size: 10px; background: rgba(244, 241, 235, .85); border-top-left-radius: 6px; }
.ftg-locator .leaflet-control-attribution a { color: var(--ftg-muted); }
.ftg-locator .leaflet-popup-content-wrapper { box-shadow: 0 8px 28px rgba(35, 34, 38, .22); }
.ftg-locator .leaflet-popup-content-wrapper,
.ftg-locator .leaflet-popup-tip { background: #fff; }
.ftg-locator .leaflet-container { font-family: inherit; }

/* Tabletă / mobil: căutare sus, hartă, apoi lista locațiilor din jur */
@media (max-width: 767px) {
	.ftg-locator {
		display: flex;
		flex-direction: column;
		height: auto;
		border-radius: 12px;
	}
	.ftg-panel { display: contents; }
	.ftg-search { order: 1; padding: 12px; }
	.ftg-status { order: 2; }
	.ftg-map-wrap { order: 3; height: min(62vh, 520px); min-height: 320px; }
	.ftg-locator .ftg-list { order: 4; max-height: none; overflow: visible; }
	.ftg-locator .ftg-locate-btn span { display: none; }
	.ftg-locator .ftg-locate-btn { width: 44px; padding: 0; justify-content: center; }
	.ftg-locator .ftg-btn { min-height: 40px; }
	.ftg-locator .ftg-item .ftg-btn--primary { flex: 1; }
}

@media (min-width: 768px) and (max-width: 1024px) {
	.ftg-locator { grid-template-columns: 300px 1fr; }
}
