/**
 * Reels Feed Gallery for Elementor - Stylesheet
 * Authentic Instagram Reels UI/UX + Smooth Swipe-to-Exit + Onboarding Hints
 */

/* ==========================================================================
   1. Trigger Button (Elementor Page Widget)
   ========================================================================== */

.rfe-widget-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.rfe-align-left .rfe-widget-wrapper {
	align-items: flex-start;
}

.rfe-align-center .rfe-widget-wrapper {
	align-items: center;
}

.rfe-align-right .rfe-widget-wrapper {
	align-items: flex-end;
}

.rfe-align-justify .rfe-widget-wrapper {
	align-items: stretch;
}

.rfe-align-justify .rfe-trigger-btn {
	width: 100%;
	justify-content: center;
}

@media (max-width: 1024px) {
	.rfe-align-tablet-left .rfe-widget-wrapper { align-items: flex-start; }
	.rfe-align-tablet-center .rfe-widget-wrapper { align-items: center; }
	.rfe-align-tablet-right .rfe-widget-wrapper { align-items: flex-end; }
	.rfe-align-tablet-justify .rfe-widget-wrapper { align-items: stretch; }
	.rfe-align-tablet-justify .rfe-trigger-btn { width: 100%; justify-content: center; }
}

@media (max-width: 767px) {
	.rfe-align-mobile-left .rfe-widget-wrapper { align-items: flex-start; }
	.rfe-align-mobile-center .rfe-widget-wrapper { align-items: center; }
	.rfe-align-mobile-right .rfe-widget-wrapper { align-items: flex-end; }
	.rfe-align-mobile-justify .rfe-widget-wrapper { align-items: stretch; }
	.rfe-align-mobile-justify .rfe-trigger-btn { width: 100%; justify-content: center; }
}

.rfe-trigger-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 15px 28px;
	border: none;
	border-radius: 999px;
	background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 55%, #fcb045 100%);
	color: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 10px 28px rgba(253, 29, 29, 0.28);
	transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.22s ease,
		filter 0.22s ease,
		background 0.22s ease,
		color 0.22s ease,
		border-color 0.22s ease;
	-webkit-tap-highlight-color: transparent;
}

.rfe-trigger-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 34px rgba(253, 29, 29, 0.36);
	filter: brightness(1.04);
}

.rfe-trigger-btn:active {
	transform: translateY(0) scale(0.975);
}

.rfe-trigger-btn:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
	box-shadow: 0 0 0 5px rgba(253, 29, 29, 0.4);
}

.rfe-trigger-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
}

.rfe-trigger-icon svg {
	width: 20px;
	height: 20px;
	display: block;
}

.rfe-trigger-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
	backdrop-filter: blur(4px);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.rfe-editor-notice {
	margin-top: 10px;
	padding: 8px 14px;
	border-radius: 8px;
	background: rgba(17, 24, 39, 0.08);
	color: #374151;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

/* ==========================================================================
   2. Fullscreen Reels Modal Portal
   ========================================================================== */

html.rfe-scroll-locked,
body.rfe-scroll-locked {
	overflow: hidden !important;
	overscroll-behavior: none !important;
}

.rfe-modal {
	--rfe-backdrop: #000000;
	--rfe-accent: #ff3040;
	--rfe-text: #ffffff;
	--rfe-hint: #ffffff;
	--rfe-hint-opacity: 0.72;

	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--rfe-text);
	user-select: none;
	-webkit-user-select: none;
	overscroll-behavior: none;
	opacity: 0;
	transition: opacity 0.26s ease;
}

.rfe-modal *,
.rfe-modal *::before,
.rfe-modal *::after {
	box-sizing: border-box;
}

.rfe-modal--visible {
	opacity: 1;
}

.rfe-modal--closing {
	opacity: 0;
	pointer-events: none;
}

.rfe-backdrop {
	position: absolute;
	inset: 0;
	background: var(--rfe-backdrop);
	transition: opacity 0.28s ease;
}

.rfe-backdrop--dragging {
	transition: none;
}

/* ==========================================================================
   3. Reels Stage (Mobile Fullscreen / Desktop 9:16 Phone Frame)
   ========================================================================== */

.rfe-stage {
	position: relative;
	width: 100%;
	height: 100%;
	background: #000000;
	overflow: hidden;
	transform: scale(0.95);
	opacity: 0;
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.26s ease,
		border-radius 0.26s ease;
	will-change: transform;
	touch-action: pan-y;
}

