/* OSM Store Finder – Frontend */

.osm-sf-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Search bar ── */
.osm-sf-search {
	background: #f5f5f5;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 16px;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.osm-sf-search-row {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.osm-sf-search-row input[type="text"] {
	flex: 1;
	height: 40px;
	padding: 0 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 15px;
	box-sizing: border-box;
}

.osm-sf-filter-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: flex-end;
}

.osm-sf-category-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 140px;
}

.osm-sf-category-label {
	font-size: 12px;
	color: #666;
	font-weight: 500;
	line-height: 1;
}

.osm-sf-filter-row select,
.osm-sf-category-wrap select {
	flex: 0 0 40px;
	width: 100%;
	min-width: 140px;
	height: 40px !important;
	min-height: 40px;
	padding: 0 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
	-webkit-appearance: auto;
	appearance: auto;
	box-sizing: border-box;
}

/* ── Buttons ── */
.osm-sf-btn {
	height: 40px;
	padding: 0 20px;
	background: #0073aa;
	color: #fff !important;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	transition: background .2s;
	text-decoration: none;
	box-sizing: border-box;
	line-height: 40px;
}

.osm-sf-btn:hover { background: #005a87; }

.osm-sf-btn--outline {
	background: #fff;
	color: #0073aa !important;
	border: 1px solid #0073aa;
}

.osm-sf-btn--outline:hover {
	background: #f0f7fb;
}

/* ── Map ── */
#osm-sf-map {
	height: 500px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,.1);
	transition: opacity .3s;
}

/* ── Status ── */
#osm-sf-status {
	min-height: 30px;
	padding: 8px 0;
	font-size: 14px;
	color: #666;
	text-align: center;
}

/* ── Popup ── */
.osm-sf-popup-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

/* Override theme H3 styles inside the popup */
.osm-sf-popup h3,
.osm-sf-popup .osm-sf-popup-head h3 {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 15px !important;
	line-height: 1.3 !important;
	color: #222;
	border: none !important;
}

.osm-sf-popup-logo {
	height: 1.2em;
	width: auto;
	max-width: 72px;
	object-fit: contain;
	border-radius: 3px;
	flex-shrink: 0;
}

.osm-sf-popup-addr {
	margin: 4px 0 8px;
	font-size: 13px;
	color: #555;
	line-height: 1.5;
}

.osm-sf-popup p {
	margin: 4px 0;
	font-size: 13px;
	color: #555;
}

.osm-sf-dist {
	color: #0073aa !important;
	font-weight: 600 !important;
}

.osm-sf-popup a {
	color: #0073aa;
	text-decoration: none;
}

.osm-sf-popup a:hover { text-decoration: underline; }

.osm-sf-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 6px;
}

.osm-sf-cat {
	background: #e8f4f8;
	color: #0073aa;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 500;
}

.osm-sf-popup-dirs {
	display: flex;
	gap: 6px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.osm-sf-dir-btn {
	display: inline-block;
	padding: 5px 12px;
	background: #0073aa;
	color: #fff !important;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none !important;
	transition: background .2s;
}

.osm-sf-dir-btn:hover { background: #005a87; }

/* ── Logo marker ── */
.osm-sf-logo-marker { background: transparent; border: none; }
.osm-sf-logo-marker img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: contain;
	background: #fff;
	border: 2px solid #0073aa;
	box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

/* ── Leaflet tweaks ── */
.leaflet-popup-content-wrapper { border-radius: 8px; }
.leaflet-popup-content { margin: 12px 16px; min-width: 210px; }

/* ── Responsive ── */
@media (max-width: 600px) {
	.osm-sf-search-row, .osm-sf-filter-row { flex-direction: column; }
	#osm-sf-map { height: 350px !important; }
	.osm-sf-popup-dirs, .osm-sf-dir-btn { width: 100%; text-align: center; box-sizing: border-box; }
	.osm-sf-btn { width: 100%; text-align: center; }
}
