/* Business Directory Map Plugin - bd-map.css */

.bd-map-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	margin: 1rem 0;
}

/* ── Controls ── */
.bd-map-controls {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: #fff;
	border-bottom: 1px solid #ebebeb;
	flex-wrap: wrap;
}

.bd-search-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 0 10px;
	flex: 1;
	min-width: 160px;
}

.bd-icon-search::before {
	content: '⌕';
	font-size: 16px;
	color: #aaa;
}

.bd-search-input {
	border: none !important;
	background: transparent !important;
	font-size: 13px;
	color: #333;
	padding: 8px 0;
	outline: none;
	width: 100%;
	box-shadow: none !important;
}

.bd-filter-select {
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 7px 10px;
	font-size: 13px;
	color: #333;
	cursor: pointer;
}

.bd-count {
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 5px 12px;
	font-size: 12px;
	color: #777;
	white-space: nowrap;
}

/* ── View Toggle ── */
.bd-view-toggle {
	display: flex;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	margin-left: auto;
}

.bd-vt-btn {
	padding: 6px 12px;
	font-size: 16px;
	background: #fff;
	border: none;
	border-right: 1px solid #e0e0e0;
	cursor: pointer;
	color: #888;
	transition: background 0.15s, color 0.15s;
	line-height: 1;
}

.bd-vt-btn:last-child {
	border-right: none;
}

.bd-vt-btn:hover {
	background: #f0f0f0;
}

.bd-vt-btn.active {
	background: #185FA5;
	color: #fff;
}

/* ── Views ── */
.bd-view {
	display: none !important;
}

.bd-view.bd-active {
	display: flex !important;
}

.bd-view-grid.bd-active {
	display: block !important;
}

.bd-view-list.bd-active {
	display: block !important;
}

/* ── Map View ── */
.bd-view-map {
	flex-direction: row;
}

.bd-sidebar {
	width: 270px;
	min-width: 270px;
	border-right: 1px solid #ebebeb;
	overflow-y: auto;
	background: #fff;
	max-height: 600px;
}

.bd-sidebar-header {
	padding: 9px 12px;
	border-bottom: 1px solid #ebebeb;
	font-size: 12px;
	color: #888;
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 1;
}

.bd-sidebar-count {
	background: #f0f0f0;
	border-radius: 20px;
	padding: 1px 8px;
	font-size: 11px;
	color: #777;
}

/* ── Listing Card (Sidebar) ── */
.bd-listing-card {
	padding: 10px 12px;
	border-bottom: 1px solid #f0f0f0;
	cursor: pointer;
	transition: background 0.12s;
	outline: none;
}

.bd-listing-card:hover,
.bd-listing-card:focus {
	background: #f7f9fc;
}

.bd-listing-card.bd-active-card {
	background: #EBF3FC;
	border-left: 3px solid #185FA5;
}