.rfe-modal--visible .rfe-stage {
	transform: translate3d(0, 0, 0) scale(1);
	opacity: 1;
}

.rfe-stage--dragging {
	transition: none !important;
	border-radius: 20px !important;
}

.rfe-stage--dismissing {
	transition: transform 0.28s cubic-bezier(0.32, 0, 0.67, 0),
		opacity 0.24s ease !important;
}

@media (min-width: 768px) {
	.rfe-modal--phone-frame .rfe-stage {
		height: min(94dvh, 920px);
		width: calc(min(94dvh, 920px) * 9 / 16);
		max-width: calc(100vw - 130px);
		border-radius: 18px;
		box-shadow: 0 28px 90px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.09);
	}

	.rfe-modal--fullscreen .rfe-stage {
		width: 100%;
		height: 100%;
		border-radius: 0;
	}
}

/* Desktop outer Prev/Next controls */
.rfe-desktop-nav {
	position: absolute;
	right: 26px;
	top: 50%;
	transform: translateY(-50%);
	display: none;
	flex-direction: column;
	gap: 14px;
	z-index: 30;
}

@media (min-width: 820px) {
	.rfe-modal--phone-frame .rfe-desktop-nav {
		display: flex;
	}
}

.rfe-nav-arrow {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.18s ease, opacity 0.2s ease;
}

.rfe-nav-arrow:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.22);
	transform: scale(1.06);
}

.rfe-nav-arrow:active:not(:disabled) {
	transform: scale(0.94);
}

.rfe-nav-arrow:disabled {
	opacity: 0.25;
	cursor: default;
}

.rfe-nav-arrow svg {
	width: 22px;
	height: 22px;
}

/* Desktop floating close button (outside stage) */
.rfe-outer-close {
	position: absolute;
	top: 20px;
	right: 24px;
	z-index: 35;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #ffffff;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.18s ease;
}

.rfe-outer-close:hover {
	background: rgba(255, 255, 255, 0.22);
	transform: scale(1.06);
}

.rfe-outer-close svg {
	width: 20px;
	height: 20px;
}

@media (min-width: 768px) {
	.rfe-modal--close-desktop .rfe-outer-close,
	.rfe-modal--close-always .rfe-outer-close {
		display: flex;
	}
}

/* ==========================================================================
   4. Top Bar Overlay (Inside Stage)
   ========================================================================== */

.rfe-top-bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 18;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: max(16px, env(safe-area-inset-top)) 16px 28px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.56) 0%, rgba(0, 0, 0, 0.18) 60%, rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
}

.rfe-top-left,
.rfe-top-right {
	display: flex;
	align-items: center;
	gap: 10px;
	pointer-events: auto;
}

.rfe-header-title {
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--rfe-text);
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
	line-height: 1;
}

.rfe-slide-counter {
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.34);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 11.5px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.92);
	line-height: 1.2;
}

.rfe-icon-pill {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(0, 0, 0, 0.36);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--rfe-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background 0.18s ease, transform 0.16s ease;
	-webkit-tap-highlight-color: transparent;
}

.rfe-icon-pill:hover {
	background: rgba(0, 0, 0, 0.56);
}

.rfe-icon-pill:active {
	transform: scale(0.9);
}

.rfe-icon-pill svg {
	width: 18px;
	height: 18px;
	display: block;
}

.rfe-inner-close {
	display: none;
}

.rfe-modal--close-always .rfe-inner-close {
	display: inline-flex;
}

@media (min-width: 768px) {
	.rfe-modal--close-always .rfe-inner-close {
		display: none;
	}
	.rfe-modal--fullscreen.rfe-modal--close-desktop .rfe-inner-close,
	.rfe-modal--fullscreen.rfe-modal--close-always .rfe-inner-close {
		display: inline-flex;
	}
	.rfe-modal--fullscreen .rfe-outer-close {
		display: none;
	}
}

/* ==========================================================================
   5. Vertical Scroll-Snap Feed & Slides
   ========================================================================== */

.rfe-feed {
	width: 100%;
	height: 100%;
	overflow-y: scroll;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-y: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.rfe-feed::-webkit-scrollbar {
	display: none;
}

.rfe-slide {
	position: relative;
	width: 100%;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: #050505;
	overflow: hidden;
}

/* Media layer */
.rfe-media-layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: #000000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rfe-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	background: #000000;
}

.rfe-modal--fullscreen .rfe-video {
	object-fit: contain;
	background: #000000;
}

