/* ===========================================================
   افزونه «بیشتر بخوانید» - استایل باکس نمایش مطلب مرتبط
   طرح: کارتِ نشانِ‌کتاب (Bookmark Tab) - راست‌چین
   =========================================================== */

:root {
	--rpp-accent: #c0392b;
	--rpp-ink: #1f2328;
	--rpp-paper: #ffffff;
	--rpp-muted: #6b7280;
	--rpp-border: #ece7e0;
}

.rpp-box {
	margin: 28px 0;
	direction: rtl;
	font-family: inherit;
}

.rpp-items {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.rpp-box-grid .rpp-items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
}

/* کارت اصلی */
.rpp-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--rpp-paper);
	border: 1px solid var(--rpp-border);
	border-right: 5px solid var(--rpp-accent);
	border-radius: 10px;
	padding: 14px 18px;
	text-decoration: none !important;
	box-shadow: 0 2px 10px rgba(20, 20, 20, 0.05);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
	overflow: hidden;
}

.rpp-item::before {
	/* نشانِ کوچکِ گوشه، شبیه به گیره‌ی نشانگر کتاب */
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0 0 16px 16px;
	border-color: transparent transparent transparent var(--rpp-accent);
	opacity: 0.9;
}

.rpp-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(20, 20, 20, 0.1);
	border-right-color: var(--rpp-accent);
}

.rpp-thumb-wrap {
	flex: 0 0 auto;
	width: 76px;
	height: 76px;
	border-radius: 8px;
	overflow: hidden;
	background: #f2f2f2;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rpp-thumb-wrap img.rpp-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}

.rpp-thumb-placeholder {
	background: linear-gradient(135deg, rgba(0,0,0,0.04), rgba(0,0,0,0.08));
}

.rpp-text {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.rpp-label {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--rpp-accent);
	letter-spacing: 0.2px;
}

.rpp-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--rpp-ink);
	line-height: 1.5;
	white-space: normal;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.rpp-arrow {
	flex: 0 0 auto;
	font-size: 20px;
	color: var(--rpp-accent);
	transform: translateX(0);
	transition: transform 0.18s ease;
}

.rpp-item:hover .rpp-arrow {
	transform: translateX(-4px);
}

/* حالت موبایل */
@media (max-width: 480px) {
	.rpp-box-grid .rpp-items {
		grid-template-columns: 1fr;
	}
	.rpp-thumb-wrap {
		width: 60px;
		height: 60px;
	}
	.rpp-title {
		font-size: 14.5px;
	}
}

/* ------- استایل‌های صفحه مدیریت (متاباکس و جستجو) ------- */
.rpp-search-wrap {
	position: relative;
	margin-bottom: 10px;
}
.rpp-search-input {
	width: 100%;
}
.rpp-search-results {
	position: absolute;
	z-index: 10;
	background: #fff;
	border: 1px solid #dcdcde;
	width: 100%;
	max-height: 220px;
	overflow-y: auto;
	display: none;
}
.rpp-search-results div {
	padding: 6px 10px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13px;
}
.rpp-search-results div:hover {
	background: #f0f6fc;
}
.rpp-manual-list, .rpp-auto-list {
	margin: 0 0 10px;
	padding: 0;
}
.rpp-manual-list li, .rpp-auto-list li {
	list-style: none;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 6px 8px;
	margin-bottom: 5px;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
}
.rpp-manual-list li .rpp-item-title {
	flex: 1;
}
.rpp-manual-list li .rpp-remove-item {
	color: #b32d2e;
	text-decoration: none;
}
.rpp-handle {
	cursor: move;
	color: #8c8f94;
}
