/* ==========================================================================
   تاریخچه خریدهای EDD – نسخه ۲
   نام محصول + وضعیت مستقل + عملیات مستقل
   ========================================================================== */

.tsvst-purchased-products,
.tsvst-purchased-products *,
.tsvst-purchased-products *::before,
.tsvst-purchased-products *::after {
	box-sizing: border-box;
}

.tsvst-purchased-products {
	--pp-purple: #6d52eb;
	--pp-blue: #168fc3;
	--pp-cyan: #18b8c8;
	--pp-green: #22a978;
	--pp-orange: #e9933d;
	--pp-red: #d55e6b;

	--pp-text: #2c3244;
	--pp-heading: #202638;
	--pp-muted: #7d8698;
	--pp-line: rgba(70, 82, 108, .12);
	--pp-line-solid: #e4e8f0;

	position: relative;
	clear: both;
	width: 100%;
	direction: rtl;
	color: var(--pp-text);
}

/* ==========================================================================
   سربرگ اصلی
   ========================================================================== */

.tsvst-purchased-products__hero {
	position: relative;
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	min-height: 112px;
	padding: 18px;
	overflow: hidden;
	border: 1px solid rgba(109, 82, 235, .13);
	border-radius: 7px;
	background:
		linear-gradient(
			118deg,
			rgba(109, 82, 235, .11) 0%,
			rgba(109, 82, 235, .11) 22%,
			transparent 22%,
			transparent 38%,
			rgba(22, 143, 195, .085) 38%,
			rgba(22, 143, 195, .085) 61%,
			transparent 61%,
			transparent 75%,
			rgba(24, 184, 200, .10) 75%,
			rgba(24, 184, 200, .10) 100%
		),
		linear-gradient(135deg, #faf8ff 0%, #f4f8ff 52%, #f1fbfb 100%);
	box-shadow:
		0 14px 30px rgba(38, 46, 83, .075),
		inset 0 1px 0 rgba(255, 255, 255, .88);
}

.tsvst-purchased-products__hero::after {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 5px;
	content: "";
	background: linear-gradient(
		180deg,
		var(--pp-purple),
		var(--pp-blue),
		var(--pp-cyan)
	);
}

.tsvst-purchased-products__hero-icon {
	display: inline-flex;
	width: 52px;
	height: 52px;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 7px;
	color: #fff;
	background: linear-gradient(
		135deg,
		var(--pp-purple),
		var(--pp-blue),
		var(--pp-cyan)
	);
	box-shadow:
		0 10px 22px rgba(64, 59, 143, .20),
		inset 0 1px 0 rgba(255, 255, 255, .25);
	font-size: 19px;
}

.tsvst-purchased-products__hero-copy {
	min-width: 0;
}

.tsvst-purchased-products__eyebrow {
	display: inline-block;
	margin-bottom: 4px;
	color: var(--pp-blue);
	font-family: monospace;
	font-size: 8px;
	font-weight: 850;
	letter-spacing: 1px;
	direction: ltr;
}

.tsvst-purchased-products__hero-copy h2 {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	color: var(--pp-heading) !important;
	background: transparent !important;
	box-shadow: none !important;
	font-size: 18px !important;
	font-weight: 950 !important;
	line-height: 1.7 !important;
}

.tsvst-purchased-products__hero-copy h2::before,
.tsvst-purchased-products__hero-copy h2::after {
	display: none !important;
	content: none !important;
}

.tsvst-purchased-products__hero-copy p {
	margin: 2px 0 0;
	color: var(--pp-muted);
	font-size: 10.5px;
	font-weight: 650;
	line-height: 1.9;
}

.tsvst-purchased-products__hero-meta {
	display: flex;
	align-items: flex-end;
	flex-direction: column;
	gap: 7px;
}

.tsvst-purchased-products__count {
	display: grid;
	grid-template-columns: 23px auto;
	min-width: 135px;
	min-height: 48px;
	align-content: center;
	column-gap: 8px;
	padding: 7px 11px;
	border: 1px solid rgba(109, 82, 235, .12);
	border-radius: 6px;
	background: rgba(255, 255, 255, .72);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.tsvst-purchased-products__count i {
	grid-row: 1 / 3;
	align-self: center;
	color: #6350c2;
	font-size: 14px;
}

.tsvst-purchased-products__count strong {
	color: #403858;
	font-size: 13px;
	font-weight: 950;
	line-height: 1.4;
}

.tsvst-purchased-products__count small {
	color: #8c95a6;
	font-size: 8px;
	font-weight: 700;
}

.tsvst-purchased-products__secure {
	display: inline-flex;
	min-height: 27px;
	align-items: center;
	gap: 6px;
	padding: 4px 9px;
	border: 1px solid rgba(24, 184, 200, .14);
	border-radius: 20px;
	color: #168f9d;
	background: rgba(24, 184, 200, .07);
	font-size: 8.5px;
	font-weight: 850;
}

/* ==========================================================================
   جست‌وجوی اصلاح‌شده
   ========================================================================== */

.tsvst-purchased-products__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 13px;
	margin-top: 12px;
	padding: 11px;
	border: 1px solid var(--pp-line);
	border-radius: 7px;
	background: rgba(255, 255, 255, .82);
	box-shadow: 0 9px 20px rgba(40, 47, 76, .05);
}

.tsvst-purchased-products__search {
	position: relative !important;
	display: block !important;
	width: min(100%, 430px);
	height: 42px;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	border: 1px solid var(--pp-line-solid);
	border-radius: 6px;
	background: #fff;
	transition:
		border-color .18s ease,
		box-shadow .18s ease;
}

.tsvst-purchased-products__search:focus-within {
	border-color: rgba(109, 82, 235, .36);
	box-shadow: 0 0 0 4px rgba(109, 82, 235, .06);
}

.tsvst-purchased-products__search > i {
	position: absolute !important;
	z-index: 2;
	top: 50% !important;
	right: 14px !important;
	left: auto !important;
	margin: 0 !important;
	color: #6551c6;
	font-size: 12px;
	line-height: 1;
	transform: translateY(-50%) !important;
}

.tsvst-purchased-products__search input {
	display: block !important;
	width: 100% !important;
	height: 40px !important;
	margin: 0 !important;
	padding: 0 40px 0 38px !important;
	border: 0 !important;
	outline: 0 !important;
	color: #303647 !important;
	background: transparent !important;
	box-shadow: none !important;
	font-family: inherit !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	line-height: 40px !important;
	text-align: right !important;
}

.tsvst-purchased-products__search input::placeholder {
	color: #9aa2b1;
	opacity: 1;
}

.tsvst-purchased-products__search button {
	position: absolute !important;
	z-index: 3;
	top: 5px !important;
	left: 5px !important;
	right: auto !important;
	display: inline-flex !important;
	width: 31px !important;
	height: 31px !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 5px !important;
	color: #8c94a4 !important;
	background: rgba(109, 82, 235, .055) !important;
	box-shadow: none !important;
	cursor: pointer;
}

.tsvst-purchased-products__search button[hidden] {
	display: none !important;
}

.tsvst-purchased-products__toolbar-note {
	display: inline-flex;
	min-width: 0;
	align-items: center;
	gap: 8px;
	color: #818a9c;
	font-size: 8.8px;
	font-weight: 700;
	line-height: 1.8;
}

.tsvst-purchased-products__status-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	flex: 0 0 7px;
	border-radius: 50%;
	background: var(--pp-cyan);
	box-shadow:
		0 0 0 4px rgba(24, 184, 200, .08),
		0 0 12px rgba(24, 184, 200, .20);
}

