/* ==========================================================================
   Components: lightbox, tables, PDF, back-to-top, eBook badge
   ========================================================================== */

/* Lightbox */
.pswp__bg {
	backdrop-filter: blur(10px);
	background: rgba(0, 0, 0, .5);
}

.pswp__ui--fit .pswp__caption,
.pswp__ui--fit .pswp__top-bar {
	background-color: transparent;
}

.pswp__ui--over-close .pswp__button--close,
.single-product .pswp__button {
	padding: 0;
}

.pswp__caption__center {
	display: none;
}

/* Product tab tables */
.woocommerce-tab-width table:not(.shop_table) td,
.woocommerce-tab-width table:not(.shop_table) th {
	font-size: 15px;
	border-color: #d9d9d9;
}

.woocommerce-tab-width table:not(.shop_table) td:first-of-type,
.woocommerce-tab-width table:not(.shop_table) th:first-of-type {
	font-weight: 700;
}

.woocommerce-tab-width table td,
table th {
	padding: 8px 20px;
}

.woocommerce-tab-width tr:nth-child(odd) {
	background-color: #f5f5f5;
}

@media (max-width: 768px) {
	.woocommerce-tab-width table td,
	table th {
		padding: 5px 10px;
	}

	.woocommerce-tab-width table:not(.shop_table) td,
	.woocommerce-tab-width table:not(.shop_table) th {
		font-size: 14px;
	}

	.woocommerce-tab-width table:not(.shop_table) td:first-of-type,
	.woocommerce-tab-width table:not(.shop_table) th:first-of-type {
		white-space: nowrap;
	}
}

/* PDF reader */
.df-container .df-bg {
	background-color: #FFFFFF !important;
}

/* Kill legacy Elementor "progress-wrap" HTML widget (causes giant circle under footer).
   Back-to-top is now #bsp-back-top from the child theme. */
.progress-wrap,
.elementor-widget-html .progress-wrap,
.progress-wrap .progress-circle,
.progress-wrap .svg-content {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	visibility: hidden !important;
	pointer-events: none !important;
	opacity: 0 !important;
	position: absolute !important;
	left: -9999px !important;
}

/* Back to top — isolated from theme button styles */
#bsp-back-top.bsp-back-top {
	box-sizing: border-box !important;
	position: fixed !important;
	right: 20px !important;
	bottom: 28px !important;
	z-index: 10000 !important;
	display: none;
	align-items: center;
	justify-content: center;
	width: 48px !important;
	height: 48px !important;
	min-width: 48px !important;
	max-width: 48px !important;
	min-height: 48px !important;
	max-height: 48px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #111111 !important;
	background-image: none !important;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22) !important;
	cursor: pointer !important;
	line-height: 1 !important;
	font-size: 0 !important;
	text-decoration: none !important;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease !important;
	overflow: hidden !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

#bsp-back-top.bsp-back-top.is-visible {
	display: flex !important;
	opacity: 1;
	transform: translateY(0);
}

#bsp-back-top.bsp-back-top:hover,
#bsp-back-top.bsp-back-top:focus-visible {
	background: #eb5751 !important;
	color: #ffffff !important;
	outline: none !important;
}

#bsp-back-top.bsp-back-top svg {
	display: block !important;
	width: 20px !important;
	height: 20px !important;
	max-width: 20px !important;
	max-height: 20px !important;
	margin: 0 !important;
	pointer-events: none;
}

@media (max-width: 1024px) {
	#bsp-back-top.bsp-back-top {
		right: 16px !important;
		bottom: 96px !important;
	}
}

@media (max-width: 768px) {
	#bsp-back-top.bsp-back-top {
		width: 44px !important;
		height: 44px !important;
		min-width: 44px !important;
		max-width: 44px !important;
		min-height: 44px !important;
		max-height: 44px !important;
		bottom: 78px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	#bsp-back-top.bsp-back-top {
		transition: none !important;
	}
}

/* eBook badge */
.ebook-badge {
	background-color: #eb5751;
	color: white;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 10px;
	border-radius: 0;
	position: absolute;
	bottom: -10px;
	left: 10px;
	z-index: 10;
	text-transform: uppercase;
}

@media (max-width: 1024px) {
	.ebook-badge {
		font-size: 10px;
		padding: 3px 6px;
	}
}

.single-product .summary .ebook-badge {
	display: inline-block;
	position: relative;
	top: auto;
	bottom: auto;
	left: auto;
	font-size: 13px;
	margin-bottom: 10px;
	padding: 5px 12px;
}
