/* =========================================================================
   Wema Video Carousel
   Brand: Primary #25235E · Secondary #21B5B1 · White #FFFFFF
   ========================================================================= */

.momayez-wema-vc {
	--momayez-wema-primary: #25235E;
	--momayez-wema-secondary: #21B5B1;
	--momayez-wema-white: #FFFFFF;

	--momayez-wema-icon: #FFFFFF;
	--momayez-wema-icon-hover: #21B5B1;
	--momayez-wema-progress: #21B5B1;
	--momayez-wema-buffer: rgba(255, 255, 255, 0.35);
	--momayez-wema-track: rgba(255, 255, 255, 0.18);
	--momayez-wema-controls-bg: rgba(37, 35, 94, 0.85);

	--momayez-wema-arrow: #25235E;
	--momayez-wema-arrow-bg: #FFFFFF;
	--momayez-wema-arrow-bg-hover: #21B5B1;
	--momayez-wema-dot: rgba(37, 35, 94, 0.3);
	--momayez-wema-dot-active: #21B5B1;

	--momayez-wema-side-peek: 18%;
	--momayez-wema-slide-gutter: 12px;

	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	container-type: inline-size;
	-webkit-tap-highlight-color: transparent;
	/* Keep the player & carousel layout identical on RTL and LTR pages. */
	direction: ltr;
	text-align: left;
	unicode-bidi: isolate;
}

/* Elementor flex/grid containers default to min-width:auto in several layouts.
   That lets a wide child establish the widget width instead of shrinking with it. */
.elementor-widget-wema_video_carousel,
.elementor-widget-wema_video_carousel > .elementor-widget-container {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

/* Belt-and-braces: never inherit RTL flipping into any inner element. */
.momayez-wema-vc [dir],
.momayez-wema-vc__viewport,
.momayez-wema-vc__track,
.momayez-wema-vc__controls,
.momayez-wema-vc__buttons,
.momayez-wema-vc__media {
	direction: ltr;
}

.momayez-wema-vc *,
.momayez-wema-vc *::before,
.momayez-wema-vc *::after {
	box-sizing: border-box;
}

/* ---------- Viewport / track (coverflow) ---------- */
.momayez-wema-vc__viewport {
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 24px 0 8px;
}

.momayez-wema-vc__track {
	display: flex;
	align-items: center;
	width: 100%;
	min-width: 0;
	will-change: transform;
	touch-action: pan-y;
}

.momayez-wema-vc__slide {
	flex: 0 0 calc(100% - (var(--momayez-wema-side-peek) * 2));
	max-width: calc(100% - (var(--momayez-wema-side-peek) * 2));
	min-width: 0;
	padding: 0 var(--momayez-wema-slide-gutter);
	transform: scale(0.86);
	opacity: 0.45;
	filter: saturate(0.8);
	transition: transform var(--momayez-wema-trans, 500ms) cubic-bezier(0.22, 1, 0.36, 1),
		opacity var(--momayez-wema-trans, 500ms) ease,
		filter var(--momayez-wema-trans, 500ms) ease;
}

.momayez-wema-vc__slide.is-active {
	transform: scale(1);
	opacity: 1;
	filter: none;
	z-index: 2;
}

.momayez-wema-vc__slide.is-playing {
	opacity: 1;
	filter: none;
}

.momayez-wema-vc__slide-inner {
	position: relative;
	background: var(--momayez-wema-primary);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 18px 50px -20px rgba(37, 35, 94, 0.55);
}

/* ---------- Media / video ---------- */
.momayez-wema-vc__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.momayez-wema-vc__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
	display: block;
}

/* ---------- Person details ---------- */
.momayez-wema-vc__person {
	padding: 16px 20px 18px;
	background: var(--momayez-wema-white);
	text-align: center;
}

.momayez-wema-vc__person-name {
	margin: 0;
	color: var(--momayez-wema-primary);
	font: 700 18px/1.35 system-ui, sans-serif;
	overflow-wrap: anywhere;
	unicode-bidi: plaintext;
}

.momayez-wema-vc__work-position {
	margin-top: 4px;
	color: var(--momayez-wema-secondary);
	font: 500 14px/1.45 system-ui, sans-serif;
	overflow-wrap: anywhere;
	unicode-bidi: plaintext;
}