.bd-lc-top {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.bd-lc-avatar,
.bd-gc-avatar,
.bd-lv-avatar {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: #EBF3FC;
	color: #185FA5;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 600;
	flex-shrink: 0;
}

.bd-lc-logo-img {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	object-fit: contain;
	border: 1px solid #eee;
	flex-shrink: 0;
}

.bd-lc-info {
	flex: 1;
	min-width: 0;
}

.bd-lc-name {
	font-size: 12px;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bd-lc-addr {
	font-size: 11px;
	color: #888;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Tags ── */
.bd-lc-tags {
	margin-top: 6px;
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}

.bd-tag {
	font-size: 10px;
	padding: 2px 7px;
	border-radius: 20px;
	display: inline-block;
}

.bd-tag-cat {
	background: #EBF3FC;
	color: #0C447C;
}

.bd-tag-state {
	background: #EAF3DE;
	color: #27500A;
}

.bd-tag-active {
	background: #E1F5EE;
	color: #085041;
}

/* ── Map Canvas ── */
.bd-map-canvas {
	flex: 1;
	min-height: 400px;
}

/* ── Popup ── */
.bd-popup {
	min-width: 220px;
	max-width: 280px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.bd-popup-logo {
	width: 48px;
	height: 48px;
	object-fit: contain;
	border-radius: 8px;
	border: 1px solid #eee;
	margin-bottom: 6px;
}

.bd-popup h4 {
	margin: 0 0 6px;
	font-size: 14px;
	color: #1a1a1a;
	font-weight: 600;
}

.bd-popup p {
	margin: 0 0 4px;
	font-size: 12px;
	color: #555;
	line-height: 1.5;
	display: flex;
	align-items: flex-start;
	gap: 4px;
}

.bd-popup-links {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

/* ── Buttons ── */
.bd-btn {
	display: inline-block;
	font-size: 12px;
	padding: 6px 12px;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
	border: none;
	font-weight: 500;
	transition: opacity 0.15s;
}

.bd-btn:hover {
	opacity: 0.85;
}

.bd-btn-primary {
	background: #185FA5;
	color: #fff !important;
}

.bd-btn-secondary {
	background: #f0f0f0;
	color: #555 !important;
	border: 1px solid #e0e0e0;
}

/* ── Grid View ── */
.bd-view-grid {
	background: #f7f7f7;
}

.bd-grid-inner {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 200px, 1fr ) );
	gap: 14px;
	padding: 14px;
}

.bd-grid-card {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.15s;
}

.bd-grid-card:hover {
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.bd-gc-header {
	height: 80px;
	background: #EBF3FC;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bd-gc-avatar {
	width: 48px;
	height: 48px;
	font-size: 18px;
}

.bd-gc-logo {
	width: 60px;
	height: 60px;
	object-fit: contain;
	border-radius: 8px;
}

.bd-gc-body {
	padding: 10px 12px;
}

.bd-gc-name {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bd-gc-addr {
	font-size: 11px;
	color: #888;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bd-gc-actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
}

.bd-gc-actions .bd-btn {
	flex: 1;
	text-align: center;
	font-size: 11px;
	padding: 5px 8px;
}

/* ── List View ── */
.bd-list-wrap {
	overflow-x: auto;
}

.bd-list-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.bd-list-table thead th {
	padding: 10px 14px;
	text-align: left;
	font-size: 11px;
	font-weight: 600;
	color: #888;
	border-bottom: 1px solid #ebebeb;
	background: #fafafa;
	white-space: nowrap;
}

.bd-list-row td {
	padding: 10px 14px;
	border-bottom: 1px solid #f0f0f0;
	color: #444;
	vertical-align: middle;
}

.bd-list-row:hover td {
	background: #f7f9fc;
}

.bd-lv-name {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	color: #1a1a1a;
}

.bd-lv-avatar {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	font-size: 10px;
}

.bd-lv-actions {
	display: flex;
	gap: 5px;
}

.bd-lv-btn {
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	background: #fff;
	color: #555;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: background 0.12s;
}

.bd-lv-btn:hover {
	background: #f0f0f0;
}

/* ── Shortcode Bar ── */
.bd-shortcode-bar {
	background: #fafafa;
	border-top: 1px solid #ebebeb;
	padding: 7px 14px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.bd-sc-label {
	font-size: 11px;
	color: #999;
}

.bd-sc-code {
	font-family: monospace;
	font-size: 11px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 2px 8px;
	color: #185FA5;
}

.bd-sc-sep {
	color: #ccc;
}

/* ── No results ── */
.bd-no-results {
	padding: 40px;
	text-align: center;
	color: #aaa;
	font-size: 14px;
}

/* ── Responsive ── */
@media ( max-width: 640px ) {
	.bd-sidebar {
		display: none;
	}

	.bd-map-controls {
		gap: 6px;
	}

	.bd-filter-select {
		font-size: 12px;
		padding: 6px 8px;
	}

	.bd-grid-inner {
		grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
		gap: 10px;
		padding: 10px;
	}

	.bd-list-table {
		font-size: 12px;
	}

	.bd-shortcode-bar {
		display: none;
	}
}