/* راهنما */
.tsvst-purchased-products__notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 12px;
	padding: 11px 13px;
	border: 1px solid rgba(22, 143, 195, .12);
	border-radius: 6px;
	background: linear-gradient(
		135deg,
		rgba(109, 82, 235, .055),
		rgba(22, 143, 195, .045),
		rgba(24, 184, 200, .05)
	);
}

.tsvst-purchased-products__notice > i {
	margin-top: 4px;
	color: var(--pp-blue);
	font-size: 13px;
}

.tsvst-purchased-products__notice > div {
	display: flex;
	min-width: 0;
	flex-direction: column;
}

.tsvst-purchased-products__notice strong {
	color: #45405a;
	font-size: 9.5px;
	font-weight: 950;
	line-height: 1.8;
}

.tsvst-purchased-products__notice span {
	color: #818a9b;
	font-size: 8.8px;
	font-weight: 650;
	line-height: 1.8;
}

/* ==========================================================================
   جدول سفارش‌ها
   ========================================================================== */

.tsvst-purchased-products__content {
	position: relative;
	margin-top: 12px;
	overflow: hidden;
	border: 1px solid var(--pp-line);
	border-radius: 7px;
	background: #fff;
	box-shadow:
		0 13px 29px rgba(35, 42, 72, .065),
		inset 0 1px 0 rgba(255, 255, 255, .82);
}

.tsvst-purchased-products__content table,
.tsvst-purchased-products__content #edd_user_history,
.tsvst-purchased-products__content .edd-table {
	width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	table-layout: auto !important;
}

.tsvst-purchased-products__content thead {
	background: linear-gradient(135deg, #f4f1ff, #eef7ff 55%, #ebfafa);
}

.tsvst-purchased-products__content thead th {
	height: 49px;
	padding: 10px 11px !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(109, 82, 235, .12) !important;
	color: #4c4562 !important;
	background: transparent !important;
	font-size: 8.8px !important;
	font-weight: 950 !important;
	line-height: 1.7 !important;
	text-align: right !important;
	vertical-align: middle !important;
	white-space: nowrap;
}

.tsvst-purchased-products__content th.edd_purchase_id {
	width: 11%;
}

.tsvst-purchased-products__content th.tsvst_purchase_products {
	width: 32%;
}

.tsvst-purchased-products__content th.edd_purchase_date {
	width: 13%;
}

.tsvst-purchased-products__content th.edd_purchase_amount {
	width: 12%;
}

.tsvst-purchased-products__content th.tsvst_purchase_status {
	width: 13%;
}

.tsvst-purchased-products__content th.edd_purchase_details {
	width: 19%;
}

.tsvst-purchased-products__content tbody tr {
	position: relative;
	background: #fff;
	transition:
		background .18s ease,
		box-shadow .18s ease;
}

.tsvst-purchased-products__content tbody tr:hover {
	z-index: 2;
	background: linear-gradient(
		135deg,
		rgba(109, 82, 235, .035),
		rgba(22, 143, 195, .025),
		rgba(24, 184, 200, .03)
	);
	box-shadow: inset 4px 0 0 rgba(109, 82, 235, .45);
}

.tsvst-purchased-products__content tbody td {
	position: relative;
	padding: 13px 11px !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(70, 82, 108, .085) !important;
	color: #616a7c !important;
	background: transparent !important;
	font-size: 9.5px !important;
	font-weight: 700 !important;
	line-height: 1.8 !important;
	text-align: right !important;
	vertical-align: middle !important;
}

.tsvst-purchased-products__content tbody tr:last-child td {
	border-bottom: 0 !important;
}

/* شماره سفارش */
.tsvst-order-number {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #514765;
	font-family: Arial, sans-serif;
	font-size: 9px;
	font-weight: 900;
	direction: ltr;
}

.tsvst-order-number i {
	color: #806bed;
	font-size: 8px;
}

/* محصولات */
.tsvst-order-products {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 7px;
}

.tsvst-order-product {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	align-items: center;
	gap: 9px;
	min-width: 0;
}

.tsvst-order-product + .tsvst-order-product {
	padding-top: 7px;
	border-top: 1px dashed rgba(70, 82, 108, .10);
}

.tsvst-order-product__thumb {
	display: inline-flex;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border: 1px solid rgba(109, 82, 235, .11);
	border-radius: 6px;
	color: #6550c8;
	background: linear-gradient(
		135deg,
		rgba(109, 82, 235, .09),
		rgba(22, 143, 195, .055),
		rgba(24, 184, 200, .065)
	);
	font-size: 13px;
}

.tsvst-order-product__thumb img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
}

