/**
 * Listing card "Logo" (Customizer > Listings List Options > Listings content
 * layout, per-category layout, [listings style="logo"], Listeo Elementor listing
 * widgets). Logo, name, rating, one sentence, price. Loaded only where the card
 * is used. Markup: listeo-core templates/content-listing-logo.php.
 */
.listeo-logo-grid,
.listing-card-logo {
	--listeo-logo-card-text: #222;
	--listeo-logo-card-muted: #6a6a6a;
	--listeo-logo-card-line: #e8e8e8;
	--listeo-logo-card-tint: #f5f5f5;
	--listeo-logo-card-star: #ffab44;
	--listeo-logo-card-size: 56px;
	--listeo-logo-card-pad: 18px;
}

/* Grid. [data-style] matches the specificity of the stacked-list rule in style.css. */
#listeo-listings-container.listeo-logo-grid[data-style],
.listeo-logo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
	margin-left: 0;
	margin-right: 0;
}

.listeo-logo-grid::before,
.listeo-logo-grid::after,
.listeo-logo-grid > .clearfix {
	display: none;
}

#listeo-listings-container.listeo-logo-grid.listeo-logo-list[data-style] {
	grid-template-columns: minmax(0, 1fr);
}

/* Elementor Listings widget, "Grid columns": at most that many columns, never narrower than 280px. */
#listeo-listings-container.listeo-logo-grid.listeo-logo-cols-1[data-style] {
	grid-template-columns: minmax(0, 1fr);
}

#listeo-listings-container.listeo-logo-grid.listeo-logo-cols-2[data-style] {
	grid-template-columns: repeat(auto-fill, minmax(max(280px, calc(50% - 8.01px)), 1fr));
}

#listeo-listings-container.listeo-logo-grid.listeo-logo-cols-3[data-style] {
	grid-template-columns: repeat(auto-fill, minmax(max(280px, calc((100% - 32px) / 3 - 0.01px)), 1fr));
}

/* Card */
.listing-card-logo {
	position: relative;
	display: flex;
	min-width: 0;
	border: 1px solid var(--listeo-logo-card-line);
	border-radius: 14px;
	background: #fff;
	color: var(--listeo-logo-card-text);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.listing-card-logo:hover,
.listing-card-logo:focus-within {
	border-color: #c9c9c9;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.listing-card-logo .listing-card-logo__link,
.listing-card-logo .listing-card-logo__link:hover,
.listing-card-logo .listing-card-logo__link:focus {
	display: flex;
	flex: 1 1 auto;
	align-items: flex-start;
	gap: 14px;
	min-width: 0;
	padding: var(--listeo-logo-card-pad) var(--listeo-logo-card-pad) 50px;
	border-radius: inherit;
	color: inherit;
	text-decoration: none;
}

.listing-card-logo__image {
	display: flex;
	flex: 0 0 var(--listeo-logo-card-size);
	align-items: center;
	justify-content: center;
	overflow: hidden;
	width: var(--listeo-logo-card-size);
	height: var(--listeo-logo-card-size);
	border-radius: 12px;
	background: var(--listeo-logo-card-tint);
}

.listing-card-logo .listing-card-logo__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
}

/* A logo stays whole, on a square in the card color. A photo fills the tile. */
.listing-card-logo .listing-card-logo__image--logo {
	border: 1px solid var(--listeo-logo-card-line);
	background: #fff;
}

.listing-card-logo .listing-card-logo__image.listing-card-logo__image--logo img {
	box-sizing: border-box;
	padding: 11%;
	border-radius: inherit;
	object-fit: contain;
}

.listing-card-logo__image--initial {
	color: var(--listeo-logo-card-muted);
	font-size: 22px;
	font-weight: 600;
	line-height: 1;
}

.listing-card-logo__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	min-height: var(--listeo-logo-card-size);
}

