/* LDNIO Smart Video Shopping - storefront styles. Theme-agnostic, high specificity, no global leakage. */

:root {
	--lsvs-accent: #ff6a00;
}

#lsvs-fab, .lsvs-fab {
	background: var(--lsvs-accent);
	color: #fff;
	position: fixed;
	bottom: 18px;
	right: 18px;
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--lsvs-accent, #ff6a00);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lsvs-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32); }
.lsvs-fab.lsvs-left { right: auto; left: 18px; }
.lsvs-fab-icon { font-size: 14px; line-height: 1; }

body.lsvs-open { overflow: hidden; }

.lsvs-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(8, 8, 10, 0.96);
}
.lsvs-overlay[hidden] { display: none; }

.lsvs-shell {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lsvs-overlay button { box-sizing: border-box; }
.lsvs-overlay .lsvs-close {
	box-sizing: border-box;
	padding: 0;
	min-width: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 14px;
	right: 16px;
	z-index: 5;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.lsvs-rtl .lsvs-close { right: auto; left: 16px; }

.lsvs-feed {
	height: 100%;
	width: 100%;
	max-width: 460px;
	overflow-y: auto;
	scroll-snap-type: y mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.lsvs-feed::-webkit-scrollbar { display: none; }

.lsvs-slide {
	position: relative;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
}

.lsvs-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #000;
}

.lsvs-card {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 14px 14px 18px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
	color: #fff;
}
.lsvs-card-top {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #fff;
	margin-bottom: 10px;
}
.lsvs-card-img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 10px;
	background: #222;
	flex: none;
}
.lsvs-card-name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.lsvs-card-price { font-size: 14px; margin-top: 3px; }
.lsvs-card-price ins { text-decoration: none; color: #ffd7b8; font-weight: 700; }
.lsvs-card-price del { opacity: 0.65; margin-right: 6px; font-size: 12px; }

.lsvs-card-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.lsvs-attr {
	flex: 1 1 45%;
	min-width: 130px;
	padding: 9px 10px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(20, 20, 22, 0.9);
	color: #fff;
	font-size: 13px;
}
.lsvs-attr.lsvs-err { border-color: #ff5252; }
.lsvs-oos { font-size: 14px; color: #ffb4b4; }

.lsvs-card-actions { display: flex; gap: 10px; align-items: stretch; }
.lsvs-atc {
	flex: 1;
	padding: 13px 16px;
	border: 0;
	border-radius: 12px;
	background: var(--lsvs-accent, #ff6a00);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.lsvs-atc:disabled { opacity: 0.7; cursor: wait; }
.lsvs-view {
	padding: 13px 16px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	white-space: nowrap;
}

.lsvs-nav {
	position: absolute;
	right: 12px;
	bottom: 130px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	z-index: 5;
}
.lsvs-rtl .lsvs-nav { right: auto; left: 12px; }
.lsvs-overlay .lsvs-nav-btn {
	padding: 0; min-width: 0;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	font-size: 14px;
	cursor: pointer;
}

@media (min-width: 768px) {
	.lsvs-feed {
		max-width: 430px;
		height: min(92vh, 900px);
		border-radius: 18px;
		overflow: hidden auto;
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	}
	.lsvs-feed { scroll-snap-type: y mandatory; }
	.lsvs-slide { border-radius: 18px; }
}

/* v2.0.5 mobile placement. The script measures the theme's real bottom bar
   and sets an inline bottom; these values are the no-script fallback and also
   cover the case where the bar is taller than expected (safe-area included). */
@media (max-width: 768px) {
	#lsvs-fab, .lsvs-fab {
		left: 10px;
		right: auto;
		bottom: calc(var(--lsvs-offset, 18px) + 64px + env(safe-area-inset-bottom, 0px));
		padding: 8px 12px;
		font-size: 12px;
		gap: 6px;
		max-width: 46vw;
	}
	.lsvs-fab.lsvs-left { left: 10px; right: auto; }
	.lsvs-fab .lsvs-fab-icon { font-size: 11px; }
	.lsvs-fab .lsvs-fab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* v2.0 additions */
.lsvs-hide-desktop { display: none; }
@media (max-width: 768px) {
	.lsvs-hide-mobile { display: none; }
	.lsvs-hide-desktop { display: inline-flex; }
}
.lsvs-progress {
	position: absolute; top: 0; left: 0; right: 0; height: 3px;
	background: rgba(255,255,255,.25); z-index: 6; pointer-events: none;
}
.lsvs-progress-bar { height: 100%; width: 0; background: var(--lsvs-accent, #ff6a00); transition: width .2s linear; }
.lsvs-controls {
	position: absolute; top: 68px; inset-inline-end: 12px; z-index: 7;
	display: flex; flex-direction: column; gap: 10px;
}
.lsvs-overlay .lsvs-ctrl {
	padding: 0; min-width: 0;
	width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(0,0,0,.55); color: #fff; font-size: 15px; line-height: 1;
	display: inline-flex; align-items: center; justify-content: center;
}
.lsvs-ctrl:focus-visible { outline: 2px solid var(--lsvs-accent, #ff6a00); }
.lsvs-like.lsvs-liked { color: #ff4d6d; }
.lsvs-chips {
	position: absolute; top: 12px; inset-inline-start: 12px; inset-inline-end: 60px; z-index: 7;
	display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px;
}
.lsvs-overlay .lsvs-chip {
	flex: 0 0 auto; border: 1px solid rgba(255,255,255,.4); border-radius: 999px;
	background: rgba(0,0,0,.45); color: #fff; padding: 5px 12px; font-size: 12px; cursor: pointer;
}
.lsvs-chip-on { background: var(--lsvs-accent, #ff6a00); border-color: var(--lsvs-accent, #ff6a00); color: #fff; }
.lsvs-stories {
	display: flex; gap: 14px; overflow-x: auto; padding: 72px 20px 24px;
	height: 100%; box-sizing: border-box; align-items: flex-start; align-content: flex-start; flex-wrap: wrap;
	background: #0b0b0b; scrollbar-width: none;
}
.lsvs-story { background: none; border: 0; cursor: pointer; width: 92px; text-align: center; padding: 0; }
.lsvs-story-ring {
	display: block; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; margin: 0 auto;
	border: 3px solid var(--lsvs-accent, #ff6a00); background: #1c1c1c;
}
.lsvs-story-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lsvs-story-name {
	display: block; color: #fff; font-size: 11px; margin-top: 6px; line-height: 1.3;
	max-height: 2.6em; overflow: hidden;
}

/* v2.0.5: loading spinner while the first frame of the active video decodes. */
.lsvs-slide { position: relative; }
.lsvs-spin {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 5;
}
.lsvs-spin::after {
	content: '';
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #fff;
	animation: lsvs-spin 0.8s linear infinite;
}
.lsvs-slide.lsvs-ready .lsvs-spin { display: none; }
@keyframes lsvs-spin { to { transform: rotate(360deg); } }
