/* ==========================================================================
   Video Feed Plugin – Full-width TikTok/Shorts style
   Each card = 100vw wide, 100vh tall. Page itself scrolls. Infinite feed.
   ========================================================================== */

/* ---------- Reset & custom properties ---------- */
:root {
	--vfp-accent:       #e94560;
	--vfp-accent-light: #ff6b6b;
	--vfp-bg:           #0a0a0a;
	--vfp-card-bg:      #111;
	--vfp-text:         #ffffff;
	--vfp-text-muted:   #aaaaaa;
	--vfp-transition:   .25s ease;
}

/* ---------- Wrapper – full bleed, no max-width ---------- */
.vfp-feed-wrapper {
	width: 100%;
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--vfp-text);
	background: var(--vfp-bg);
}

/* ---------- Sticky progress bar at top ---------- */
.vfp-progress-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	height: 4px;
	background: rgba(255,255,255,.12);
}

.vfp-progress-bar__inner {
	height: 100%;
	background: linear-gradient(90deg, var(--vfp-accent), var(--vfp-accent-light));
	transition: width .5s ease;
}

.vfp-progress-bar__label {
	position: fixed;
	top: 8px;
	right: 12px;
	z-index: 101;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: rgba(0,0,0,.55);
	padding: 2px 10px;
	border-radius: 99px;
	letter-spacing: .04em;
	backdrop-filter: blur(6px);
}

/* ---------- Feed – normal block flow, page scrolls ---------- */
.vfp-feed {
	width: 100%;
	display: block;
}

/* ---------- Individual card – full viewport ---------- */
.vfp-card {
	position: relative;
	width: 100%;
	height: 100vh;           /* Each card = full screen height */
	background: var(--vfp-card-bg);
	display: block;
	cursor: pointer;
	overflow: hidden;
}

/* Optional: snap each card while page-scrolling */
.vfp-feed {
	scroll-snap-type: y mandatory;
}
.vfp-card {
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

/* Thumbnail fills entire card */
.vfp-card__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: #000;
}

.vfp-card__thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform var(--vfp-transition), opacity var(--vfp-transition);
}

.vfp-card:hover .vfp-card__thumb {
	transform: scale(1.02);
}

/* Inline video */
.vfp-card__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: none;
	background: #000;
	border: none;
}

.vfp-card__video.is-active {
	display: block;
}

/* Play button – centred over card */
.vfp-card__play-btn {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
	z-index: 3;
	transition: opacity var(--vfp-transition);
}

.vfp-card__play-btn:focus-visible {
	outline: 3px solid var(--vfp-accent-light);
}

.vfp-card__play-icon {
	width: 72px;
	height: 72px;
	background: rgba(0,0,0,.5);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
	transition: transform .2s, background .2s;
}

.vfp-card__play-btn:hover .vfp-card__play-icon,
.vfp-card__play-btn:focus  .vfp-card__play-icon {
	transform: scale(1.12);
	background: rgba(233,69,96,.7);
}

.vfp-card__play-icon svg {
	width: 30px;
	height: 30px;
	fill: #fff;
	margin-left: 5px;
}

/* Dark gradient at bottom so text is readable */
.vfp-card__media::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 50%;
	background: linear-gradient(to top, rgba(0,0,0,.88) 0%, transparent 100%);
	pointer-events: none;
	z-index: 1;
}

/* Title + date at bottom-left */
.vfp-card__info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 1.25rem 1.25rem 1.5rem;
	z-index: 4;
}

.vfp-card__title {
	margin: 0 0 .4rem;
	font-size: clamp(16px, 4.5vw, 22px);
	font-weight: 800;
	line-height: 1.3;
	color: #fff;
	text-shadow: 0 2px 8px rgba(0,0,0,.7);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vfp-card__meta {
	font-size: 13px;
	color: rgba(255,255,255,.7);
	letter-spacing: .02em;
}

/* Visited state */
.vfp-card.is-visited .vfp-card__thumb {
	opacity: .5;
}

.vfp-card__visited-badge {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: var(--vfp-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 99px;
	letter-spacing: .06em;
	text-transform: uppercase;
	z-index: 5;
	box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* ---------- Loading spinner (shown before first batch) ---------- */
.vfp-feed__loading {
	width: 100%;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--vfp-bg);
}

.vfp-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid rgba(255,255,255,.15);
	border-top-color: var(--vfp-accent);
	border-radius: 50%;
	animation: vfp-spin .75s linear infinite;
}

@keyframes vfp-spin { to { transform: rotate(360deg); } }

/* Sentinel – invisible, triggers next page load */
.vfp-feed__sentinel {
	height: 80px;
	background: transparent;
}

.vfp-feed__end-msg {
	padding: 2rem;
	text-align: center;
	font-size: 14px;
	color: var(--vfp-text-muted);
	background: var(--vfp-bg);
}

/* ---------- Post content below feed ---------- */
.vfp-post-content {
	position: relative;
	z-index: 10;
	background: #fff;
	padding: 1.5rem;
}

/* ---------- Redirect overlay ---------- */
.vfp-redirect-overlay {
	position: fixed;
	inset: 0;
	background: rgba(5,5,10,.93);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	color: #fff;
	text-align: center;
	padding: 2rem;
	animation: vfp-fadein .4s ease;
}

@keyframes vfp-fadein { from { opacity: 0; } }

.vfp-redirect-overlay__title {
	font-size: clamp(24px, 6vw, 40px);
	font-weight: 900;
	margin: 0 0 .75rem;
	background: linear-gradient(90deg, var(--vfp-accent), var(--vfp-accent-light));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.vfp-redirect-overlay__msg {
	font-size: 16px;
	color: #aaa;
	margin: 0 0 2rem;
}

.vfp-redirect-overlay__countdown {
	font-size: 56px;
	font-weight: 900;
	color: var(--vfp-accent-light);
	line-height: 1;
	margin-bottom: 1.5rem;
}

.vfp-redirect-overlay__btn {
	display: inline-block;
	padding: .85rem 2.5rem;
	background: var(--vfp-accent);
	color: #fff;
	text-decoration: none;
	border-radius: 10px;
	font-weight: 700;
	font-size: 16px;
	transition: background .2s;
}

.vfp-redirect-overlay__btn:hover { background: var(--vfp-accent-light); color: #fff; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.vfp-spinner { animation: none; border-color: var(--vfp-accent); }
	.vfp-card__thumb,
	.vfp-card__play-icon { transition: none; }
}