/* ---------- Tap zones (double-tap seek + hold 2x) ---------- */
.momayez-wema-vc__tapzone {
	position: absolute;
	top: 0;
	bottom: 56px;
	width: 38%;
	display: flex;
	align-items: center;
	z-index: 3;
	user-select: none;
	-webkit-user-select: none;
}

.momayez-wema-vc__tapzone--left { left: 0; justify-content: flex-start; }
.momayez-wema-vc__tapzone--right { right: 0; justify-content: flex-end; }

.momayez-wema-vc__ripple {
	position: absolute;
	top: 50%;
	width: 120%;
	aspect-ratio: 1;
	transform: translateY(-50%) scale(0);
	background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 60%);
	opacity: 0;
	pointer-events: none;
}

.momayez-wema-vc__tapzone--left .momayez-wema-vc__ripple { left: -40%; }
.momayez-wema-vc__tapzone--right .momayez-wema-vc__ripple { right: -40%; }

.momayez-wema-vc__tapzone.is-seeking .momayez-wema-vc__ripple {
	animation: momayez-wema-ripple 0.5s ease-out;
}

@keyframes momayez-wema-ripple {
	0% { transform: translateY(-50%) scale(0.2); opacity: 0.9; }
	100% { transform: translateY(-50%) scale(1); opacity: 0; }
}

.momayez-wema-vc__seek-hint {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: var(--momayez-wema-white);
	font: 600 13px/1 system-ui, sans-serif;
	padding: 0 8%;
	opacity: 0;
	transform: scale(0.8);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.momayez-wema-vc__seek-hint svg { width: 34px; height: 34px; }
.momayez-wema-vc__seek-hint b { font-weight: 700; }

.momayez-wema-vc__tapzone.is-seeking .momayez-wema-vc__seek-hint {
	opacity: 1;
	transform: scale(1);
}

/* ---------- Big center play ---------- */
.momayez-wema-vc__bigplay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 74px;
	height: 74px;
	border: none;
	border-radius: 50%;
	background: var(--momayez-wema-controls-bg);
	color: var(--momayez-wema-white);
	cursor: pointer;
	display: grid;
	place-items: center;
	/* Above the controls bar (z-index 6) so the play button is always tappable,
	   even when the controls are visible (e.g. paused mid-video). */
	z-index: 7;
	backdrop-filter: blur(4px);
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, opacity 0.25s ease;
	animation: momayez-wema-pop 0.4s ease;
}

.momayez-wema-vc__bigplay svg { width: 42px; height: 42px; }
.momayez-wema-vc__bigplay:hover { transform: translate(-50%, -50%) scale(1.08); background: var(--momayez-wema-secondary); }
.momayez-wema-vc__player.is-playing .momayez-wema-vc__bigplay { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.6); }

