/* =========================================
   PGL - Product gallery labels
==========================================*/
.lpgl-filter-wrap {
	width: 100%;
	margin: 10px 0 -15px !important;
	position: relative;
	z-index: 8;
	pointer-events: auto;
}

.woocommerce-product-gallery > .lpgl-filter-wrap,
.product-gallery > .lpgl-filter-wrap {
	width: 100%;
	margin: 10px 0 -15px !important;
}

/* Remove legacy overlays from earlier versions. */
.lpgl-gallery-context-badge,
.lpgl-gallery-counter,
.pgl-real-badge,
[data-lpgl-real-badge],
[data-lpgl-slide-counter],
[data-pgl-main-real-badge],
[data-pgl-main-counter],
.product-thumbnails .lpgl-gallery-context-badge,
.product-thumbnails .lpgl-gallery-counter,
.flex-control-nav .lpgl-gallery-context-badge,
.flex-control-nav .lpgl-gallery-counter {
	display: none !important;
}

.lpgl-toolbar-scroll {
	position: relative;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.lpgl-toolbar-scroll::-webkit-scrollbar {
	display: none;
}

.lpgl-media-toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: max-content;
	min-width: 100%;
	margin: 0 auto;
	padding: 0 8px;
	box-sizing: border-box;
}

.lpgl-video-trigger {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	height: 25px;
	min-height: 25px;
	padding: 0 12px !important;
	border: 1px solid rgba(166, 150, 112, .72) !important;
	border-radius: 999px !important;
	background: rgba(250, 248, 243, .98) !important;
	color: rgba(17, 17, 17, .86) !important;
	font-size: 12.2px !important;
	font-weight: 600;
	line-height: 1 !important;
	letter-spacing: .003em;
	text-transform: none !important;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(0, 0, 0, .035) !important;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}

.lpgl-video-trigger:hover {
	opacity: 1;
	border-color: rgba(140, 122, 86, .86) !important;
	background: rgba(246, 241, 232, .98) !important;
	color: #111 !important;
}

.lpgl-filter-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.lpgl-filter-button {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	min-height: 24px;
	border: 0 !important;
	background: transparent !important;
	color: rgba(17, 17, 17, .52) !important;
	border-radius: 0;
	padding: 0 1px 2px !important;
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: .002em;
	text-transform: none !important;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none !important;
	transition: color .18s ease, opacity .18s ease;
}

.lpgl-filter-button::before {
	display: none !important;
	content: none !important;
}

.lpgl-filter-button::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: #111;
	opacity: 0;
	transform: scaleX(.72);
	transform-origin: center;
	transition: opacity .18s ease, transform .18s ease;
}

.lpgl-filter-button:hover {
	color: rgba(17, 17, 17, .78) !important;
	background: transparent !important;
}

.lpgl-filter-button.is-active {
	color: #111 !important;
	background: transparent !important;
	font-weight: 600;
	box-shadow: none !important;
}

.lpgl-filter-button.is-active::after {
	opacity: 1;
	transform: scaleX(1);
}

.lpgl-filter-button:focus,
.lpgl-video-trigger:focus {
	outline: none;
}

.lpgl-video-trigger:focus-visible,
.lpgl-filter-button:focus-visible {
	outline: 1px solid rgba(0, 0, 0, .18);
	outline-offset: 2px;
}

.lpgl-filter-wrap + .product-thumbnails,
.lpgl-filter-wrap + .flex-control-nav,
.woocommerce-product-gallery .lpgl-filter-wrap + .product-thumbnails,
.woocommerce-product-gallery .lpgl-filter-wrap + .flex-control-nav {
	margin-top: 4px !important;
	padding-top: 0 !important;
}


/* Large-image badge - CSS only. */
.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text],
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text] {
	position: relative;
}

.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text].is-selected::after,
.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text].flex-active-slide::after,
.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text].slick-current::after,
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text].is-selected::after,
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text].flex-active-slide::after,
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text].slick-current::after {
	content: attr(data-lpgl-main-badge-text);
	position: absolute;
	left: 15px;
	bottom: 15px;
	z-index: 22;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 26px;
	padding: 0 12px;
	border: 1px solid rgba(213, 202, 178, .92);
	border-radius: 999px;
	background: rgba(255, 255, 255, .96);
	color: rgba(17, 17, 17, .78);
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .002em;
	white-space: nowrap;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
	box-sizing: border-box;
}

.woocommerce-product-gallery .product-thumbnails .woocommerce-product-gallery__image[data-lpgl-main-badge-text]::after,
.woocommerce-product-gallery .product-thumbnails [data-lpgl-main-badge-text]::after,
.woocommerce-product-gallery .flex-control-nav .woocommerce-product-gallery__image[data-lpgl-main-badge-text]::after,
.woocommerce-product-gallery .flex-control-nav [data-lpgl-main-badge-text]::after {
	content: none !important;
	display: none !important;
}

body.lpgl-modal-open {
	overflow: hidden;
}

.lpgl-video-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	box-sizing: border-box;
}

.lpgl-video-modal[hidden] {
	display: none !important;
}

.lpgl-video-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .58);
}

.lpgl-video-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(860px, calc(100vw - 36px));
}

