/**
 * Vlora Reels — front end.
 * Everything is driven by custom properties so the settings screen,
 * the shortcode and the Elementor style controls can all steer it.
 */

.vlora-reels,
.vlora-player,
.vlora-single {
	/* Own typography: nothing here is inherited from the theme. */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", "Segoe UI Historic", Tahoma, sans-serif;
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.4;
	letter-spacing: normal;
	word-spacing: normal;
	text-transform: none;
	text-indent: 0;
	text-shadow: none;
	text-decoration: none;
	white-space: normal;
	box-sizing: border-box;
}

.vlora-reels {
	--vlora-cols: 4;
	--vlora-cols-tablet: 3;
	--vlora-cols-mobile: 2;
	--vlora-gap: 16px;
	--vlora-ratio: 9 / 16;
	--vlora-radius: 14px;
	--vlora-primary: #ff2d55;
	--vlora-text: #ffffff;
	--vlora-card-bg: #11131a;
	--vlora-overlay: rgba(0, 0, 0, 0.55);


	position: relative;
	color: var(--vlora-text);
	text-align: start;
}

.vlora-reels *,
.vlora-reels *::before,
.vlora-reels *::after {
	box-sizing: border-box;
}

/* ---------- Track layouts ---------- */

.vlora-reels .vlora-reels-track {
	display: grid;
	grid-template-columns: repeat(var(--vlora-cols), minmax(0, 1fr));
	gap: var(--vlora-gap);
}

.vlora-reels.vlora-layout-masonry .vlora-reels-track {
	display: block;
	column-count: var(--vlora-cols);
	column-gap: var(--vlora-gap);
}

.vlora-reels.vlora-layout-masonry .vlora-reel {
	break-inside: avoid;
	margin-bottom: var(--vlora-gap);
}

.vlora-reels.vlora-layout-carousel .vlora-reels-track {
	display: flex;
	grid-template-columns: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.vlora-reels.vlora-layout-carousel .vlora-reels-track::-webkit-scrollbar {
	display: none;
}

.vlora-reels.vlora-layout-carousel .vlora-reel {
	flex: 0 0 calc((100% - (var(--vlora-cols) - 1) * var(--vlora-gap)) / var(--vlora-cols));
	scroll-snap-align: start;
}

/* ---------- Card ---------- */

.vlora-reels .vlora-reel {
	position: relative;
	margin: 0;
	border-radius: var(--vlora-radius);
	background: var(--vlora-card-bg);
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vlora-reels .vlora-reel-trigger {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: inherit;
	text-decoration: none;
	cursor: pointer;
	appearance: none;
}

.vlora-reels.vlora-layout-none .vlora-reel-trigger,
.vlora-reels[data-open="none"] .vlora-reel-trigger {
	cursor: default;
}

.vlora-reels .vlora-reel-trigger:focus-visible {
	outline: 2px solid var(--vlora-primary);
	outline-offset: 2px;
}

.vlora-reels .vlora-reel-media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: var(--vlora-ratio);
	overflow: hidden;
	background: var(--vlora-card-bg);
}

.vlora-reels .vlora-reel-cover,
.vlora-reels .vlora-reel-media video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease, opacity 0.3s ease;
}

.vlora-reels .vlora-reel-cover.is-placeholder {
	background: linear-gradient(135deg, #1d2130, #0d0f16);
}

.vlora-reels.has-zoom .vlora-reel:hover .vlora-reel-cover {
	transform: scale(1.06);
}

.vlora-reels.has-overlay .vlora-reel-media::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 55%;
	background: linear-gradient(to top, var(--vlora-overlay), transparent);
	pointer-events: none;
}

.vlora-reels .vlora-reel-media video {
	opacity: 0;
	z-index: 1;
}

.vlora-reels .vlora-reel-media video.is-visible {
	opacity: 1;
}

/* Play icon */

.vlora-reels .vlora-reel-play {
	position: absolute;
	inset: 0;
	margin: auto;
	z-index: 2;
	width: 54px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #fff;
	background: rgba(0, 0, 0, 0.42);
	backdrop-filter: blur(6px);
	transition: transform 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
	pointer-events: none;
}

