/* استایل ۱ کارت سفید. استایل ۲ کادر جمع‌شو: .ptik-toc--style2 */
.ptik-toc {
	box-sizing: border-box;
	direction: rtl;
	text-align: right;
	width: 100%;
	margin: 10px 0 20px;
	background: #fff;
	border: 1px solid #ededf0;
	border-radius: 5px;
	box-shadow: 0 2px 4px 0.25px rgba(0, 0, 0, 0.05);
	font-weight: 300;
	color: #444;
}

.ptik-toc *,
.ptik-toc *::before,
.ptik-toc *::after {
	box-sizing: border-box;
}

.ptik-toc button.ptik-toc__head,
.ptik-toc button.ptik-toc__more {
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none;
	background-image: none;
	text-transform: none;
	letter-spacing: normal;
}

.ptik-toc button.ptik-toc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 60px;
	margin: 0;
	padding: 0 12px 0 8px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #444;
	font: inherit;
	font-weight: 400;
	line-height: 1.4;
	text-align: right;
	cursor: pointer;
}

.ptik-toc:not(.ptik-toc--style2) {
	position: relative;
}

.ptik-toc:not(.ptik-toc--style2) .ptik-toc__head {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 2;
	height: 60px;
	min-height: 0;
	padding: 0;
	background: transparent;
}

.ptik-toc:not(.ptik-toc--style2) .ptik-toc__chevron {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
}

.ptik-toc:not(.ptik-toc--style2) .ptik-toc__chevron span {
	display: none;
}

.ptik-toc__title {
	display: flex;
	align-items: center;
	min-height: 60px;
	padding: 0 12px 0 58px;
	font-weight: 400;
}

.ptik-toc__chevron {
	position: relative;
	flex: 0 0 42px;
	width: 42px;
	height: 35px;
	border: 1px solid #ededf0;
	border-radius: 5px;
	background: #fff;
}

.ptik-toc__chevron::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid #999;
	border-bottom: 2px solid #999;
	transform: translate(-50%, -70%) rotate(45deg);
	transition: transform 0.2s ease;
}

.ptik-toc:not(.ptik-toc--closed) .ptik-toc__chevron::before {
	transform: translate(-50%, -30%) rotate(225deg);
}

.ptik-toc__head:focus-visible {
	outline: 2px solid #999;
	outline-offset: -2px;
}

.ptik-toc__body {
	overflow: hidden;
	transition: max-height 0.35s ease;
}

.ptik-toc--closed .ptik-toc__body {
	max-height: 0;
}

.ptik-toc__clip {
	position: relative;
	transition: max-height 0.35s ease;
}

.ptik-toc ul.ptik-toc__list {
	list-style: none;
	margin: 0;
	padding: 12px 8px 8px;
	border-top: 1px solid #dee2e6;
	counter-reset: ptik-toc-num;
}

.ptik-toc ul.ptik-toc__list .ptik-toc__list {
	border-top: 0;
	padding: 0 16px 0 0;
}

.ptik-toc__item {
	margin: 0;
	padding: 0;
	counter-increment: ptik-toc-num;
}

.ptik-toc a {
	display: flex;
	align-items: center;
	min-height: 40px;
	margin: 0;
	padding: 0 5px;
	border: 0;
	border-radius: 5px;
	color: #444;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
	box-shadow: none;
	background-color: transparent;
	background-image: none;
}

.ptik-toc a::before {
	content: counters(ptik-toc-num, ".") ".\00a0" !important;
	position: static !important;
	top: auto !important;
	right: auto !important;
	left: auto !important;
	width: auto !important;
	height: auto !important;
	flex: 0 0 auto;
	float: none;
	display: inline !important;
	opacity: 1 !important;
	transform: none !important;
	background: none !important;
	border: 0 !important;
	color: #444;
	pointer-events: none;
}

.ptik-toc a::after {
	content: none !important;
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	opacity: 0 !important;
	background: none !important;
	border: 0 !important;
}

.ptik-toc a:visited,
.ptik-toc a:hover,
.ptik-toc a:focus,
.ptik-toc a:focus-visible {
	color: #444;
	text-decoration: none;
	border: 0;
	border-bottom: 0;
	box-shadow: none;
	background-image: none;
}

.ptik-toc a:hover,
.ptik-toc a:focus-visible {
	background-color: var(--border1, #e9ecef);
}

.ptik-toc__fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 28px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 88%);
	pointer-events: none;
}