@media (max-width: 767px) {
	.rfe-modal--fullscreen .rfe-video {
		object-fit: cover;
	}
}

.rfe-iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000000;
}

.rfe-iframe-wrap {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000000;
}

.rfe-iframe-wrap--instagram {
	padding: 58px 0 94px;
	background: #000000;
}

.rfe-iframe-wrap--instagram .rfe-iframe {
	width: 100%;
	max-width: 440px;
	height: 100%;
	border-radius: 12px;
	background: #121212;
}

.rfe-iframe-wrap--gdrive {
	padding: 54px 0 112px;
	background: #000000;
}

.rfe-iframe-wrap--gdrive .rfe-iframe {
	width: 100%;
	height: 100%;
	border-radius: 10px;
	background: #0b0b0b;
}

/* Transparent gesture capture layer for native videos & TikTok embeds */
.rfe-gesture-layer {
	position: absolute;
	inset: 0;
	z-index: 5;
	background: transparent;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

/* Edge swipe zones for Instagram embeds so center taps still reach Instagram player */
.rfe-edge-zone {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 44px;
	z-index: 9;
	background: transparent;
	touch-action: pan-y;
}

.rfe-edge-zone--left {
	left: 0;
}

.rfe-edge-zone--right {
	right: 0;
}

/* Buffering spinner */
.rfe-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.22);
	border-top-color: #ffffff;
	z-index: 8;
	opacity: 0;
	pointer-events: none;
	animation: rfe-spin 0.8s linear infinite;
	transition: opacity 0.2s ease;
}

.rfe-slide--loading .rfe-spinner {
	opacity: 1;
}

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

/* ==========================================================================
   6. Bottom Gradient Scrim + Instagram Reels Chrome
   ========================================================================== */

.rfe-bottom-scrim {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 48%;
	background: linear-gradient(
		0deg,
		rgba(0, 0, 0, 0.82) 0%,
		rgba(0, 0, 0, 0.44) 44%,
		rgba(0, 0, 0, 0.12) 76%,
		rgba(0, 0, 0, 0) 100%
	);
	z-index: 10;
	pointer-events: none;
}

/* Bottom-Left Metadata (User, Caption, Audio) */
.rfe-meta {
	position: absolute;
	left: 14px;
	right: 76px;
	bottom: calc(20px + env(safe-area-inset-bottom));
	z-index: 15;
	display: flex;
	flex-direction: column;
	gap: 9px;
	color: var(--rfe-text);
	pointer-events: none;
}

.rfe-meta > * {
	pointer-events: auto;
}

.rfe-profile-row {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: nowrap;
	min-width: 0;
}

.rfe-avatar-wrap {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rfe-avatar-wrap--ring {
	padding: 2px;
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.rfe-avatar-img,
.rfe-avatar-fallback {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #222222;
	border: 1.5px solid #000000;
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}

.rfe-username-group {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
}

.rfe-username {
	font-size: 14px;
	font-weight: 700;
	color: var(--rfe-text);
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 165px;
}

.rfe-verified-badge {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	display: inline-block;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.rfe-follow-btn {
	flex-shrink: 0;
	padding: 4px 12px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.72);
	background: rgba(0, 0, 0, 0.16);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	color: var(--rfe-text);
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.rfe-follow-btn:hover {
	background: rgba(255, 255, 255, 0.16);
	color: var(--rfe-text);
}

.rfe-follow-btn:active {
	transform: scale(0.95);
}

.rfe-follow-btn--active {
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(255, 255, 255, 0.45);
}

/* Caption / Description */
.rfe-caption-wrap {
	font-size: 13.5px;
	line-height: 1.42;
	color: rgba(255, 255, 255, 0.95);
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
	cursor: pointer;
	transition: background 0.22s ease;
}

.rfe-caption-wrap--expanded {
	max-height: 220px;
	overflow-y: auto;
	padding: 10px 12px;
	margin-left: -6px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.58);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.rfe-caption-text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
	white-space: pre-line;
}

.rfe-caption-wrap--expanded .rfe-caption-text {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

.rfe-hashtag,
.rfe-mention {
	font-weight: 600;
	color: #ffffff;
}

.rfe-caption-toggle {
	display: inline-block;
	margin-top: 2px;
	padding: 0;
	border: none;
	background: none;
	color: rgba(255, 255, 255, 0.72);
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}

/* Audio ticker row */
.rfe-audio-bar {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	max-width: 100%;
	width: fit-content;
	padding: 4px 10px 4px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.13);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.94);
}

.rfe-audio-bar svg {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
}

.rfe-audio-label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 210px;
}

