/**
 * JezPress Elements — Logo Carousel widget.
 *
 * Swiper carousel of logos from the Logos CPT.
 *
 * @package JezPress\Elements
 * @since   1.3.0
 */

.jpe-logo-carousel {
	position: relative;
	width: 100%;
}

.jpe-lc__swiper {
	width: 100%;
}

/* Each slide centres its logo vertically + horizontally. */
.jpe-lc__slide {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: auto;
}

.jpe-lc__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	text-decoration: none;
}

.jpe-lc__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 64px; /* overridden by the Max Height control */
	object-fit: contain;
}

/* Greyscale (colour on hover) — toggled by the prefix class the control adds. */
.jpe-lc-grayscale-yes .jpe-lc__img {
	filter: grayscale(100%);
	opacity: 0.75;
	transition: filter 0.25s ease, opacity 0.25s ease;
}

.jpe-lc-grayscale-yes .jpe-lc__slide:hover .jpe-lc__img {
	filter: grayscale(0);
	opacity: 1;
}

/* ---- Arrows ---- */
.jpe-lc__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #333;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.jpe-lc__nav:hover {
	background: rgba(0, 0, 0, 0.06);
}

.jpe-lc__nav--prev { left: -6px; }
.jpe-lc__nav--next { right: -6px; }

.jpe-lc__nav.swiper-button-disabled {
	opacity: 0.3;
	cursor: default;
}

/* ---- Dots ---- */
.jpe-lc__pagination {
	position: static;
	margin-top: 14px;
	text-align: center;
}

.jpe-lc__pagination .swiper-pagination-bullet-active {
	background-color: #333;
}

/* ---- Placeholder (editor only) ---- */
.jpe-logo-carousel--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	padding: 24px;
	border: 1px dashed #b0bec5;
	border-radius: 6px;
	background: #f5f7f8;
	color: #607d8b;
	text-align: center;
}

@media (max-width: 767px) {
	.jpe-lc__nav--prev { left: 0; }
	.jpe-lc__nav--next { right: 0; }
}
