/**
 * Shared video banner + lightbox styles.
 *
 * Companion to inc/vendor-video.php (renderers) and assets/js/video-banner.js
 * (lightbox binding). Loaded site-wide alongside the JS so both the Dokan
 * storefront page and the pro vendor's single-product page share one
 * stylesheet rather than each owning a copy.
 */

/* ── BANNER TILE ── */
.seller-welcome-video {
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #2C2420 0%, #1C1A18 60%, #3D2E28 100%);
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: #fff;
	box-shadow: 0 4px 16px rgba(28,26,24,0.15);
	cursor: pointer;
	position: relative;
	overflow: hidden;
}
.seller-welcome-video--empty { cursor: default; opacity: 0.85; }

/* First-frame preview: covers the tile so the play-btn and label sit on
   top of the actual video thumbnail rather than the bare gradient. */
.seller-welcome-video .seller-welcome-video-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	background: #000;
}
/* A first-frame <video> preview shows the whole clip — vertical videos get
   black side bars rather than a centre crop. Uploaded image thumbnails above
   keep filling the tile. */
.seller-welcome-video video.seller-welcome-video-bg { object-fit: contain; }
.seller-welcome-video::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%),
		radial-gradient(ellipse at 30% 40%, rgba(196,115,90,0.18) 0%, transparent 55%),
		radial-gradient(ellipse at 70% 65%, rgba(201,169,110,0.12) 0%, transparent 55%);
	z-index: 1;
}
.seller-welcome-video .play-btn {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(255,255,255,0.18);
	border: 1.5px solid rgba(255,255,255,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	color: #fff;
	position: relative;
	z-index: 2;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	transition: transform 0.2s var(--ease-out, ease);
}
.seller-welcome-video:hover .play-btn { transform: scale(1.06); background: rgba(255,255,255,0.28); }
.seller-welcome-video .video-label {
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255,255,255,0.85);
	position: relative;
	z-index: 2;
	text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

/* ── LIGHTBOX ── */
.ts-store-video-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(28,26,24,0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.ts-store-video-lightbox[hidden] { display: none; }
.ts-store-video-inner {
	position: relative;
	width: 100%;
	max-width: 880px;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
/* contain, not cover: a vertical (phone) clip keeps its full height inside the
   16:9 frame with black bars at the sides, instead of being cropped to its middle. */
.ts-store-video-inner video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.ts-store-video-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0,0,0,0.5);
	border: none;
	color: #fff;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
}
.ts-store-video-close:hover { background: rgba(0,0,0,0.75); }

/* ── PRODUCT GALLERY VIDEO TILE ──
 * The .product-main-image area is position:relative / overflow:hidden with
 * a 1:1 aspect ratio. The tile sits absolutely so it fills that square
 * regardless of the 16/9 default on .seller-welcome-video.
 */
.product-gallery-video-tile {
	position: absolute;
	inset: 0;
	z-index: 1;
}
.product-gallery-video-tile .seller-welcome-video {
	width: 100%;
	height: 100%;
	aspect-ratio: unset;
	border-radius: 0;
}

/* ── PRODUCT VIDEO THUMB ──
 * 84 × 84 dark tile with a centred play icon — sits in .product-thumbs
 * alongside the regular image thumbnails.
 */
.product-video-thumb {
	background: linear-gradient(135deg, #2C2420 0%, #1C1A18 60%, #3D2E28 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,0.85);
	font-size: 24px;
}
.product-video-thumb i { pointer-events: none; }
