/**
 * Divi CSS specificity fix.
 *
 * Divi's own theme stylesheet uses long, deeply-nested selector chains
 * (e.g. "#et-boc .et-l ...") for its list/image/button resets, which
 * beat this plugin's simple class-based rules — the slider's border,
 * shadow, padding, nav icon sizing, and lightbox positioning can all get
 * silently stripped on a Divi-built page. This is a copy of
 * vts-modern.css with that same prefix added to every selector, so it
 * matches (or beats) Divi's specificity instead of losing to it.
 * Only enqueued when Divi is detected — see
 * vts_enqueue_placeholder_card_style_pro() / the Divi module's render().
 *
 * Maintenance note: if vts-modern.css changes, this file needs
 * regenerating to match.
 */

/* Vertical Image Slider - Modern engine + lightbox + upgrade card styles */

#et-boc .et-l .vts-modern-wrap {
	position: relative;
	visibility: hidden;
	max-width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}
#et-boc .et-l .vts-modern-wrap,
#et-boc .et-l .vts-modern-wrap * {
	box-sizing: border-box;
}
#et-boc .et-l .vts-modern-viewport {
	overflow: hidden;
	width: 100%;
}
#et-boc .et-l .vts-modern-track {
	display: flex;
	flex-direction: column;
	will-change: transform;
}
#et-boc .et-l .vts-modern-item {
	flex-shrink: 0;
	text-align: center;
	position: relative;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 5px;
	box-shadow: 0 0 5px rgba( 0, 0, 0, 0.2 );
	padding: 5px;
}
#et-boc .et-l .vts-modern-item img {
	display: block;
	width: 100%;
	object-fit: cover;
	border-radius: 3px;
}
/* No-crop mode: fit the whole image within its box instead of cropping to
   fill it. object-fit:contain's default object-position (50% 50%) already
   centers the image both horizontally and vertically within the box, so no
   extra centering rules are needed beyond switching the fit mode. */
#et-boc .et-l .vts-modern-wrap.vts-no-crop .vts-modern-item img {
	object-fit: contain;
	object-position: center center;
}
#et-boc .et-l .vts-modern-caption {
	position: absolute;
	left: 5px;
	right: 5px;
	bottom: 5px;
	margin: 0;
	background: rgba( 0, 0, 0, 0.55 );
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	padding: 4px 6px;
	text-align: center;
	border-radius: 0 0 3px 3px;
}
#et-boc .et-l .vts-modern-wrap .vts-modern-nav {
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	background: none !important;
	background-color: transparent !important;
	border: 0 !important;
	border-radius: 50% !important;
	outline: none !important;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	cursor: pointer !important;
	padding: 0 !important;
	margin: 4px auto !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	min-height: 32px !important;
	line-height: 1 !important;
	text-decoration: none !important;
	transition: background-color 0.15s ease !important;
}
#et-boc .et-l .vts-modern-wrap .vts-modern-nav svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	opacity: 0.65;
	transition: opacity 0.15s ease;
	pointer-events: none;
}
#et-boc .et-l .vts-modern-wrap .vts-modern-nav:hover,
#et-boc .et-l .vts-modern-wrap .vts-modern-nav:focus,
#et-boc .et-l .vts-modern-wrap .vts-modern-nav:active {
	background: none !important;
	background-color: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}
#et-boc .et-l .vts-modern-wrap .vts-modern-nav:hover svg,
#et-boc .et-l .vts-modern-wrap .vts-modern-nav:focus svg {
	opacity: 1;
}
#et-boc .et-l .vts-modern-wrap .vts-modern-nav:focus-visible {
	outline: 2px solid currentColor !important;
	outline-offset: 1px;
}

/* Lightbox trigger affordance */
#et-boc .et-l .vts-lightbox-trigger {
	cursor: zoom-in;
}

/* Lightbox overlay */
#et-boc .et-l .vts-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.85 );
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease;
	z-index: 100000;
}
#et-boc .et-l .vts-lightbox-overlay.is-open {
	opacity: 1;
	visibility: visible;
}
#et-boc .et-l body.vts-lightbox-open {
	overflow: hidden;
}
#et-boc .et-l .vts-lightbox-stage {
	max-width: 90vw;
	max-height: 85vh;
	text-align: center;
}
#et-boc .et-l .vts-lightbox-img {
	max-width: 90vw;
	max-height: 80vh;
	display: block;
	margin: 0 auto;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.5 );
	border-radius: 4px;
}
#et-boc .et-l .vts-lightbox-caption {
	color: #fff;
	margin-top: 10px;
	font-size: 14px;
}
#et-boc .et-l .vts-lightbox-close,
#et-boc .et-l .vts-lightbox-prev,
#et-boc .et-l .vts-lightbox-next {
	position: absolute;
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	line-height: 1;
}
#et-boc .et-l .vts-lightbox-close {
	top: 20px;
	right: 30px;
	font-size: 36px;
}
#et-boc .et-l .vts-lightbox-prev,
#et-boc .et-l .vts-lightbox-next {
	top: 50%;
	transform: translateY( -50% );
	font-size: 48px;
	padding: 10px 16px;
}
#et-boc .et-l .vts-lightbox-prev {
	left: 10px;
}
#et-boc .et-l .vts-lightbox-next {
	right: 10px;
}
#et-boc .et-l .vts-lightbox-close:hover,
#et-boc .et-l .vts-lightbox-prev:hover,
#et-boc .et-l .vts-lightbox-next:hover {
	color: #f0b429;
}

/* Shared PRO upgrade card (replaces old affiliate ad boxes) */
#et-boc .et-l .vts-pro-upgrade-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 18px;
	margin-bottom: 15px;
}
#et-boc .et-l .vts-pro-upgrade-card h3 {
	margin: 0 0 8px;
	font-size: 15px;
	color: #1d2327;
}
#et-boc .et-l .vts-pro-upgrade-card ul {
	margin: 0 0 14px 18px;
	padding: 0;
	font-size: 13px;
	line-height: 1.6;
	list-style: disc;
	color: #3c434a;
}
#et-boc .et-l .vts-pro-upgrade-card .vts-pro-upgrade-btn {
	display: inline-block;
	background: #2271b1;
	color: #fff;
	text-decoration: none;
	padding: 8px 16px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
}
#et-boc .et-l .vts-pro-upgrade-card .vts-pro-upgrade-btn:hover {
	background: #135e96;
	color: #fff;
}