.listing-card-logo__head {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.listing-card-logo .listing-card-logo__title {
	overflow: hidden;
	min-width: 0;
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
	letter-spacing: -0.01em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.listing-card-logo__badge {
	flex: none;
	padding: 0 6px;
	border-radius: 4px;
	background: #fff3c4;
	color: #5c4a00;
	font-size: 11px;
	font-weight: 500;
	line-height: 18px;
}

.listing-card-logo__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 8px;
	margin-top: 2px;
	color: var(--listeo-logo-card-muted);
	font-size: 13px;
	line-height: 20px;
}

.listing-card-logo__rating {
	color: var(--listeo-logo-card-text);
	font-weight: 500;
}

.listing-card-logo__rating i {
	color: var(--listeo-logo-card-star);
	font-size: 11px;
}

.listing-card-logo__reviews {
	color: var(--listeo-logo-card-muted);
	font-weight: 400;
}

.listing-card-logo__rating + .listing-card-logo__term::before {
	content: "\00b7";
	margin-right: 8px;
}

.listing-card-logo__location {
	flex-basis: 100%;
	min-width: 0;
}

.listing-card-logo .listing-card-logo__excerpt {
	display: -webkit-box;
	overflow: hidden;
	min-height: 40px;
	margin: 6px 0 0;
	padding: 0;
	color: var(--listeo-logo-card-muted);
	font-size: 14px;
	line-height: 20px;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

/* Footer row, kept when a listing has no price so cards line up. */
.listing-card-logo__price {
	position: absolute;
	right: 84px;
	bottom: 16px;
	left: calc(var(--listeo-logo-card-pad) + var(--listeo-logo-card-size) + 14px);
	overflow: hidden;
	color: var(--listeo-logo-card-text);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.listing-card-logo__from,
.listing-card-logo__unit {
	color: var(--listeo-logo-card-muted);
	font-weight: 400;
}

/* Bookmark and compare */
.listing-card-logo .listing-card-logo__actions {
	position: absolute;
	right: 12px;
	bottom: 11px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 2px;
}

.listing-card-logo .listing-card-logo__actions .favorite-icon-nl,
.listing-card-logo .listing-card-logo__actions .listeo-compare-toggle {
	position: relative;
	top: auto;
	right: auto;
	left: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--listeo-logo-card-muted);
	font-size: 15px;
	line-height: 1;
	backdrop-filter: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.listing-card-logo .listing-card-logo__actions .favorite-icon-nl:hover,
.listing-card-logo .listing-card-logo__actions .listeo-compare-toggle:hover {
	background: var(--listeo-logo-card-tint);
	color: var(--listeo-logo-card-text);
}

.listing-card-logo .listing-card-logo__actions .listeo-compare-toggle.is-active {
	background: var(--listeo-primary-color, #222);
	color: #fff;
}

.listing-card-logo .favorite-icon-nl .listeo_core-unbookmark-it {
	color: var(--listeo-primary-color, #222);
}

/* Grid/list switcher next to the sorting of the grid with sidebar layout. */
.listeo-logo-sort {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 46px;
}

.listeo-logo-sort > .col-md-3,
.listeo-logo-sort > .col-md-9 {
	float: none;
	width: auto;
	min-height: 0;
	padding: 0;
}

.listeo-logo-sort > .col-md-9 {
	margin-left: auto;
}

/* List view */
@media (min-width: 601px) {
	.listeo-logo-list .listing-card-logo .listing-card-logo__link {
		display: grid;
		grid-template-columns: var(--listeo-logo-card-size) minmax(0, 1fr);
		align-items: center;
		padding: 16px 92px 16px 18px;
	}

	.listeo-logo-list .listing-card-logo__body {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 24px;
		align-items: center;
	}

	.listeo-logo-list .listing-card-logo__head,
	.listeo-logo-list .listing-card-logo__meta,
	.listeo-logo-list .listing-card-logo .listing-card-logo__excerpt {
		grid-column: 1;
	}

	.listeo-logo-list .listing-card-logo .listing-card-logo__excerpt {
		display: block;
		overflow: hidden;
		min-height: 0;
		margin-top: 2px;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.listeo-logo-list .listing-card-logo__price {
		position: static;
		grid-column: 2;
		grid-row: 1 / span 3;
		text-align: right;
	}

	.listeo-logo-list .listing-card-logo .listing-card-logo__actions {
		top: 50%;
		bottom: auto;
		transform: translateY(-50%);
	}
}

@media (max-width: 600px) {
	#listeo-listings-container.listeo-logo-grid[data-style] {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.listing-card-logo {
		--listeo-logo-card-pad: 16px;
	}
}

/* Listings Carousel: slides of the same height, in the carousel spacing. */
.simple-slick-carousel--logo .slick-track {
	display: flex;
}

.simple-slick-carousel--logo .slick-slide {
	height: auto;
}

.simple-slick-carousel--logo .slick-slide > div,
.simple-slick-carousel--logo .fw-carousel-item {
	height: 100%;
}

.simple-slick-carousel--logo .listing-card-logo {
	height: 100%;
}

/* Before slick starts: the columns and spacing of the started carousel, like the "Minimal" card. */
.elementor-widget-listeo-listings-carousel .simple-slick-carousel.simple-slick-carousel--logo:not(.slick-initialized) {
	grid-template-columns: repeat(auto-fill, minmax(max(var(--lc-min-width), calc(100% / var(--lc-columns) - 0.01px)), 1fr));
	grid-template-rows: auto;
	grid-auto-rows: 0;
	gap: 0;
	margin-bottom: 30px;
	padding-bottom: 30px;
	overflow: hidden;
}

.elementor-widget-listeo-listings-carousel .simple-slick-carousel.simple-slick-carousel--logo:not(.slick-initialized) > .fw-carousel-item {
	display: flex;
	padding: 10px 15px;
}

@media (max-width: 816px) {
	.elementor-widget-listeo-listings-carousel .simple-slick-carousel.simple-slick-carousel--logo:not(.slick-initialized) {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 100%;
		overflow: visible;
	}
}

/* Space between single listing content (incl. Similar Listings carousel) and footer. */
.listeo-listing-header-logo .container.listing-showcase {
	padding-bottom: 72px;
}

@media (max-width: 767px) {
	.listeo-listing-header-logo .container.listing-showcase {
		padding-bottom: 40px;
	}
}