.tsvst-order-product__copy {
	display: flex;
	min-width: 0;
	flex-direction: column;
}

.tsvst-order-product__name {
	display: block;
	overflow: hidden;
	color: #403a55 !important;
	font-size: 9.7px;
	font-weight: 900;
	line-height: 1.75;
	text-decoration: none !important;
	text-overflow: ellipsis;
}

a.tsvst-order-product__name:hover {
	color: #5d47bf !important;
}

.tsvst-order-product__copy small {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 9px;
	margin-top: 2px;
	color: #9098a8;
	font-size: 7.5px;
	font-weight: 700;
}

.tsvst-order-products__empty {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #959cab;
	font-size: 8.5px;
	font-weight: 700;
}

/* تاریخ و مبلغ */
.tsvst-order-date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.tsvst-order-date i {
	color: var(--pp-blue);
	font-size: 10px;
}

.tsvst-order-amount {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	color: #4c4562;
	font-size: 9.5px;
	font-weight: 900;
}

/* ==========================================================================
   وضعیت مستقل
   ========================================================================== */

.tsvst-order-status {
	display: inline-flex !important;
	min-height: 30px;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 5px 9px !important;
	border: 1px solid rgba(105, 114, 133, .14) !important;
	border-radius: 20px !important;
	color: #6f7787 !important;
	background: #f4f5f7 !important;
	box-shadow: none !important;
	font-size: 8.2px !important;
	font-weight: 900 !important;
	line-height: 1 !important;
	white-space: nowrap;
}

.tsvst-order-status__dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	flex: 0 0 6px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 0 3px rgba(105, 114, 133, .08);
}

.tsvst-order-status--complete {
	color: #168e75 !important;
	border-color: rgba(34, 169, 120, .18) !important;
	background: rgba(34, 169, 120, .08) !important;
}

.tsvst-order-status--partially_refunded,
.tsvst-order-status--partially-refunded {
	color: #6150bc !important;
	border-color: rgba(109, 82, 235, .18) !important;
	background: rgba(109, 82, 235, .08) !important;
}

.tsvst-order-status--pending,
.tsvst-order-status--processing,
.tsvst-order-status--preapproval {
	color: #b36f26 !important;
	border-color: rgba(233, 147, 61, .20) !important;
	background: rgba(233, 147, 61, .09) !important;
}

.tsvst-order-status--failed,
.tsvst-order-status--abandoned,
.tsvst-order-status--cancelled,
.tsvst-order-status--canceled,
.tsvst-order-status--revoked {
	color: #bd5260 !important;
	border-color: rgba(213, 94, 107, .20) !important;
	background: rgba(213, 94, 107, .09) !important;
}

.tsvst-order-status--refunded {
	color: #687284 !important;
	border-color: rgba(105, 114, 132, .18) !important;
	background: rgba(105, 114, 132, .08) !important;
}

/* ==========================================================================
   عملیات مستقل
   ========================================================================== */

.tsvst-order-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.tsvst-order-action {
	display: inline-flex !important;
	min-height: 35px;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin: 0 !important;
	padding: 6px 11px !important;
	border: 1px solid rgba(109, 82, 235, .15) !important;
	border-radius: 6px !important;
	color: #5f4abc !important;
	background: linear-gradient(
		135deg,
		rgba(109, 82, 235, .085),
		rgba(22, 143, 195, .055),
		rgba(24, 184, 200, .065)
	) !important;
	box-shadow: none !important;
	font-family: inherit !important;
	font-size: 8.6px !important;
	font-weight: 900 !important;
	line-height: 1.4 !important;
	text-decoration: none !important;
	white-space: nowrap;
	transition:
		color .18s ease,
		border-color .18s ease,
		background .18s ease,
		transform .18s ease,
		box-shadow .18s ease;
}

.tsvst-order-action:hover {
	color: #fff !important;
	border-color: transparent !important;
	background: linear-gradient(
		135deg,
		var(--pp-purple),
		var(--pp-blue),
		var(--pp-cyan)
	) !important;
	box-shadow: 0 8px 18px rgba(61, 58, 135, .17) !important;
	transform: translateY(-1px);
}

