/* =========================================================
   Content download CTAs — unified professional buttons
   Light + dark · file & stream links share one style
   ========================================================= */

:root {
	--fm-dl-from: #ff9348;
	--fm-dl-mid: #ff7830;
	--fm-dl-to: #e85f18;
	--fm-dl-border: rgba(255, 255, 255, .22);
	--fm-dl-ink: #ffffff;
	--fm-dl-glow: rgba(255, 120, 48, .38);
	--fm-dl-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset,
		0 8px 20px -6px var(--fm-dl-glow),
		0 2px 6px rgba(26, 29, 38, .12);
	--fm-dl-shadow-hover: 0 1px 0 rgba(255, 255, 255, .35) inset,
		0 12px 28px -6px rgba(255, 120, 48, .5),
		0 4px 10px rgba(26, 29, 38, .14);
	--fm-quote-bg: #fff7f0;
	--fm-quote-ink: #1a1d26;
	--fm-quote-border: #ff7830;
	--fm-quote-shadow: 0 2px 10px rgba(26, 29, 38, .06);
}

html[dark="true"],
[dark="true"] {
	--fm-dl-from: #ff9a55;
	--fm-dl-mid: #ff8338;
	--fm-dl-to: #f06a1c;
	--fm-dl-border: rgba(255, 255, 255, .14);
	--fm-dl-glow: rgba(255, 120, 48, .45);
	--fm-dl-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset,
		0 10px 24px -6px rgba(0, 0, 0, .55),
		0 0 0 1px rgba(255, 120, 48, .2);
	--fm-dl-shadow-hover: 0 1px 0 rgba(255, 255, 255, .22) inset,
		0 14px 32px -6px rgba(255, 120, 48, .4),
		0 0 0 1px rgba(255, 140, 70, .35);
	--fm-quote-bg: #25262f;
	--fm-quote-ink: #eef0f4;
	--fm-quote-border: #ff8a4a;
	--fm-quote-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}

/* ---------- Unified download button ---------- */
:is(
	.postMain,
	.wp-content,
	.fm-prose
) a:is(
	[href$=".mov" i],
	[href$=".mp4" i],
	[href$=".mkv" i],
	[href$=".avi" i],
	[href$=".mp3" i],
	[href$=".wmv" i],
	[href*=".mov?" i],
	[href*=".mp4?" i],
	[href*=".mkv?" i],
	[href*=".avi?" i],
	[href*=".mp3?" i],
	[href*=".wmv?" i],
	[href*="shop.upera.co" i],
	[href*="upera.shop" i],
	[href*="salamcinama" i],
	[href*="gapfilm" i],
	[href*="upera.tv" i],
	[href*="elitland.com" i],
	[href*="dlmoovie.ir" i]
) {
	--fm-dl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3v10m0 0l3.5-3.5M12 13l-3.5-3.5' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 17.5V19a2 2 0 002 2h10a2 2 0 002-2v-1.5' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");

	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .65rem;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 auto .7rem;
	padding: .95rem 1.35rem .95rem 1.15rem;
	border: 1px solid var(--fm-dl-border);
	border-radius: 12px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 42%),
		linear-gradient(165deg, var(--fm-dl-from) 0%, var(--fm-dl-mid) 48%, var(--fm-dl-to) 100%);
	background-origin: border-box;
	color: var(--fm-dl-ink) !important;
	font-weight: 700;
	font-size: .92rem;
	line-height: 1.55;
	letter-spacing: -.01em;
	text-align: center;
	text-decoration: none !important;
	text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
	box-shadow: var(--fm-dl-shadow);
	overflow: hidden;
	isolation: isolate;
	transition:
		transform .18s cubic-bezier(.22, 1, .36, 1),
		box-shadow .22s ease,
		filter .18s ease;
}