/* ==========================================================================
   7. Right-Side Stats & Actions Rail
   ========================================================================== */

.rfe-actions {
	position: absolute;
	right: 10px;
	bottom: calc(20px + env(safe-area-inset-bottom));
	z-index: 16;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 17px;
}

.rfe-action-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 48px;
	padding: 2px;
	border: none;
	background: transparent;
	color: var(--rfe-text);
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.rfe-action-btn:hover {
	color: var(--rfe-text);
}

.rfe-action-btn:active {
	transform: scale(0.86);
}

.rfe-action-icon {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.rfe-action-icon svg {
	width: 27px;
	height: 27px;
	display: block;
}

.rfe-action-count {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.1;
	color: var(--rfe-text);
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

/* Liked & Saved States */
.rfe-action-btn--liked .rfe-action-icon svg {
	fill: var(--rfe-accent);
	stroke: var(--rfe-accent);
	animation: rfe-like-pop 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rfe-action-btn--saved .rfe-action-icon svg {
	fill: var(--rfe-text);
	animation: rfe-like-pop 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes rfe-like-pop {
	0%   { transform: scale(1); }
	35%  { transform: scale(1.32); }
	70%  { transform: scale(0.92); }
	100% { transform: scale(1); }
}

/* Bottom-right rounded square audio disc (Instagram Reels signature) */
.rfe-audio-disc {
	width: 30px;
	height: 30px;
	margin-top: 2px;
	border-radius: 7px;
	border: 2px solid rgba(255, 255, 255, 0.9);
	overflow: hidden;
	background: linear-gradient(135deg, #2b2b2b, #111111);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
}

.rfe-audio-disc img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rfe-audio-disc-eq {
	display: flex;
	align-items: flex-end;
	gap: 2px;
	height: 12px;
}

.rfe-audio-disc-eq span {
	width: 2.5px;
	border-radius: 2px;
	background: #ffffff;
	animation: rfe-eq 0.9s ease-in-out infinite;
}

.rfe-audio-disc-eq span:nth-child(1) { height: 5px; animation-delay: 0s; }
.rfe-audio-disc-eq span:nth-child(2) { height: 11px; animation-delay: 0.2s; }
.rfe-audio-disc-eq span:nth-child(3) { height: 7px; animation-delay: 0.4s; }

.rfe-slide--paused .rfe-audio-disc-eq span {
	animation-play-state: paused;
}

@keyframes rfe-eq {
	0%, 100% { transform: scaleY(0.4); }
	50%      { transform: scaleY(1); }
}

/* ==========================================================================
   8. Progress Bar (Interactive Scrub)
   ========================================================================== */

.rfe-progress-wrap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: env(safe-area-inset-bottom);
	height: 16px;
	z-index: 19;
	display: flex;
	align-items: flex-end;
	cursor: pointer;
	touch-action: none;
}

.rfe-progress-track {
	width: 100%;
	height: 2.5px;
	background: rgba(255, 255, 255, 0.28);
	overflow: hidden;
	transition: height 0.16s ease;
}

.rfe-progress-wrap:hover .rfe-progress-track {
	height: 5px;
}

.rfe-progress-fill {
	width: 0%;
	height: 100%;
	background: #ffffff;
	border-radius: 0 2px 2px 0;
	transition: width 0.08s linear;
}

/* ==========================================================================
   9. Center Play/Pause Flash & Double-Tap Heart Burst & Toast
   ========================================================================== */

.rfe-center-feedback {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 72px;
	height: 72px;
	margin: -36px 0 0 -36px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.48);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 20;
	pointer-events: none;
	opacity: 0;
	transform: scale(0.75);
}

.rfe-center-feedback svg {
	width: 32px;
	height: 32px;
}

.rfe-center-feedback--show {
	animation: rfe-center-pulse 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rfe-center-pulse {
	0%   { opacity: 0; transform: scale(0.72); }
	22%  { opacity: 1; transform: scale(1.04); }
	72%  { opacity: 0.92; transform: scale(1); }
	100% { opacity: 0; transform: scale(1.16); }
}

.rfe-heart-burst {
	position: absolute;
	width: 96px;
	height: 96px;
	margin: -48px 0 0 -48px;
	z-index: 22;
	pointer-events: none;
	filter: drop-shadow(0 8px 22px rgba(255, 48, 64, 0.45));
	animation: rfe-heart-burst-anim 0.82s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.rfe-heart-burst svg {
	width: 100%;
	height: 100%;
}

@keyframes rfe-heart-burst-anim {
	0%   { opacity: 0; transform: scale(0.25) rotate(var(--rfe-tilt, -10deg)); }
	25%  { opacity: 1; transform: scale(1.15) rotate(var(--rfe-tilt, -10deg)); }
	55%  { opacity: 1; transform: scale(0.95) rotate(var(--rfe-tilt, -10deg)); }
	100% { opacity: 0; transform: scale(1.38) translateY(-42px) rotate(var(--rfe-tilt, -10deg)); }
}

.rfe-toast {
	position: absolute;
	top: calc(64px + env(safe-area-inset-top));
	left: 50%;
	transform: translateX(-50%) translateY(-8px);
	z-index: 32;
	padding: 8px 16px;
	border-radius: 999px;
	background: rgba(18, 18, 18, 0.84);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.rfe-toast--visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   10. First-Video Onboarding Overlay (Low-Opacity Arrows & Instructions)
   ========================================================================== */

.rfe-onboarding {
	position: absolute;
	inset: 0;
	z-index: 26;
	pointer-events: none;
	color: var(--rfe-hint);
	opacity: var(--rfe-hint-opacity, 0.72);
	transition: opacity 0.65s ease, visibility 0.65s ease;
}

.rfe-onboarding--hidden {
	opacity: 0 !important;
	visibility: hidden;
}

/* Horizontal Swipe-to-Exit Hint (Center band + side arrows) */
.rfe-hint-horizontal {
	position: absolute;
	top: 42%;
	left: 10px;
	right: 10px;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.rfe-hint-side-arrows {
	display: flex;
	align-items: center;
	color: var(--rfe-hint);
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
}

.rfe-hint-side-arrows svg {
	width: 24px;
	height: 24px;
	display: block;
}

.rfe-hint-side-arrows--left {
	animation: rfe-glide-left 1.55s ease-in-out infinite;
}

.rfe-hint-side-arrows--right {
	animation: rfe-glide-right 1.55s ease-in-out infinite;
}

.rfe-hint-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.34);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-align: center;
	color: var(--rfe-hint);
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
	max-width: 72%;
	line-height: 1.3;
}

/* Vertical Scroll-to-Explore Hint (Lower center above metadata) */
.rfe-hint-vertical {
	position: absolute;
	left: 50%;
	bottom: calc(168px + env(safe-area-inset-bottom));
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
	max-width: 78%;
}

.rfe-hint-up-arrows {
	display: flex;
	flex-direction: column;
	align-items: center;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
}

.rfe-hint-up-arrows svg {
	width: 24px;
	height: 16px;
	display: block;
	margin: -3px 0;
}

.rfe-hint-up-arrows svg:nth-child(1) {
	animation: rfe-chevron-up 1.5s ease-in-out infinite;
	animation-delay: 0.25s;
}

.rfe-hint-up-arrows svg:nth-child(2) {
	animation: rfe-chevron-up 1.5s ease-in-out infinite;
	animation-delay: 0s;
}

@keyframes rfe-glide-left {
	0%, 100% { transform: translateX(4px); opacity: 0.5; }
	50%      { transform: translateX(-6px); opacity: 1; }
}

@keyframes rfe-glide-right {
	0%, 100% { transform: translateX(-4px); opacity: 0.5; }
	50%      { transform: translateX(6px); opacity: 1; }
}

@keyframes rfe-chevron-up {
	0%   { opacity: 0.25; transform: translateY(5px); }
	50%  { opacity: 1; transform: translateY(-4px); }
	100% { opacity: 0.25; transform: translateY(-8px); }
}

/* Live Horizontal Drag-to-Exit Indicator */
.rfe-exit-indicator {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.92);
	z-index: 34;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.24);
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.rfe-exit-indicator--active {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.rfe-exit-indicator--ready {
	background: rgba(255, 48, 64, 0.85);
	border-color: rgba(255, 255, 255, 0.5);
	transform: translate(-50%, -50%) scale(1.06);
}

.rfe-exit-indicator svg {
	width: 16px;
	height: 16px;
}

@media (max-height: 580px) {
	.rfe-hint-horizontal {
		top: 35%;
	}
	.rfe-hint-vertical {
		bottom: calc(140px + env(safe-area-inset-bottom));
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.rfe-hint-side-arrows--left,
	.rfe-hint-side-arrows--right,
	.rfe-hint-up-arrows svg,
	.rfe-audio-disc-eq span {
		animation: none;
	}
}