.tsvst-order-action--details {
	color: #138b99 !important;
	border-color: rgba(24, 184, 200, .18) !important;
	background: rgba(24, 184, 200, .075) !important;
}

.tsvst-order-action--complete {
	color: #a56422 !important;
	border-color: rgba(233, 147, 61, .20) !important;
	background: rgba(233, 147, 61, .09) !important;
}

.tsvst-order-action-empty {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #9aa1ae;
	font-size: 8px;
	font-weight: 700;
}

/* صفحه‌بندی */
.tsvst-purchased-products__content .edd_pagination,
.tsvst-purchased-products__content .edd-pagination,
.tsvst-purchased-products__content .pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0 !important;
	padding: 14px !important;
	border-top: 1px solid var(--pp-line);
	background: #fafbfe;
}

.tsvst-purchased-products__content .page-numbers,
.tsvst-purchased-products__content .edd_pagination a,
.tsvst-purchased-products__content .edd_pagination span {
	display: inline-flex !important;
	min-width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: 4px 8px !important;
	border: 1px solid var(--pp-line-solid) !important;
	border-radius: 6px;
	color: #667084 !important;
	background: #fff !important;
	font-size: 9px;
	font-weight: 850;
	text-decoration: none !important;
}

.tsvst-purchased-products__content .page-numbers.current,
.tsvst-purchased-products__content .edd_pagination .current {
	color: #fff !important;
	border-color: transparent !important;
	background: linear-gradient(
		135deg,
		var(--pp-purple),
		var(--pp-blue),
		var(--pp-cyan)
	) !important;
}

/* نتیجه خالی جست‌وجو و خرید خالی */
.tsvst-purchased-products__filter-empty,
.tsvst-no-purchases {
	padding: 28px 18px;
	border: 1px dashed rgba(109, 82, 235, .20);
	border-radius: 7px;
	color: #7d8597;
	background: linear-gradient(
		135deg,
		rgba(109, 82, 235, .045),
		rgba(22, 143, 195, .03),
		rgba(24, 184, 200, .04)
	);
	text-align: center;
}

.tsvst-purchased-products__filter-empty {
	margin-top: 12px;
}

.tsvst-no-purchases {
	margin: 0;
}

.tsvst-purchased-products__filter-empty-icon,
.tsvst-no-purchases__icon {
	display: inline-flex;
	width: 43px;
	height: 43px;
	align-items: center;
	justify-content: center;
	margin-bottom: 8px;
	border-radius: 50%;
	color: #6550c8;
	background: rgba(109, 82, 235, .08);
	font-size: 15px;
}

.tsvst-purchased-products__filter-empty strong,
.tsvst-no-purchases strong {
	display: block;
	color: #45405a;
	font-size: 11px;
	font-weight: 950;
}

.tsvst-purchased-products__filter-empty p,
.tsvst-no-purchases p {
	margin: 3px 0 0;
	font-size: 9px;
	line-height: 1.9;
}

.tsvst-no-purchases a {
	display: inline-flex !important;
	min-height: 34px;
	align-items: center;
	justify-content: center;
	margin-top: 12px;
	padding: 6px 12px;
	border-radius: 6px;
	color: #fff !important;
	background: linear-gradient(
		135deg,
		var(--pp-purple),
		var(--pp-blue),
		var(--pp-cyan)
	);
	font-size: 8.8px;
	font-weight: 900;
	text-decoration: none !important;
}

/* راهنمای پایین */
.tsvst-purchased-products__help {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
	padding: 11px 13px;
	border: 1px solid var(--pp-line);
	border-radius: 7px;
	background: rgba(255, 255, 255, .80);
	box-shadow: 0 8px 18px rgba(39, 45, 75, .045);
}

.tsvst-purchased-products__help > div {
	display: inline-flex;
	min-width: 0;
	align-items: center;
	gap: 8px;
	color: #818a9c;
	font-size: 8.8px;
	font-weight: 700;
	line-height: 1.8;
}

.tsvst-purchased-products__help > div i {
	color: var(--pp-blue);
}

.tsvst-purchased-products__help nav {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 6px;
}

.tsvst-purchased-products__help nav a {
	display: inline-flex !important;
	min-height: 30px;
	align-items: center;
	justify-content: center;
	padding: 5px 9px;
	border: 1px solid rgba(109, 82, 235, .12);
	border-radius: 5px;
	color: #5f4bbb !important;
	background: rgba(109, 82, 235, .055);
	font-size: 8.5px;
	font-weight: 850;
	text-decoration: none !important;
}

/* ==========================================================================
   دارک‌مود
   ========================================================================== */