:is(.postMain, .wp-content, .fm-prose) a:is(
	[href$=".mov" i],
	[href$=".mp4" i],
	[href$=".mkv" i],
	[href$=".avi" i],
	[href$=".mp3" i],
	[href$=".wmv" i],
	[href*=".mov?" i],
	[href*=".mp4?" i],
	[href*=".mkv?" i],
	[href*=".avi?" i],
	[href*=".mp3?" i],
	[href*=".wmv?" i],
	[href*="shop.upera.co" i],
	[href*="upera.shop" i],
	[href*="salamcinama" i],
	[href*="gapfilm" i],
	[href*="upera.tv" i],
	[href*="elitland.com" i],
	[href*="dlmoovie.ir" i]
)::before {
	content: "";
	flex: 0 0 1.35rem;
	width: 1.35rem;
	height: 1.35rem;
	background: rgba(0, 0, 0, .18) var(--fm-dl-icon) center / .85rem no-repeat;
	border-radius: 8px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

:is(.postMain, .wp-content, .fm-prose) a:is(
	[href$=".mov" i],
	[href$=".mp4" i],
	[href$=".mkv" i],
	[href$=".avi" i],
	[href$=".mp3" i],
	[href$=".wmv" i],
	[href*=".mov?" i],
	[href*=".mp4?" i],
	[href*=".mkv?" i],
	[href*=".avi?" i],
	[href*=".mp3?" i],
	[href*=".wmv?" i],
	[href*="shop.upera.co" i],
	[href*="upera.shop" i],
	[href*="salamcinama" i],
	[href*="gapfilm" i],
	[href*="upera.tv" i],
	[href*="elitland.com" i],
	[href*="dlmoovie.ir" i]
)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		105deg,
		transparent 35%,
		rgba(255, 255, 255, .14) 50%,
		transparent 65%
	);
	transform: translateX(-120%);
	pointer-events: none;
	z-index: 0;
}

:is(.postMain, .wp-content, .fm-prose) a:is(
	[href$=".mov" i],
	[href$=".mp4" i],
	[href$=".mkv" i],
	[href$=".avi" i],
	[href$=".mp3" i],
	[href$=".wmv" i],
	[href*=".mov?" i],
	[href*=".mp4?" i],
	[href*=".mkv?" i],
	[href*=".avi?" i],
	[href*=".mp3?" i],
	[href*=".wmv?" i],
	[href*="shop.upera.co" i],
	[href*="upera.shop" i],
	[href*="salamcinama" i],
	[href*="gapfilm" i],
	[href*="upera.tv" i],
	[href*="elitland.com" i],
	[href*="dlmoovie.ir" i]
) > * {
	position: relative;
	z-index: 1;
	color: var(--fm-dl-ink) !important;
}

:is(.postMain, .wp-content, .fm-prose) a:is(
	[href$=".mov" i],
	[href$=".mp4" i],
	[href$=".mkv" i],
	[href$=".avi" i],
	[href$=".mp3" i],
	[href$=".wmv" i],
	[href*=".mov?" i],
	[href*=".mp4?" i],
	[href*=".mkv?" i],
	[href*=".avi?" i],
	[href*=".mp3?" i],
	[href*=".wmv?" i],
	[href*="shop.upera.co" i],
	[href*="upera.shop" i],
	[href*="salamcinama" i],
	[href*="gapfilm" i],
	[href*="upera.tv" i],
	[href*="elitland.com" i],
	[href*="dlmoovie.ir" i]
):hover {
	transform: translateY(-2px);
	filter: brightness(1.04);
	box-shadow: var(--fm-dl-shadow-hover);
	color: var(--fm-dl-ink) !important;
}

:is(.postMain, .wp-content, .fm-prose) a:is(
	[href$=".mov" i],
	[href$=".mp4" i],
	[href$=".mkv" i],
	[href$=".avi" i],
	[href$=".mp3" i],
	[href$=".wmv" i],
	[href*=".mov?" i],
	[href*=".mp4?" i],
	[href*=".mkv?" i],
	[href*=".avi?" i],
	[href*=".mp3?" i],
	[href*=".wmv?" i],
	[href*="shop.upera.co" i],
	[href*="upera.shop" i],
	[href*="salamcinama" i],
	[href*="gapfilm" i],
	[href*="upera.tv" i],
	[href*="elitland.com" i],
	[href*="dlmoovie.ir" i]
):hover::after {
	transform: translateX(120%);
	transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}

:is(.postMain, .wp-content, .fm-prose) a:is(
	[href$=".mov" i],
	[href$=".mp4" i],
	[href$=".mkv" i],
	[href$=".avi" i],
	[href$=".mp3" i],
	[href$=".wmv" i],
	[href*=".mov?" i],
	[href*=".mp4?" i],
	[href*=".mkv?" i],
	[href*=".avi?" i],
	[href*=".mp3?" i],
	[href*=".wmv?" i],
	[href*="shop.upera.co" i],
	[href*="upera.shop" i],
	[href*="salamcinama" i],
	[href*="gapfilm" i],
	[href*="upera.tv" i],
	[href*="elitland.com" i],
	[href*="dlmoovie.ir" i]
):active {
	transform: translateY(0);
	filter: brightness(.96);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, .12) inset,
		0 3px 8px rgba(0, 0, 0, .2);
}