@keyframes momayez-wema-pop {
	from { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
	to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ---------- Hold-to-2x badge ---------- */
.momayez-wema-vc__speedbadge {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translate(-50%, -12px);
	background: var(--momayez-wema-controls-bg);
	color: var(--momayez-wema-white);
	font: 700 13px/1 system-ui, sans-serif;
	letter-spacing: 0.5px;
	padding: 7px 14px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	gap: 4px;
	opacity: 0;
	pointer-events: none;
	z-index: 5;
	backdrop-filter: blur(4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.momayez-wema-vc__player.is-speeding .momayez-wema-vc__speedbadge {
	opacity: 1;
	transform: translate(-50%, 0);
	animation: momayez-wema-badge-pulse 1s ease-in-out infinite;
}

@keyframes momayez-wema-badge-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(33, 181, 177, 0.5); }
	50% { box-shadow: 0 0 0 8px rgba(33, 181, 177, 0); }
}

/* ---------- Spinner ---------- */
.momayez-wema-vc__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 48px;
	height: 48px;
	margin: -24px 0 0 -24px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: var(--momayez-wema-secondary);
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
	z-index: 4;
	transition: opacity 0.2s ease;
}

.momayez-wema-vc__player.is-loading .momayez-wema-vc__spinner {
	opacity: 1;
	animation: momayez-wema-spin 0.8s linear infinite;
}

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

/* ---------- Controls bar ---------- */
.momayez-wema-vc__controls {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 28px 14px 12px;
	background: linear-gradient(to top, var(--momayez-wema-controls-bg), transparent);
	z-index: 6;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.momayez-wema-vc__player.is-playing.show-controls .momayez-wema-vc__controls,
.momayez-wema-vc__player:not(.is-playing) .momayez-wema-vc__controls,
.momayez-wema-vc__media:hover .momayez-wema-vc__controls {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* ---------- Progress bar ---------- */
.momayez-wema-vc__progress {
	position: relative;
	height: 5px;
	margin-bottom: 10px;
	background: var(--momayez-wema-track);
	border-radius: 999px;
	cursor: pointer;
	transition: height 0.15s ease;
}

.momayez-wema-vc__progress:hover { height: 8px; }

.momayez-wema-vc__progress-buffer,
.momayez-wema-vc__progress-played {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	border-radius: 999px;
	width: 0;
}

.momayez-wema-vc__progress-buffer { background: var(--momayez-wema-buffer); }
.momayez-wema-vc__progress-played { background: var(--momayez-wema-progress); }

.momayez-wema-vc__progress-thumb {
	position: absolute;
	top: 50%;
	left: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--momayez-wema-white);
	box-shadow: 0 0 0 4px rgba(33, 181, 177, 0.4);
	transform: translate(-50%, -50%) scale(0);
	transition: transform 0.15s ease;
	pointer-events: none;
}

.momayez-wema-vc__progress:hover .momayez-wema-vc__progress-thumb { transform: translate(-50%, -50%) scale(1); }

/* ---------- Buttons row ---------- */
.momayez-wema-vc__buttons {
	display: flex;
	align-items: center;
	gap: 6px;
}

.momayez-wema-vc__btn {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border: none;
	background: transparent;
	color: var(--momayez-wema-icon);
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 7px;
	border-radius: 8px;
	transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.momayez-wema-vc__btn svg { width: 100%; height: 100%; display: block; }
.momayez-wema-vc__btn:hover { color: var(--momayez-wema-icon-hover); background: rgba(255, 255, 255, 0.1); }
.momayez-wema-vc__btn:active { transform: scale(0.9); }
.momayez-wema-vc button:focus-visible,
.momayez-wema-vc input:focus-visible {
	outline: 2px solid var(--momayez-wema-secondary);
	outline-offset: 2px;
}

/* play/pause icon swap */
.momayez-wema-vc__btn--play .i-pause { display: none; }
.momayez-wema-vc__player.is-playing .momayez-wema-vc__btn--play .i-play { display: none; }
.momayez-wema-vc__player.is-playing .momayez-wema-vc__btn--play .i-pause { display: block; }

/* fullscreen icon swap */
.momayez-wema-vc__btn--fs .i-exit-fs { display: none; }
.momayez-wema-vc.is-fullscreen .momayez-wema-vc__btn--fs .i-fs { display: none; }
.momayez-wema-vc.is-fullscreen .momayez-wema-vc__btn--fs .i-exit-fs { display: block; }

/* volume icon swap */
.momayez-wema-vc__btn--vol .i-vol-low,
.momayez-wema-vc__btn--vol .i-vol-mute { display: none; }
.momayez-wema-vc__player.vol-low .momayez-wema-vc__btn--vol .i-vol-full { display: none; }
.momayez-wema-vc__player.vol-low .momayez-wema-vc__btn--vol .i-vol-low { display: block; }
.momayez-wema-vc__player.vol-muted .momayez-wema-vc__btn--vol .i-vol-full,
.momayez-wema-vc__player.vol-muted .momayez-wema-vc__btn--vol .i-vol-low { display: none; }
.momayez-wema-vc__player.vol-muted .momayez-wema-vc__btn--vol .i-vol-mute { display: block; }

/* ---------- Volume slider ---------- */
.momayez-wema-vc__volume { display: flex; align-items: center; }

.momayez-wema-vc__vol-slider {
	width: 0;
	opacity: 0;
	height: 4px;
	margin-left: 0;
	accent-color: var(--momayez-wema-secondary);
	cursor: pointer;
	transition: width 0.25s ease, opacity 0.25s ease, margin 0.25s ease;
}

.momayez-wema-vc__volume:hover .momayez-wema-vc__vol-slider {
	width: 70px;
	opacity: 1;
	margin-left: 4px;
}

/* ---------- Time ---------- */
.momayez-wema-vc__time {
	color: var(--momayez-wema-white);
	font: 600 12px/1 system-ui, sans-serif;
	white-space: nowrap;
	margin-left: 4px;
	font-variant-numeric: tabular-nums;
}

.momayez-wema-vc__spacer { flex: 1 1 auto; }

/* ---------- Settings menu ---------- */
.momayez-wema-vc__menu-wrap { position: relative; }

.momayez-wema-vc__menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 10px);
	min-width: 190px;
	background: var(--momayez-wema-controls-bg);
	backdrop-filter: blur(10px);
	border-radius: 12px;
	padding: 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px) scale(0.96);
	transform-origin: bottom right;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.5);
	z-index: 10;
}