html.dark-invert .theme-invert-wrap .tsvst-purchased-products {
	filter: invert(1) hue-rotate(180deg) !important;
	color-scheme: dark;
	isolation: isolate;

	--pp-text: #eef1f8;
	--pp-heading: #f5f3ff;
	--pp-muted: rgba(226, 231, 242, .63);
	--pp-line: rgba(255, 255, 255, .09);
	--pp-line-solid: rgba(255, 255, 255, .105);
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__hero {
	border-color: rgba(158, 143, 255, .18) !important;
	background:
		linear-gradient(
			118deg,
			rgba(124, 98, 255, .18) 0%,
			rgba(124, 98, 255, .18) 22%,
			transparent 22%,
			transparent 38%,
			rgba(31, 158, 211, .14) 38%,
			rgba(31, 158, 211, .14) 61%,
			transparent 61%,
			transparent 75%,
			rgba(31, 211, 197, .14) 75%,
			rgba(31, 211, 197, .14) 100%
		),
		linear-gradient(135deg, #17142b, #101d2d 52%, #0d292f) !important;
	box-shadow:
		0 16px 34px rgba(0, 0, 0, .28),
		inset 0 1px 0 rgba(255, 255, 255, .035) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__hero-copy h2,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__count strong,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__notice strong,
html.dark-invert .theme-invert-wrap .tsvst-order-product__name,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__filter-empty strong,
html.dark-invert .theme-invert-wrap .tsvst-no-purchases strong {
	color: #f5f3ff !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__hero-copy p,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__toolbar-note,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__notice span,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__help > div {
	color: rgba(226, 231, 242, .62) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__count,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__toolbar,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__content,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__help {
	border-color: rgba(255, 255, 255, .10) !important;
	background: linear-gradient(
		135deg,
		rgba(18, 21, 37, .90),
		rgba(13, 29, 43, .84),
		rgba(10, 40, 45, .80)
	) !important;
	box-shadow:
		0 15px 32px rgba(0, 0, 0, .24),
		inset 0 1px 0 rgba(255, 255, 255, .03) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__search {
	border-color: rgba(255, 255, 255, .10) !important;
	background: rgba(255, 255, 255, .045) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__search input {
	color: #fff !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__search input::placeholder {
	color: rgba(228, 233, 244, .40) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__notice,
html.dark-invert .theme-invert-wrap .tsvst-purchased-products__filter-empty,
html.dark-invert .theme-invert-wrap .tsvst-no-purchases {
	border-color: rgba(158, 143, 255, .15) !important;
	background: linear-gradient(
		135deg,
		rgba(109, 82, 235, .15),
		rgba(22, 143, 195, .09),
		rgba(24, 184, 200, .10)
	) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__content thead {
	background: linear-gradient(135deg, #201b3a, #15283c 55%, #10343a) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__content thead th {
	color: #e8e3ff !important;
	border-bottom-color: rgba(255, 255, 255, .09) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__content tbody tr {
	background: rgba(255, 255, 255, .018) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__content tbody tr:hover {
	background: linear-gradient(
		135deg,
		rgba(109, 82, 235, .12),
		rgba(22, 143, 195, .075),
		rgba(24, 184, 200, .08)
	) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-purchased-products__content tbody td {
	color: rgba(232, 236, 246, .70) !important;
	border-bottom-color: rgba(255, 255, 255, .07) !important;
}

html.dark-invert .theme-invert-wrap .tsvst-order-product + .tsvst-order-product {
	border-top-color: rgba(255, 255, 255, .07);
}

html.dark-invert .theme-invert-wrap .tsvst-order-product__thumb {
	border-color: rgba(255, 255, 255, .09);
	background: rgba(255, 255, 255, .045);
}

/* ==========================================================================
   موبایل: هر سفارش به کارت تبدیل می‌شود
   ========================================================================== */

@media (max-width: 767px) {
	.tsvst-purchased-products__hero {
		grid-template-columns: 48px minmax(0, 1fr);
		min-height: 0;
		padding: 14px;
	}

	.tsvst-purchased-products__hero-icon {
		width: 44px;
		height: 44px;
		font-size: 16px;
	}

	.tsvst-purchased-products__hero-copy h2 {
		font-size: 15px !important;
	}

	.tsvst-purchased-products__hero-copy p {
		font-size: 9px;
	}

	.tsvst-purchased-products__hero-meta {
		grid-column: 1 / -1;
		width: 100%;
		align-items: stretch;
		flex-direction: row;
	}

	.tsvst-purchased-products__count {
		flex: 1 1 auto;
	}

	.tsvst-purchased-products__secure {
		flex: 0 0 auto;
		justify-content: center;
	}

	.tsvst-purchased-products__toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.tsvst-purchased-products__search {
		width: 100%;
	}

	.tsvst-purchased-products__content {
		overflow: visible;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	.tsvst-purchased-products__content table,
	.tsvst-purchased-products__content #edd_user_history,
	.tsvst-purchased-products__content .edd-table,
	.tsvst-purchased-products__content tbody {
		display: block !important;
		width: 100% !important;
	}

	.tsvst-purchased-products__content thead {
		position: absolute !important;
		width: 1px !important;
		height: 1px !important;
		overflow: hidden !important;
		clip: rect(0 0 0 0) !important;
		white-space: nowrap !important;
	}

	.tsvst-purchased-products__content tbody tr {
		display: block !important;
		width: 100% !important;
		margin-bottom: 10px;
		overflow: hidden;
		border: 1px solid var(--pp-line) !important;
		border-radius: 7px;
		background: #fff;
		box-shadow: 0 9px 21px rgba(39, 45, 75, .055);
	}

	.tsvst-purchased-products__content tbody td {
		display: grid !important;
		grid-template-columns: minmax(92px, .35fr) minmax(0, 1fr);
		width: 100% !important;
		min-height: 47px;
		align-items: center;
		gap: 10px;
		padding: 10px 11px !important;
		border-bottom: 1px solid var(--pp-line) !important;
		text-align: right !important;
	}

	.tsvst-purchased-products__content tbody td::before {
		content: attr(data-label);
		color: #8a93a4;
		font-size: 8px;
		font-weight: 850;
		line-height: 1.7;
	}

	.tsvst-purchased-products__content tbody td:last-child {
		border-bottom: 0 !important;
	}

	.tsvst-order-actions {
		justify-content: flex-start;
	}

	.tsvst-order-action {
		min-height: 37px;
	}

	html.dark-invert .theme-invert-wrap .tsvst-purchased-products__content tbody tr {
		border-color: rgba(255, 255, 255, .09) !important;
		background: linear-gradient(
			135deg,
			rgba(18, 21, 37, .92),
			rgba(13, 29, 43, .86)
		) !important;
		box-shadow: 0 12px 27px rgba(0, 0, 0, .22) !important;
	}

	html.dark-invert .theme-invert-wrap .tsvst-purchased-products__content tbody td::before {
		color: rgba(224, 230, 241, .48) !important;
	}

	.tsvst-purchased-products__help {
		align-items: stretch;
		flex-direction: column;
	}

	.tsvst-purchased-products__help nav {
		width: 100%;
	}

	.tsvst-purchased-products__help nav a {
		flex: 1 1 50%;
	}
}

@media (max-width: 480px) {
	.tsvst-purchased-products__hero-meta {
		flex-direction: column;
	}

	.tsvst-purchased-products__content tbody td {
		grid-template-columns: 78px minmax(0, 1fr);
	}

	.tsvst-order-product {
		grid-template-columns: 34px minmax(0, 1fr);
	}

	.tsvst-order-product__thumb {
		width: 34px;
		height: 34px;
	}
}
/* ==========================================================================
   اصلاحات نسخه ۳
   ========================================================================== */

/* فرم جست‌وجوی سمت سرور */
.tsvst-purchased-products__search {
	position: relative !important;
	display: block !important;
	width: min(100%, 520px) !important;
	height: 42px !important;
}

.tsvst-purchased-products__search input {
	padding-right: 40px !important;
	padding-left: 124px !important;
}

.tsvst-purchased-products__search-submit {
	position: absolute !important;
	top: 5px !important;
	left: 5px !important;
	right: auto !important;

	display: inline-flex !important;
	width: 76px !important;
	height: 31px !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 5px !important;

	margin: 0 !important;
	padding: 0 8px !important;

	border: 0 !important;
	border-radius: 5px !important;

	color: #ffffff !important;
	background:
		linear-gradient(
			135deg,
			#6d52eb,
			#168fc3,
			#18b8c8
		) !important;

	font-size: 8px !important;
	font-weight: 900 !important;
	line-height: 1 !important;
}

.tsvst-purchased-products__search-clear {
	position: absolute !important;
	z-index: 4;
	top: 5px !important;
	left: 85px !important;

	display: inline-flex !important;
	width: 31px !important;
	height: 31px !important;
	align-items: center !important;
	justify-content: center !important;

	border: 1px solid rgba(109, 82, 235, .12);
	border-radius: 5px;

	color: #7d8596 !important;
	background: rgba(109, 82, 235, .055);

	font-size: 10px;
	text-decoration: none !important;
}

/* دکمه‌های عملیات کوچک‌تر */
.tsvst-order-action {
	min-height: 29px !important;
	padding: 4px 8px !important;
	gap: 5px !important;
	border-radius: 5px !important;
	font-size: 7.7px !important;
	line-height: 1.2 !important;
}

.tsvst-order-action i {
	font-size: 9px !important;
}

/* خطوط عمودی کمرنگ برای تفکیک ستون‌ها */
@media (min-width: 768px) {
	.tsvst-purchased-products__content thead th + th,
	.tsvst-purchased-products__content tbody td + td {
		border-right: 1px solid rgba(70, 82, 108, .085) !important;
	}

	html.dark-invert
	.theme-invert-wrap
	.tsvst-purchased-products__content thead th + th,
	html.dark-invert
	.theme-invert-wrap
	.tsvst-purchased-products__content tbody td + td {
		border-right-color: rgba(255, 255, 255, .07) !important;
	}
}

/* صفحه‌بندی اختصاصی نسخه ۳ */
.tsvst-purchase-pagination {
	padding: 14px;
	border-top: 1px solid var(--pp-line);
	background: #fafbfe;
}

.tsvst-purchase-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.tsvst-purchase-pagination .page-numbers li {
	margin: 0 !important;
	padding: 0 !important;
}

.tsvst-purchase-pagination .page-numbers a,
.tsvst-purchase-pagination .page-numbers span {
	display: inline-flex !important;
	min-width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	padding: 4px 8px;
	border: 1px solid var(--pp-line-solid);
	border-radius: 6px;
	color: #667084 !important;
	background: #ffffff;
	font-size: 8.5px;
	font-weight: 850;
	text-decoration: none !important;
}

.tsvst-purchase-pagination .page-numbers .current {
	color: #ffffff !important;
	border-color: transparent !important;
	background:
		linear-gradient(
			135deg,
			#6d52eb,
			#168fc3,
			#18b8c8
		) !important;
}

html.dark-invert
.theme-invert-wrap
.tsvst-purchase-pagination {
	border-top-color: rgba(255, 255, 255, .08);
	background: rgba(0, 0, 0, .10);
}

html.dark-invert
.theme-invert-wrap
.tsvst-purchase-pagination .page-numbers a,
html.dark-invert
.theme-invert-wrap
.tsvst-purchase-pagination .page-numbers span {
	border-color: rgba(255, 255, 255, .10);
	color: rgba(232, 236, 246, .72) !important;
	background: rgba(255, 255, 255, .045);
}

@media (max-width: 767px) {
	.tsvst-purchased-products__search {
		width: 100% !important;
	}

	.tsvst-purchased-products__search input {
		padding-left: 124px !important;
	}

	.tsvst-order-action {
		min-height: 31px !important;
		padding: 5px 8px !important;
	}
}

/* ==========================================================================
   اصلاح نهایی جست‌وجو، دکمه‌ها، عنوان جدول و صفحه‌بندی
   ========================================================================== */

/* ==========================================================================
   1. اصلاح کامل باکس جست‌وجو و نمایش دکمه
   ========================================================================== */

.tsvst-purchased-products__search {
	position: relative !important;

	display: flex !important;
	width: min(100%, 540px) !important;
	height: 44px !important;
	min-height: 44px !important;

	align-items: center !important;
	flex-direction: row !important;

	margin: 0 !important;
	padding: 0 !important;

	overflow: hidden !important;

	border: 1px solid #e2e7f0 !important;
	border-radius: 6px !important;

	background: #ffffff !important;

	direction: rtl !important;
}

/* آیکون سمت راست */
.tsvst-purchased-products__search > i {
	position: static !important;

	display: inline-flex !important;
	width: 38px !important;
	height: 42px !important;

	flex: 0 0 38px !important;
	order: 1;

	align-items: center !important;
	justify-content: center !important;

	margin: 0 !important;

	color: #6551c6 !important;

	font-size: 12px !important;

	transform: none !important;
}

/* فیلد جست‌وجو */
.tsvst-purchased-products__search input[type="search"] {
	position: static !important;

	display: block !important;
	width: auto !important;
	min-width: 0 !important;
	height: 42px !important;

	flex: 1 1 auto !important;
	order: 2;

	margin: 0 !important;
	padding: 0 5px !important;

	border: 0 !important;
	outline: 0 !important;

	color: #303647 !important;
	background: transparent !important;

	box-shadow: none !important;

	font-family: inherit !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	line-height: normal !important;

	text-align: right !important;
}

.tsvst-purchased-products__search input[type="search"]::placeholder {
	color: #99a1b0 !important;
	opacity: 1 !important;
}

/* دکمه پاک‌کردن */
.tsvst-purchased-products__search-clear {
	position: static !important;

	display: inline-flex !important;
	width: 30px !important;
	height: 30px !important;

	flex: 0 0 30px !important;
	order: 3;

	align-items: center !important;
	justify-content: center !important;

	margin: 0 3px !important;
	padding: 0 !important;

	border: 1px solid rgba(109, 82, 235, .12) !important;
	border-radius: 5px !important;

	color: #777f91 !important;
	background: rgba(109, 82, 235, .06) !important;

	font-size: 10px !important;
	text-decoration: none !important;
}

/* دکمه اصلی جست‌وجو */
.tsvst-purchased-products__search-submit {
	position: static !important;

	display: inline-flex !important;
	width: auto !important;
	min-width: 82px !important;
	height: 34px !important;
	min-height: 34px !important;

	flex: 0 0 auto !important;
	order: 4;

	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;

	margin: 4px !important;
	padding: 0 12px !important;

	border: 0 !important;
	border-radius: 5px !important;

	color: #ffffff !important;

	background:
		linear-gradient(
			135deg,
			#6d52eb,
			#168fc3,
			#18b8c8
		) !important;

	box-shadow: 0 5px 12px rgba(63, 62, 139, .16) !important;

	font-family: inherit !important;
	font-size: 8.5px !important;
	font-weight: 950 !important;
	line-height: 1 !important;

	white-space: nowrap !important;

	cursor: pointer !important;
}

.tsvst-purchased-products__search-submit span {
	display: inline !important;
}

.tsvst-purchased-products__search-submit i {
	font-size: 9px !important;
}

/* ==========================================================================
   2. بزرگ‌تر و بولدتر شدن عنوان ستون‌ها
   ========================================================================== */

.tsvst-purchased-products__content thead th {
	font-size: 10.5px !important;
	font-weight: 950 !important;
	line-height: 1.7 !important;

	color: #39334f !important;

	white-space: nowrap !important;
}

/* ==========================================================================
   3. کوچک‌تر شدن واقعی دکمه‌های عملیات
   ========================================================================== */

.tsvst-purchased-products__content
td.edd_purchase_details
.tsvst-order-actions {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-wrap: wrap !important;
	gap: 5px !important;
}

.tsvst-purchased-products__content
td.edd_purchase_details
.tsvst-order-action {
	display: inline-flex !important;

	width: auto !important;
	min-width: 0 !important;
	max-width: max-content !important;

	height: 28px !important;
	min-height: 28px !important;

	flex: 0 0 auto !important;

	align-items: center !important;
	justify-content: center !important;
	gap: 5px !important;

	margin: 0 !important;
	padding: 0 8px !important;

	border-radius: 5px !important;

	font-size: 7.8px !important;
	font-weight: 900 !important;
	line-height: 1 !important;

	white-space: nowrap !important;
}

.tsvst-purchased-products__content
td.edd_purchase_details
.tsvst-order-action i {
	font-size: 8px !important;
}

/* کمی کاهش فضای ستون عملیات */
.tsvst-purchased-products__content
td.edd_purchase_details {
	padding-right: 7px !important;
	padding-left: 7px !important;
}

/* ==========================================================================
   4. اصلاح کامل صفحه‌بندی و حذف پس‌زمینه سفید اضافه
   ========================================================================== */

.tsvst-purchase-pagination {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;

	margin: 0 !important;
	padding: 13px !important;

	border-top: 1px solid rgba(70, 82, 108, .09) !important;

	background: transparent !important;
	box-shadow: none !important;
}

.tsvst-purchase-pagination > ul.page-numbers {
	display: flex !important;
	width: auto !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 0 !important;

	align-items: center !important;
	justify-content: center !important;
	flex-wrap: wrap !important;
	gap: 5px !important;

	margin: 0 !important;
	padding: 0 !important;

	border: 0 !important;
	border-radius: 0 !important;

	background: transparent !important;
	box-shadow: none !important;

	list-style: none !important;
}

.tsvst-purchase-pagination > ul.page-numbers > li {
	display: block !important;

	width: auto !important;
	height: auto !important;

	margin: 0 !important;
	padding: 0 !important;

	border: 0 !important;

	background: transparent !important;
	box-shadow: none !important;

	list-style: none !important;
}

.tsvst-purchase-pagination > ul.page-numbers > li::before,
.tsvst-purchase-pagination > ul.page-numbers > li::after {
	display: none !important;
	content: none !important;
}

/* خود شماره‌ها */
.tsvst-purchase-pagination
> ul.page-numbers
> li
> a.page-numbers,

.tsvst-purchase-pagination
> ul.page-numbers
> li
> span.page-numbers {
	display: inline-flex !important;
	width: auto !important;
	min-width: 32px !important;
	height: 32px !important;
	min-height: 32px !important;

	align-items: center !important;
	justify-content: center !important;

	margin: 0 !important;
	padding: 0 9px !important;

	border: 1px solid rgba(109, 82, 235, .12) !important;
	border-radius: 5px !important;

	color: #687184 !important;

	background:
		linear-gradient(
			135deg,
			rgba(109, 82, 235, .045),
			rgba(22, 143, 195, .03),
			rgba(24, 184, 200, .035)
		) !important;

	box-shadow: none !important;

	font-size: 8.5px !important;
	font-weight: 900 !important;
	line-height: 1 !important;

	text-decoration: none !important;
}

/* صفحه فعال */
.tsvst-purchase-pagination
> ul.page-numbers
> li
> span.page-numbers.current {
	color: #ffffff !important;

	border-color: transparent !important;

	background:
		linear-gradient(
			135deg,
			#6d52eb,
			#168fc3,
			#18b8c8
		) !important;

	box-shadow: 0 6px 14px rgba(61, 58, 135, .18) !important;
}

/* قبلی و بعدی */
.tsvst-purchase-pagination
.page-numbers.prev,

.tsvst-purchase-pagination
.page-numbers.next {
	min-width: 48px !important;
	padding-right: 10px !important;
	padding-left: 10px !important;
}

/* ==========================================================================
   دارک‌مود اصلاحات جدید
   ========================================================================== */

html.dark-invert
.theme-invert-wrap
.tsvst-purchased-products__search {
	border-color: rgba(255, 255, 255, .10) !important;
	background: rgba(255, 255, 255, .045) !important;
}

html.dark-invert
.theme-invert-wrap
.tsvst-purchased-products__search input[type="search"] {
	color: #ffffff !important;
}

html.dark-invert
.theme-invert-wrap
.tsvst-purchased-products__search-clear {
	color: #d5cffb !important;
	border-color: rgba(159, 143, 255, .16) !important;
	background: rgba(109, 82, 235, .14) !important;
}

html.dark-invert
.theme-invert-wrap
.tsvst-purchased-products__content thead th {
	color: #ece8ff !important;
}

html.dark-invert
.theme-invert-wrap
.tsvst-purchase-pagination {
	border-top-color: rgba(255, 255, 255, .08) !important;
	background: transparent !important;
}

html.dark-invert
.theme-invert-wrap
.tsvst-purchase-pagination
> ul.page-numbers {
	background: transparent !important;
}

html.dark-invert
.theme-invert-wrap
.tsvst-purchase-pagination
> ul.page-numbers
> li
> a.page-numbers,

html.dark-invert
.theme-invert-wrap
.tsvst-purchase-pagination
> ul.page-numbers
> li
> span.page-numbers {
	color: rgba(232, 236, 246, .72) !important;

	border-color: rgba(255, 255, 255, .10) !important;

	background:
		linear-gradient(
			135deg,
			rgba(109, 82, 235, .13),
			rgba(22, 143, 195, .08),
			rgba(24, 184, 200, .08)
		) !important;
}

/* ==========================================================================
   موبایل
   ========================================================================== */

@media (max-width: 600px) {
	.tsvst-purchased-products__search {
		width: 100% !important;
	}

	.tsvst-purchased-products__search-submit {
		min-width: 72px !important;
		padding-right: 9px !important;
		padding-left: 9px !important;
	}

	.tsvst-purchased-products__content
	td.edd_purchase_details
	.tsvst-order-actions {
		justify-content: flex-start !important;
	}

	.tsvst-purchased-products__content
	td.edd_purchase_details
	.tsvst-order-action {
		height: 30px !important;
		min-height: 30px !important;
		font-size: 8px !important;
	}
}

/* یکسان‌شدن عرض دکمه‌های عملیات خرید */
.tsvst-purchased-products__content
td.edd_purchase_details
.tsvst-order-action {
	width: 118px !important;
	min-width: 118px !important;
	max-width: 118px !important;

	justify-content: center !important;
	text-align: center !important;
	white-space: nowrap !important;
}