.ptik-toc button.ptik-toc__more {
	display: block;
	width: 100%;
	margin: 0;
	padding: 4px 12px 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #666;
	font: inherit;
	font-weight: 400;
	text-align: center;
	cursor: pointer;
}

.ptik-toc__fade[hidden],
.ptik-toc button.ptik-toc__more[hidden] {
	display: none;
}

.ptik-toc__more:hover,
.ptik-toc__more:focus-visible {
	color: #222;
}

.ptik-toc.is-clipped .ptik-toc__clip {
	overflow: hidden;
}

/* استایل ۲ — کادر جمع‌شو. دکمه بالای کادر است و خود کادر جمع می‌شود. */
.ptik-toc--style2 {
	position: relative;
	margin-top: 8px;
	padding-top: 30px;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

.ptik-toc--style2 button.ptik-toc__head {
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	z-index: 2;
	width: 28px;
	height: 22px;
	min-height: 0;
	margin: 0;
	padding: 0;
	background: transparent;
}

.ptik-toc--style2 .ptik-toc__chevron {
	position: relative;
	top: auto;
	left: auto;
	flex: none;
	width: 18px;
	height: 18px;
	border: 0;
	border-radius: 0;
	background: transparent;
	transform: none;
}

.ptik-toc--style2 .ptik-toc__chevron::before {
	content: none !important;
	display: none !important;
	border: 0 !important;
}

.ptik-toc--style2 .ptik-toc__chevron span {
	display: block;
	width: 18px;
	height: 2px;
	margin: 4px 0;
	border-radius: 1px;
	background: var(--primary, #6c4ce0);
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.ptik-toc--style2:not(.ptik-toc--closed) .ptik-toc__chevron span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.ptik-toc--style2:not(.ptik-toc--closed) .ptik-toc__chevron span:nth-child(2) {
	opacity: 0;
}

.ptik-toc--style2:not(.ptik-toc--closed) .ptik-toc__chevron span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

.ptik-toc--style2 .ptik-toc__sheet {
	overflow: hidden;
	background: #fff;
	border: 1px solid #ececf2;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(40, 42, 70, 0.12);
	transition: max-height 0.3s ease, opacity 0.25s ease, border-width 0.3s ease;
}

.ptik-toc--style2.ptik-toc--closed .ptik-toc__sheet {
	max-height: 0;
	opacity: 0;
	border-width: 0;
	box-shadow: none;
}

.ptik-toc--style2 .ptik-toc__body,
.ptik-toc--style2.ptik-toc--closed .ptik-toc__body {
	max-height: none;
	overflow: visible;
	transition: none;
}

.ptik-toc--style2 .ptik-toc__title {
	display: block;
	min-height: 0;
	padding: 16px 18px 8px;
	color: #1d1d2b;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

.ptik-toc--style2 .ptik-toc__clip {
	max-height: 320px;
	overflow: auto;
	scrollbar-width: thin;
}

.ptik-toc--style2 ul.ptik-toc__list {
	padding: 0 16px 12px;
	border-top: 0;
}

.ptik-toc--style2 ul.ptik-toc__list .ptik-toc__list {
	margin: 2px 0 8px;
	padding: 2px 12px 2px 0;
	border-top: 0;
	border-inline-start: 1px solid #e3e3ea;
}

.ptik-toc--style2 .ptik-toc__item {
	counter-increment: none;
}

.ptik-toc--style2 a {
	min-height: 0;
	padding: 5px 2px;
	border-radius: 0;
	color: #5c5a72;
	font-size: 14px;
	line-height: 1.45;
}

.ptik-toc--style2 a::before {
	content: none !important;
	display: none !important;
	width: 0 !important;
	height: 0 !important;
}

.ptik-toc--style2 a:visited,
.ptik-toc--style2 a:hover,
.ptik-toc--style2 a:focus,
.ptik-toc--style2 a:focus-visible,
.ptik-toc--style2 a.is-active {
	background-color: transparent;
	color: var(--primary, #6c4ce0);
}

@media (prefers-reduced-motion: reduce) {
	.ptik-toc__body,
	.ptik-toc__clip,
	.ptik-toc__sheet,
	.ptik-toc__chevron::before,
	.ptik-toc__chevron span {
		transition: none;
	}
}
