/*
 * Compact Directorist map popup cards.
 * This is CSS-only so the map page keeps the same data, queries, and scripts.
 */

.directorist-archive-map-view {
	--fsf-map-card-width: 220px;
	--fsf-map-card-image-height: 88px;
}

.directorist-archive-map-view .gm-style .gm-style-iw,
.directorist-archive-map-view .gm-style .gm-style-iw-c,
.directorist-archive-map-view .gm-style .gm-style-iw-d {
	max-width: min(var(--fsf-map-card-width), calc(100vw - 64px)) !important;
}

.directorist-archive-map-view .gm-style .gm-style-iw-c {
	width: var(--fsf-map-card-width) !important;
	padding: 0 !important;
	border-radius: 10px !important;
	overflow: hidden !important;
}

.directorist-archive-map-view .gm-style .gm-style-iw-d {
	overflow: hidden !important;
}

.directorist-archive-map-view #map.leaflet-container .leaflet-popup-content,
.directorist-archive-map-view .directorist-single-map.leaflet-container .leaflet-popup-content {
	width: var(--fsf-map-card-width) !important;
	margin: 8px !important;
}

.directorist-archive-map-view #map.leaflet-container .leaflet-popup-content-wrapper,
.directorist-archive-map-view .directorist-single-map.leaflet-container .leaflet-popup-content-wrapper {
	border-radius: 10px;
	overflow: hidden;
}

.directorist-archive-map-view .gm-style .gm-ui-hover-effect {
	top: 6px !important;
	right: 6px !important;
	width: 26px !important;
	height: 26px !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.94) !important;
}

.directorist-archive-map-view .gm-style .map-listing-card-single,
.directorist-archive-map-view #map.leaflet-container .leaflet-popup-content .map-listing-card-single,
.directorist-archive-map-view .directorist-single-map.leaflet-container .leaflet-popup-content .map-listing-card-single {
	width: 100%;
	max-width: min(var(--fsf-map-card-width), calc(100vw - 64px));
	box-sizing: border-box;
	overflow: hidden;
	border-radius: 10px;
	background: #fff;
}

.directorist-archive-map-view .gm-style .map-listing-card-single *,
.directorist-archive-map-view #map.leaflet-container .leaflet-popup-content .map-listing-card-single *,
.directorist-archive-map-view .directorist-single-map.leaflet-container .leaflet-popup-content .map-listing-card-single * {
	box-sizing: border-box;
}

.directorist-archive-map-view .map-listing-card-single__img,
.directorist-archive-map-view .map-listing-card-single__img a,
.directorist-archive-map-view .map-listing-card-single__img figure {
	display: block;
	width: 100%;
	margin: 0;
}

.directorist-archive-map-view .map-listing-card-single__img img {
	display: block;
	width: 100%;
	height: var(--fsf-map-card-image-height);
	object-fit: cover;
}

.directorist-archive-map-view #map.leaflet-container .leaflet-popup-content .map-listing-card-single__img img,
.directorist-archive-map-view .directorist-single-map.leaflet-container .leaflet-popup-content .map-listing-card-single__img img {
	width: 100% !important;
	height: var(--fsf-map-card-image-height) !important;
	max-width: 100% !important;
	object-fit: cover;
}

.directorist-archive-map-view .map-listing-card-single__content {
	padding: 10px 12px 12px;
}

.directorist-archive-map-view .map-listing-card-single__content__title {
	margin: 0 0 7px;
	font-size: 15px;
	line-height: 1.25;
	font-weight: 600;
}

.directorist-archive-map-view .map-listing-card-single__content__title a,
.directorist-archive-map-view .map-listing-card-single__content__location {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
}

.directorist-archive-map-view .map-listing-card-single__content__title a {
	-webkit-line-clamp: 2;
	color: inherit;
	text-decoration: none;
}

.directorist-archive-map-view .map-listing-card-single__content__info {
	gap: 6px;
	font-size: 12.5px;
	line-height: 1.35;
}

.directorist-archive-map-view .map-listing-card-single__content__address {
	display: flex;
	gap: 6px;
	align-items: flex-start;
	margin: 0;
}

.directorist-archive-map-view .map-listing-card-single__content__address .directorist-icon-mask {
	flex: 0 0 13px;
	width: 13px;
	height: 13px;
	margin-top: 2px;
}

.directorist-archive-map-view .map-listing-card-single__content__location {
	-webkit-line-clamp: 2;
	min-width: 0;
}

.directorist-archive-map-view .map-listing-card-single > .directorist-mark-as-favorite__btn {
	top: 8px;
	right: 8px;
	width: 30px;
	height: 30px;
	min-width: 30px;
}

@media (max-width: 767px) {
	.directorist-archive-map-view {
		--fsf-map-card-width: 205px;
		--fsf-map-card-image-height: 72px;
	}

	.directorist-archive-map-view .gm-style .gm-style-iw,
	.directorist-archive-map-view .gm-style .gm-style-iw-c,
	.directorist-archive-map-view .gm-style .gm-style-iw-d,
	.directorist-archive-map-view .gm-style .map-listing-card-single,
	.directorist-archive-map-view #map.leaflet-container .leaflet-popup-content .map-listing-card-single,
	.directorist-archive-map-view .directorist-single-map.leaflet-container .leaflet-popup-content .map-listing-card-single {
		max-width: min(var(--fsf-map-card-width), calc(100vw - 44px)) !important;
	}

	.directorist-archive-map-view .gm-style .gm-style-iw-c {
		width: min(var(--fsf-map-card-width), calc(100vw - 44px)) !important;
	}

	.directorist-archive-map-view .map-listing-card-single__content {
		padding: 8px 10px 10px;
	}

	.directorist-archive-map-view .map-listing-card-single__content__title {
		margin-bottom: 6px;
		font-size: 13.5px;
		line-height: 1.22;
	}

	.directorist-archive-map-view .map-listing-card-single__content__info {
		font-size: 12px;
		line-height: 1.3;
	}

	.directorist-archive-map-view .map-listing-card-single > .directorist-mark-as-favorite__btn {
		top: 6px;
		right: 6px;
		width: 26px;
		height: 26px;
		min-width: 26px;
	}
}
