/**
 * Media Protection CSS
 *
 * @package Media_Protection_Pro
 */

/* محافظت از تصاویر و ویدیوها */
img[data-protected="true"],
video[data-protected="true"],
body.mp-protected-page img,
body.mp-protected-page video {
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
	user-select: none !important;
	-webkit-user-drag: none !important;
	-khtml-user-drag: none !important;
	-moz-user-drag: none !important;
	-o-user-drag: none !important;
	user-drag: none !important;
	-webkit-touch-callout: none !important;
	-webkit-tap-highlight-color: transparent !important;
}

/* محافظت از تصاویر پس‌زمینه CSS */
.mp-protected-bg {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

/* Container دکمه دانلود */
.mp-download-wrapper {
	margin-top: 15px;
	text-align: center;
}

.mp-download-wrapper.mp-position-left {
	text-align: left;
}

.mp-download-wrapper.mp-position-right {
	text-align: right;
}

/* دکمه دانلود */
.mp-download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	background-color: var(--mp-btn-bg, #0073aa);
	color: var(--mp-btn-color, #ffffff);
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	line-height: 1.5;
}

.mp-download-btn:hover {
	background-color: var(--mp-btn-bg-hover, #005a87);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	color: var(--mp-btn-color, #ffffff);
	text-decoration: none;
}

.mp-download-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.mp-download-btn:focus {
	outline: 2px solid var(--mp-btn-bg, #0073aa);
	outline-offset: 2px;
}

/* آیکون */
.mp-download-btn i {
	font-size: 18px;
	line-height: 1;
}

/* Tooltip برای پیام */
.mp-tooltip {
	position: fixed;
	background: rgba(0, 0, 0, 0.85);
	color: white;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 14px;
	z-index: 999999;
	pointer-events: none;
	animation: mpFadeIn 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	max-width: 300px;
	word-wrap: break-word;
	line-height: 1.4;
}

/* Animation برای Tooltip */
@keyframes mpFadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* RTL Support */
body.rtl .mp-download-wrapper {
	direction: rtl;
}

body.rtl .mp-download-wrapper.mp-position-left {
	text-align: right;
}

body.rtl .mp-download-wrapper.mp-position-right {
	text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
	.mp-download-btn {
		padding: 10px 20px;
		font-size: 14px;
	}
	
	.mp-download-btn i {
		font-size: 16px;
	}
}

/* جلوگیری از انتخاب متن در محتوای محافظت‌شده */
.mp-protected-content {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* محافظت از تصاویر در حالت Print */
@media print {
	img[data-protected="true"],
	video[data-protected="true"] {
		display: none !important;
	}
}