.momayez-wema-vc__menu-wrap.is-open .momayez-wema-vc__menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.momayez-wema-vc__menu-title {
	color: rgba(255, 255, 255, 0.55);
	font: 700 10px/1 system-ui, sans-serif;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 8px 10px 6px;
}

.momayez-wema-vc__menu-group + .momayez-wema-vc__menu-group { margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, 0.1); }

.momayez-wema-vc__menu-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: var(--momayez-wema-white);
	font: 500 13px/1 system-ui, sans-serif;
	padding: 9px 10px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease;
	width: 100%;
	border: 0;
	background: transparent;
	text-align: left;
}

.momayez-wema-vc__menu-item:hover { background: rgba(255, 255, 255, 0.12); }
.momayez-wema-vc__menu-item.is-active { color: var(--momayez-wema-secondary); font-weight: 700; }
.momayez-wema-vc__menu-item.is-active::after { content: "✓"; }

/* ---------- Navigation arrows ---------- */
.momayez-wema-vc__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	border: none;
	border-radius: 50%;
	background: var(--momayez-wema-arrow-bg);
	color: var(--momayez-wema-arrow);
	cursor: pointer;
	display: grid;
	place-items: center;
	z-index: 8;
	box-shadow: 0 8px 24px -6px rgba(37, 35, 94, 0.45);
	transition: background 0.25s ease, color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.momayez-wema-vc__nav svg { width: 26px; height: 26px; }
.momayez-wema-vc__nav:hover { background: var(--momayez-wema-arrow-bg-hover); color: var(--momayez-wema-white); transform: translateY(-50%) scale(1.1); }
.momayez-wema-vc__nav:active { transform: translateY(-50%) scale(0.95); }
.momayez-wema-vc__nav--prev { left: 6px; }
.momayez-wema-vc__nav--next { right: 6px; }

/* ---------- Dots ---------- */
.momayez-wema-vc__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}

.momayez-wema-vc__dot {
	width: 10px;
	height: 10px;
	border: none;
	border-radius: 999px;
	background: var(--momayez-wema-dot);
	cursor: pointer;
	padding: 0;
	transition: background 0.25s ease, width 0.25s ease;
}

.momayez-wema-vc__dot.is-active { background: var(--momayez-wema-dot-active); width: 28px; }

/* ---------- Fullscreen ---------- */
.momayez-wema-vc.is-fullscreen .momayez-wema-vc__slide.is-active .momayez-wema-vc__media { aspect-ratio: auto; height: 100vh; }

/* ---------- Responsive / mobile ----------
   Viewport queries provide standalone-demo and legacy-browser defaults.
   Elementor's more-specific generated rules remain authoritative when the
   responsive Side Peek control is changed by the editor. */
@media (max-width: 1024px) {
	.momayez-wema-vc { --momayez-wema-side-peek: 12%; }
	.momayez-wema-vc__nav { width: 44px; height: 44px; }
	.momayez-wema-vc__nav svg { width: 22px; height: 22px; }
}