.vlora-reels .vlora-reel-play svg {
	width: 46%;
	height: 46%;
	margin-inline-start: 6%;
}

.vlora-reels .vlora-reel:hover .vlora-reel-play {
	transform: scale(1.1);
	background: var(--vlora-primary);
}

.vlora-reels .vlora-reel.is-previewing .vlora-reel-play {
	opacity: 0;
}

/* Badges */

.vlora-reels .vlora-reel-duration {
	position: absolute;
	inset-block-end: 10px;
	inset-inline-end: 10px;
	z-index: 2;
	padding: 2px 7px;
	border-radius: 6px;
	font-size: 12px;
	line-height: 1.6;
	font-weight: 600;
	color: #fff;
	background: rgba(0, 0, 0, 0.6);
}

.vlora-reels .vlora-reel-views {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	opacity: 0.75;
}

.vlora-reels .vlora-reel-views svg {
	width: 14px;
	height: 14px;
}

/* Info */

.vlora-reels .vlora-reel-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 12px 14px;
	color: var(--vlora-text);
}

.vlora-reels .vlora-reel-title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vlora-reels .vlora-reel-excerpt {
	font-size: 13px;
	line-height: 1.5;
	opacity: 0.7;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Carousel arrows ---------- */

.vlora-reels .vlora-nav,
.vlora-player .vlora-arrow {
	--_size: var(--vlora-nav-size, 48px);
	width: var(--_size);
	height: var(--_size);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	cursor: pointer;
	color: var(--vlora-nav-color, #fff);
	background: var(--vlora-nav-bg, var(--vlora-primary, #ff2d55));
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.vlora-reels .vlora-nav:hover,
.vlora-player .vlora-arrow:hover {
	background: var(--vlora-nav-bg-hover, var(--vlora-nav-bg, var(--vlora-primary, #ff2d55)));
	filter: brightness(1.12);
	transform: scale(1.08);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.vlora-reels .vlora-nav:active,
.vlora-player .vlora-arrow:active {
	transform: scale(0.94);
}

.vlora-reels .vlora-nav:focus-visible,
.vlora-player .vlora-arrow:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.vlora-reels .vlora-nav svg,
.vlora-player .vlora-arrow svg {
	width: 58%;
	height: 58%;
}

.vlora-reels .vlora-nav {
	position: absolute;
	top: calc(50% - var(--vlora-nav-size, 48px) / 2);
	z-index: 5;
}

.vlora-reels .vlora-nav.is-disabled,
.vlora-player .vlora-arrow.is-disabled {
	opacity: 0.3;
	cursor: default;
	transform: none;
	filter: none;
	box-shadow: none;
}

.vlora-reels .vlora-nav-prev {
	inset-inline-start: -18px;
}

.vlora-reels .vlora-nav-next {
	inset-inline-end: -18px;
}

/* ---------- Footer ---------- */

.vlora-reels .vlora-reels-footer {
	display: flex;
	justify-content: center;
	margin-top: calc(var(--vlora-gap) + 8px);
}

.vlora-reels .vlora-load-more {
	padding: 11px 26px;
	border: 0;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	color: #fff;
	background: var(--vlora-primary);
	transition: filter 0.2s ease, opacity 0.2s ease;
}

.vlora-reels .vlora-load-more:hover {
	filter: brightness(1.1);
}

.vlora-reels .vlora-load-more.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.vlora-reels .vlora-reels-empty {
	padding: 28px;
	border: 1px dashed rgba(128, 128, 128, 0.4);
	border-radius: 12px;
	text-align: center;
	opacity: 0.7;
}

/* ---------- Full-screen player ---------- */

.vlora-player {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.vlora-player.is-open {
	opacity: 1;
}

.vlora-player .vlora-player-stage {
	position: relative;
	width: 100%;
	height: 100%;
	overflow-y: auto;
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior: contain;
}

.vlora-player .vlora-player-stage::-webkit-scrollbar {
	display: none;
}

.vlora-player .vlora-slide {
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vlora-player .vlora-slide-inner {
	position: relative;
	width: min(100%, calc((100vh - 0px) * 9 / 16));
	width: min(100%, calc(100dvh * 9 / 16));
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
}

.vlora-player .vlora-slide video,
.vlora-player .vlora-slide iframe {
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: contain;
	background: #000;
}

.vlora-player .vlora-slide-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: blur(0);
	transition: opacity 0.3s ease;
}

.vlora-player .vlora-slide.is-playing .vlora-slide-poster {
	opacity: 0;
	pointer-events: none;
}

.vlora-player .vlora-slide-spinner {
	position: absolute;
	width: 38px;
	height: 38px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: vlora-spin 0.8s linear infinite;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.vlora-player .vlora-slide.is-buffering .vlora-slide-spinner {
	opacity: 1;
}

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

.vlora-player .vlora-slide-tap {
	position: absolute;
	inset: 0;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
	z-index: 3;
}

.vlora-player .vlora-slide-pause {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 74px;
	height: 74px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	opacity: 0;
	transform: scale(0.8);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
	z-index: 4;
}

.vlora-player .vlora-slide.is-paused .vlora-slide-pause {
	opacity: 1;
	transform: scale(1);
}

.vlora-player .vlora-slide-pause svg {
	width: 34px;
	height: 34px;
}

/* Slide caption */

.vlora-player .vlora-slide-meta {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px 20px calc(28px + env(safe-area-inset-bottom, 0px));
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
	pointer-events: none;
}

.vlora-player .vlora-slide-meta > * {
	pointer-events: auto;
}

.vlora-player .vlora-slide-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
}

.vlora-player .vlora-slide-excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.85;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vlora-player .vlora-slide-cta,
.vlora-single .vlora-slide-cta {
	align-self: flex-start;
	padding: 10px 22px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	color: #fff;
	background: var(--vlora-primary, #ff2d55);
}

/* Player chrome */

.vlora-player .vlora-player-progress {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	height: 3px;
	z-index: 6;
	background: rgba(255, 255, 255, 0.2);
}

.vlora-player .vlora-player-progress span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--vlora-primary, #ff2d55);
	transition: width 0.15s linear;
}

.vlora-player .vlora-player-actions {
	position: absolute;
	inset-block-start: calc(14px + env(safe-area-inset-top, 0px));
	inset-inline-end: 14px;
	z-index: 10;
	display: flex;
	gap: 8px;
}

.vlora-player .vlora-player-side {
	position: absolute;
	inset-block-end: 120px;
	inset-inline-end: 14px;
	z-index: 10;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.vlora-player .vlora-btn {
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	background: rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(8px);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.vlora-player .vlora-btn:hover {
	background: rgba(255, 255, 255, 0.3);
}

.vlora-player .vlora-btn:active {
	transform: scale(0.92);
}

.vlora-player .vlora-btn svg {
	width: 22px;
	height: 22px;
}

.vlora-player .vlora-player-arrows {
	position: absolute;
	inset-inline-end: 22px;
	inset-block-start: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.vlora-player .vlora-player-toast {
	position: absolute;
	inset-block-end: 90px;
	inset-inline: 0;
	z-index: 20;
	margin: auto;
	width: fit-content;
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 13px;
	color: #fff;
	background: rgba(0, 0, 0, 0.75);
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

.vlora-player .vlora-player-toast.is-visible {
	opacity: 1;
}

body.vlora-player-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.vlora-player .vlora-player-arrows {
		inset-inline-end: 14px;
	}

	.vlora-player .vlora-arrow {
		--_size: var(--vlora-nav-size, 42px);
	}

	.vlora-player .vlora-slide-inner {
		width: 100%;
	}
}

/* ---------- Inline playback inside a card ---------- */

.vlora-reels .vlora-reel.is-inline .vlora-reel-play,
.vlora-reels .vlora-reel.is-inline .vlora-reel-duration {
	opacity: 0;
}

/* ---------- Single reel ---------- */

.vlora-single {
	margin: 0 auto 28px;
	max-width: 480px;
}

.vlora-single .vlora-single-stage {
	position: relative;
	width: 100%;
	aspect-ratio: var(--vlora-ratio);
	border-radius: var(--vlora-radius);
	overflow: hidden;
	background: #000;
}

.vlora-single .vlora-single-stage video,
.vlora-single .vlora-single-stage iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: contain;
	background: #000;
}

.vlora-single .vlora-single-cta {
	margin: 16px 0 0;
	text-align: center;
}

/* ---------- Responsive columns ---------- */

@media (max-width: 1024px) {
	.vlora-reels .vlora-reels-track {
		grid-template-columns: repeat(var(--vlora-cols-tablet), minmax(0, 1fr));
	}

	.vlora-reels.vlora-layout-masonry .vlora-reels-track {
		column-count: var(--vlora-cols-tablet);
	}

	.vlora-reels.vlora-layout-carousel .vlora-reel {
		flex-basis: calc((100% - (var(--vlora-cols-tablet) - 1) * var(--vlora-gap)) / var(--vlora-cols-tablet));
	}

	.vlora-reels .vlora-nav-prev {
		inset-inline-start: 6px;
	}

	.vlora-reels .vlora-nav-next {
		inset-inline-end: 6px;
	}
}

@media (max-width: 767px) {
	.vlora-reels .vlora-reels-track {
		grid-template-columns: repeat(var(--vlora-cols-mobile), minmax(0, 1fr));
	}

	.vlora-reels.vlora-layout-masonry .vlora-reels-track {
		column-count: var(--vlora-cols-mobile);
	}

	.vlora-reels.vlora-layout-carousel .vlora-reel {
		flex-basis: calc((100% - (var(--vlora-cols-mobile) - 1) * var(--vlora-gap)) / var(--vlora-cols-mobile));
	}

	.vlora-reels .vlora-reel-title {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vlora-reels *,
.vlora-player * {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ---------- Theme isolation for links ---------- */
/* Themes and page builders restyle every <a>, including its hover, focus and visited states. */

.vlora-reels a.vlora-reel-trigger,
.vlora-reels a.vlora-reel-trigger:hover,
.vlora-reels a.vlora-reel-trigger:focus,
.vlora-reels a.vlora-reel-trigger:active,
.vlora-reels a.vlora-reel-trigger:visited {
	color: inherit;
	background: none;
	text-decoration: none;
	box-shadow: none;
	border: 0;
	text-shadow: none;
}

.vlora-player a.vlora-slide-cta,
.vlora-player a.vlora-slide-cta:hover,
.vlora-player a.vlora-slide-cta:focus,
.vlora-player a.vlora-slide-cta:visited,
.vlora-single a.vlora-slide-cta,
.vlora-single a.vlora-slide-cta:hover,
.vlora-single a.vlora-slide-cta:focus,
.vlora-single a.vlora-slide-cta:visited {
	color: var(--vlora-nav-color, #fff);
	background: var(--vlora-primary, #ff2d55);
	text-decoration: none;
	box-shadow: none;
	border: 0;
}

.vlora-player a.vlora-slide-cta:hover,
.vlora-single a.vlora-slide-cta:hover {
	filter: brightness(1.1);
}

/* Elements that are not native buttons still need a focus ring and no text selection on tap. */
.vlora-reels [role="button"],
.vlora-player [role="button"] {
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	-webkit-user-select: none;
}

.vlora-reels [role="button"]:focus-visible,
.vlora-player [role="button"]:focus-visible {
	outline: 3px solid var(--vlora-primary, #ff2d55);
	outline-offset: 2px;
}

/* ---------- Theme isolation for media ---------- */
/* Themes and builders ship global img / video / iframe rules (max-width, height:auto, borders, shadows). */

.vlora-reels .vlora-reel-cover,
.vlora-reels .vlora-reel-media video,
.vlora-player .vlora-slide video,
.vlora-player .vlora-slide iframe,
.vlora-player .vlora-slide-poster,
.vlora-single .vlora-single-stage video,
.vlora-single .vlora-single-stage iframe {
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