.lpgl-video-modal__close {
	appearance: none !important;
	-webkit-appearance: none !important;
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 28px !important;
	height: 28px !important;
	min-height: 28px !important;
	padding: 0 !important;
	border: 1px solid rgba(0, 0, 0, .08) !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, .95) !important;
	color: #111 !important;
	font-size: 18px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	text-transform: none !important;
	box-shadow: 0 5px 16px rgba(0, 0, 0, .10) !important;
	cursor: pointer;
}

.lpgl-video-modal__frame {
	position: relative;
	width: 100%;
	background: #000;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .24);
}

.lpgl-video-modal__frame iframe,
.lpgl-video-modal__frame video {
	display: block;
	width: 100%;
	aspect-ratio: var(--lpgl-video-aspect, 1 / 1);
	max-height: min(82vh, 860px);
	border: 0;
	background: #000;
	object-fit: contain;
}

@media (min-width: 850px) {
	.lpgl-filter-wrap,
	.woocommerce-product-gallery > .lpgl-filter-wrap,
	.product-gallery > .lpgl-filter-wrap {
		margin: 10px 0 -15px !important;
	}

	.lpgl-media-toolbar {
		gap: 12px;
	}

	.lpgl-filter-inner {
		gap: 14px;
	}

	.lpgl-video-trigger {
		font-size: 13px !important;
	}

	.lpgl-filter-button {
		font-size: 14px;
	}
}

@media (max-width: 849px) {
	.lpgl-filter-wrap,
	.woocommerce-product-gallery > .lpgl-filter-wrap,
	.product-gallery > .lpgl-filter-wrap {
		margin: 10px 0 -15px !important;
	}

	.lpgl-toolbar-scroll {
		padding: 0 10px;
	}

	.lpgl-media-toolbar {
		justify-content: center;
		gap: 7px;
		padding: 0;
	}

	.lpgl-video-trigger {
		height: 23px;
		min-height: 23px;
		padding: 0 9px !important;
		font-size: 11px !important;
	}

	.lpgl-filter-inner {
		gap: 10px;
	}

	.lpgl-filter-button {
		font-size: 11.5px;
		padding-bottom: 2px !important;
	}

	.lpgl-filter-wrap.lpgl-has-overflow .lpgl-toolbar-scroll::before,
	.lpgl-filter-wrap.lpgl-has-overflow .lpgl-toolbar-scroll::after {
		position: absolute;
		top: 0;
		bottom: 0;
		z-index: 3;
		pointer-events: none;
		opacity: 0;
		transition: opacity .18s ease;
	}

	.lpgl-filter-wrap.lpgl-has-overflow .lpgl-toolbar-scroll::before {
		content: '‹';
		left: 8px;
		width: 22px;
		display: flex;
		align-items: center;
		justify-content: flex-start;
		font-size: 15px;
		font-weight: 400;
		line-height: 1;
		color: rgba(17, 17, 17, .48);
		background: linear-gradient(to right, #fff 42%, rgba(255, 255, 255, 0));
	}

	.lpgl-filter-wrap.lpgl-has-overflow .lpgl-toolbar-scroll::after {
		content: '›';
		right: 8px;
		width: 22px;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		font-size: 15px;
		font-weight: 400;
		line-height: 1;
		color: rgba(17, 17, 17, .48);
		background: linear-gradient(to left, #fff 42%, rgba(255, 255, 255, 0));
	}

	.lpgl-filter-wrap.lpgl-can-scroll-left .lpgl-toolbar-scroll::before,
	.lpgl-filter-wrap.lpgl-can-scroll-right .lpgl-toolbar-scroll::after {
		opacity: 1;
	}


	.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text].is-selected::after,
	.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text].flex-active-slide::after,
	.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text].slick-current::after,
	.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text].is-selected::after,
	.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text].flex-active-slide::after,
	.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text].slick-current::after {
		left: 12px;
		bottom: 12px;
		min-height: 22px;
		padding: 0 8px;
		font-size: 10px;
	}

	.lpgl-video-modal {
		padding: 14px;
	}

	.lpgl-video-modal__dialog {
		width: min(100%, calc(100vw - 28px));
	}

	.lpgl-video-modal__close {
		top: 8px;
		right: 8px;
		width: 26px !important;
		height: 26px !important;
		min-height: 26px !important;
		font-size: 17px !important;
	}

	.lpgl-video-modal__frame {
		border-radius: 14px;
	}
}

@media (min-width: 600px) and (max-width: 849px) {
	.lpgl-video-trigger {
		height: 25px;
		min-height: 25px;
		padding: 0 11px !important;
		font-size: 12.4px !important;
	}

	.lpgl-filter-button {
		font-size: 13.5px;
	}

	.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text].is-selected::after,
	.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text].flex-active-slide::after,
	.woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image[data-lpgl-main-badge-text].slick-current::after,
	.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text].is-selected::after,
	.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text].flex-active-slide::after,
	.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image[data-lpgl-main-badge-text].slick-current::after {
		left: 14px;
		bottom: 14px;
		min-height: 25px;
		padding: 0 11px;
		font-size: 11.8px;
	}
}