@media (max-width: 767px) {
	.momayez-wema-vc { --momayez-wema-slide-gutter: 8px; }
	.momayez-wema-vc__viewport { padding: 14px 0 4px; }
	.momayez-wema-vc__slide-inner { border-radius: 16px; }
	.momayez-wema-vc__bigplay svg { width: 34px; height: 34px; }
	.momayez-wema-vc__btn { width: 34px; height: 34px; padding: 6px; }
	.momayez-wema-vc__btn--rewind,
	.momayez-wema-vc__btn--forward { display: none; } /* use double-tap on mobile */
	/* The four essential buttons need the full row on narrow portrait cards. */
	.momayez-wema-vc__time { display: none; }
	/* Keep arrows on mobile (smaller, hugging the edges) in addition to swipe. */
	.momayez-wema-vc__nav { width: 38px; height: 38px; }
	.momayez-wema-vc__nav svg { width: 20px; height: 20px; }
	.momayez-wema-vc__nav--prev { left: 2px; }
	.momayez-wema-vc__nav--next { right: 2px; }
	/* Bigger tap target for the center play button on touch. */
	.momayez-wema-vc__bigplay { width: 68px; height: 68px; }

	/* Volume slider always collapsed on touch */
	.momayez-wema-vc__volume:hover .momayez-wema-vc__vol-slider { width: 0; opacity: 0; margin-left: 0; }

	.momayez-wema-vc__menu-item { padding: 14px 12px; font-size: 15px; }
	.momayez-wema-vc__menu-title { padding: 12px 12px 8px; font-size: 11px; }
}

/* Elementor widgets frequently live in columns/containers narrower than the
   browser viewport. Adapt to the component's real width in that case. */
@container (max-width: 767px) {
	.momayez-wema-vc__viewport { padding: 14px 0 4px; }
	.momayez-wema-vc__slide-inner { border-radius: 16px; }
	.momayez-wema-vc__bigplay { width: 68px; height: 68px; }
	.momayez-wema-vc__bigplay svg { width: 34px; height: 34px; }
	.momayez-wema-vc__btn { width: 34px; height: 34px; padding: 6px; }
	.momayez-wema-vc__btn--rewind,
	.momayez-wema-vc__btn--forward,
	.momayez-wema-vc__time { display: none; }
	.momayez-wema-vc__nav { width: 38px; height: 38px; }
	.momayez-wema-vc__nav svg { width: 20px; height: 20px; }
	.momayez-wema-vc__nav--prev { left: 2px; }
	.momayez-wema-vc__nav--next { right: 2px; }
	.momayez-wema-vc__volume:hover .momayez-wema-vc__vol-slider { width: 0; opacity: 0; margin-left: 0; }
	.momayez-wema-vc__menu-item { padding: 14px 12px; font-size: 15px; }
	.momayez-wema-vc__menu-title { padding: 12px 12px 8px; font-size: 11px; }
}

@container (max-width: 480px) {
	.momayez-wema-vc__slide { padding-inline: 8px; }
	.momayez-wema-vc__controls { padding-inline: 10px; }
	.momayez-wema-vc__person { padding: 14px 16px 16px; }
}

/* ---------- Mobile settings as a portaled full-height bottom sheet ----------
   The panel is moved (in JS) out of the clipped, transformed player into the
   carousel root, so it escapes overflow:hidden and uses the full viewport
   height. These rules only take effect once .is-sheet is added on mobile. */
.momayez-wema-vc__menu-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 99998;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.momayez-wema-vc__menu-backdrop.is-visible { opacity: 1; }

.momayez-wema-vc__menu.is-sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	top: auto;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	visibility: visible;
	opacity: 1;
	border-radius: 20px 20px 0 0;
	padding: 16px 16px calc(22px + env(safe-area-inset-bottom));
	transform: translateY(110%);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 99999;
	pointer-events: auto;
	background: var(--momayez-wema-controls-bg, rgba(37, 35, 94, 0.96));
	box-shadow: 0 -12px 40px -8px rgba(0, 0, 0, 0.5);
}
.momayez-wema-vc__menu.is-sheet.is-visible { transform: translateY(0); }

/* Drag-handle affordance at the top of the sheet. */
.momayez-wema-vc__menu.is-sheet::before {
	content: "";
	display: block;
	width: 40px;
	height: 4px;
	margin: -4px auto 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.35);
}

@media (prefers-reduced-motion: reduce) {
	.momayez-wema-vc *,
	.momayez-wema-vc *::before,
	.momayez-wema-vc *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