:is(.postMain, .wp-content, .fm-prose) a:is(
	[href$=".mov" i],
	[href$=".mp4" i],
	[href$=".mkv" i],
	[href$=".avi" i],
	[href$=".mp3" i],
	[href$=".wmv" i],
	[href*=".mov?" i],
	[href*=".mp4?" i],
	[href*=".mkv?" i],
	[href*=".avi?" i],
	[href*=".mp3?" i],
	[href*=".wmv?" i],
	[href*="shop.upera.co" i],
	[href*="upera.shop" i],
	[href*="salamcinama" i],
	[href*="gapfilm" i],
	[href*="upera.tv" i],
	[href*="elitland.com" i],
	[href*="dlmoovie.ir" i]
):focus-visible {
	outline: 2px solid var(--fm-dl-mid);
	outline-offset: 3px;
}

/* ---------- WordPress video ---------- */
.wp-video,
video.wp-video-shortcode {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	margin: 0 auto 1rem;
	border-radius: 12px;
	overflow: hidden;
}

.mejs-container {
	width: 100% !important;
	max-width: 100% !important;
	border-radius: 12px;
	overflow: hidden;
}

/* ---------- Blockquote ---------- */
.wp-content blockquote,
.fm-prose blockquote,
.postMain blockquote {
	background-color: var(--fm-quote-bg) !important;
	color: var(--fm-quote-ink) !important;
	border: 0 !important;
	border-right: 4px solid var(--fm-quote-border) !important;
	padding: 1rem 1.25rem !important;
	margin: 1.25rem 0 !important;
	border-radius: 10px !important;
	box-shadow: var(--fm-quote-shadow) !important;
	font-size: 1.05em !important;
	line-height: 1.75 !important;
}

.wp-content blockquote p,
.fm-prose blockquote p,
.postMain blockquote p {
	color: var(--fm-quote-ink) !important;
	margin-bottom: .5em;
}

.wp-content blockquote p::before,
.fm-prose blockquote p::before {
	display: none !important;
	content: none !important;
}

.wp-content blockquote a,
.fm-prose blockquote a,
.postMain blockquote a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: auto !important;
	margin: .35rem .25rem .35rem 0 !important;
	padding: .5rem .95rem !important;
	border-radius: 8px !important;
	background: linear-gradient(165deg, var(--fm-dl-from), var(--fm-dl-to)) !important;
	color: var(--fm-dl-ink) !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	box-shadow: 0 4px 12px -4px var(--fm-dl-glow) !important;
	transform: none !important;
}

.wp-content blockquote a::before,
.fm-prose blockquote a::before,
.postMain blockquote a::before,
.wp-content blockquote a::after,
.fm-prose blockquote a::after,
.postMain blockquote a::after {
	display: none !important;
	content: none !important;
}

.wp-content blockquote a:hover,
.fm-prose blockquote a:hover,
.postMain blockquote a:hover {
	filter: brightness(1.05);
	transform: translateY(-1px) !important;
}

/* ---------- Content sliders ---------- */
.wp-content .slider-container,
.wp-content .slider,
.wp-content .slick-slider,
.wp-content .swiper-container,
.fm-prose .slider-container,
.fm-prose .slider,
.fm-prose .slick-slider,
.fm-prose .swiper-container {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	overflow: visible !important;
	margin: 1rem 0;
}

.wp-content .slider img,
.wp-content .slick-slide img,
.wp-content .swiper-slide img,
.fm-prose .slider img,
.fm-prose .slick-slide img,
.fm-prose .swiper-slide img {
	width: 100% !important;
	height: auto !important;
	object-fit: cover !important;
	border-radius: 10px;
}

@media (max-width: 768px) {
	:is(.postMain, .wp-content, .fm-prose) a:is(
		[href$=".mp4" i],
		[href$=".mkv" i],
		[href*="gapfilm" i]
	) {
		padding: .85rem 1rem;
		font-size: .86rem;
		gap: .5rem;
	}

	:is(.postMain, .wp-content, .fm-prose) a:is(
		[href$=".mp4" i],
		[href$=".mkv" i],
		[href*="gapfilm" i]
	)::before {
		flex-basis: 1.2rem;
		width: 1.2rem;
		height: 1.2rem;
	}

	.wp-content blockquote,
	.fm-prose blockquote,
	.postMain blockquote {
		padding: .85rem 1rem !important;
		font-size: 1em !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	:is(.postMain, .wp-content, .fm-prose) a:is(
		[href$=".mp4" i],
		[href*="gapfilm" i]
	),
	:is(.postMain, .wp-content, .fm-prose) a:is(
		[href$=".mp4" i],
		[href*="gapfilm" i]
	)::after {
		transition: none !important;
	}

	:is(.postMain, .wp-content, .fm-prose) a:is(
		[href$=".mp4" i],
		[href*="gapfilm" i]
	):hover {
		transform: none;
	}

	:is(.postMain, .wp-content, .fm-prose) a:is(
		[href$=".mp4" i],
		[href*="gapfilm" i]
	):hover::after {
		transform: none;
	}
}
