/* ==========================================================
   پرشین تیک — استایل ۱ دیدگاه‌ها
   رنگ‌ها از متغیرهای قالب با fallback خوانده می‌شوند
   ========================================================== */

.ptik-comments {
	--ptik-radius: var(--radius1, 10px);
	--ptik-primary: var(--primary, #2f6fed);
	--ptik-secondary: var(--secondary, #f2643f);
	--ptik-text: var(--text, #222);
	--ptik-gray1: var(--gray1, #f5f5f7);
	--ptik-gray2: var(--gray2, #d8d8de);
	--ptik-green: #2eaa5b;
	--ptik-red: #e03131;
	margin: 40px 0;
}

/* ---------- تیتر ---------- */

.ptik-comments-title {
	display: inline-block;
	margin: 0 0 20px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--ptik-primary);
	color: var(--ptik-primary);
	font-size: 18px;
	font-weight: 700;
}

.ptik-comments-count {
	font-weight: 400;
	font-size: 15px;
}

/* ---------- کارت فرم ---------- */

.ptik-form-card {
	background: #fff;
	border-radius: var(--ptik-radius);
	box-shadow: 0 3px 4.75px 0.25px rgba(24, 23, 24, 0.05);
	padding: 22px;
	margin-bottom: 26px;
}

.ptik-form-row {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

.ptik-form-row .ptik-field {
	flex: 1 1 0;
	min-width: 0;
}

/* وقتی ایمیل از ادمین غیرفعال شده، نام تمام عرض می‌شود */
.ptik-comment-form.ptik-no-email .ptik-field--author {
	flex: 1 1 100%;
}

.ptik-comment-form input[type="text"],
.ptik-comment-form input[type="email"],
.ptik-comment-form input[type="url"],
.ptik-comment-form textarea {
	width: 100%;
	background: var(--ptik-gray1);
	border: 1px solid transparent;
	border-radius: var(--ptik-radius);
	padding: 14px 16px;
	font: inherit;
	color: var(--ptik-text);
	outline: none;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.ptik-comment-form input::placeholder,
.ptik-comment-form textarea::placeholder {
	color: #9b9ba5;
}

.ptik-comment-form input:focus,
.ptik-comment-form textarea:focus {
	border-color: var(--ptik-gray2);
}

.ptik-comment-form textarea {
	resize: vertical;
	min-height: 150px;
}

.ptik-form-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 14px;
}

.ptik-form-error {
	color: var(--ptik-red);
	font-size: 14px;
}

.ptik-submit-btn {
	background: var(--ptik-primary);
	color: #fff;
	border: none;
	border-radius: var(--ptik-radius);
	padding: 12px 40px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.ptik-submit-btn:hover,
.ptik-submit-btn:active,
.ptik-submit-btn:focus {
	background: var(--ptik-secondary);
}

.ptik-submit-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

/* ---------- اعلان پاسخ ---------- */

.ptik-reply-notice {
	background: var(--ptik-gray1);
	border-radius: var(--ptik-radius);
	padding: 10px 14px;
	margin-bottom: 16px;
	font-size: 14px;
}

.ptik-cancel-reply {
	background: none;
	border: none;
	color: var(--ptik-secondary);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	margin-right: 8px;
	text-decoration: underline;
}

/* ---------- نوار مرتب‌سازی ---------- */

.ptik-sortbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

.ptik-sortbar-label {
	font-weight: 700;
	color: var(--ptik-text);
}

.ptik-sort-buttons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.ptik-sort-btn {
	background: #fff;
	color: var(--ptik-text);
	border: none;
	border-radius: var(--ptik-radius);
	box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.08);
	padding: 10px 22px;
	font: inherit;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ptik-sort-btn.is-active {
	background: var(--ptik-secondary);
	color: #fff;
	box-shadow: none;
}

/* ---------- کارت لیست نظرات ---------- */

.ptik-comments-card {
	background: #fff;
	border-radius: var(--ptik-radius);
	box-shadow: 0 3px 4.75px 0.25px rgba(24, 23, 24, 0.05);
	padding: 8px 22px;
}

.ptik-comments-card.is-loading {
	opacity: 0.5;
}

.ptik-comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ptik-comment {
	padding: 20px 0;
	border-bottom: 2px solid var(--ptik-gray1);
}

/* پاسخ‌ها با پدینگ از راست جدا می‌شوند */
.ptik-comment--reply {
	padding-right: 40px;
}

/* نظر مدیر سایت */
.ptik-comment--admin {
	background: var(--ptik-gray1);
	border-radius: var(--ptik-radius);
	padding-right: 16px;
	padding-left: 16px;
}

.ptik-comment--admin.ptik-comment--reply {
	padding-right: 50px;
}

.ptik-comment-head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 8px;
}

.ptik-comment-author {
	font-weight: 700;
	color: var(--ptik-text);
}

.ptik-comment-date {
	font-size: 12px;
	color: #9b9ba5;
}

.ptik-comment-text {
	color: var(--ptik-text);
	line-height: 2;
	margin-bottom: 14px;
}

.ptik-comment-text p {
	margin: 0 0 8px;
}

.ptik-comment-actions {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ptik-comment-replies-count {
	font-size: 13px;
	color: rgba(0, 0, 0, 0.65);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.ptik-comment-replies-count__short {
	display: none;
}

.ptik-comment-replies-arrow {
	font-size: 10px;
	line-height: 1;
	opacity: 0.7;
}

/* ---------- دکمه پاسخ ---------- */

.ptik-reply-btn {
	background: transparent;
	color: var(--ptik-text);
	border: 2px solid var(--ptik-secondary);
	border-radius: var(--ptik-radius);
	padding: 0 20px;
	height: 36px;
	font: inherit;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ptik-reply-btn:hover {
	background: var(--ptik-secondary);
	color: #fff;
}

/* ---------- رأی‌گیری ---------- */

.ptik-votes {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--ptik-gray2);
	border-radius: var(--ptik-radius);
	padding: 0 12px;
	height: 36px;
	box-sizing: border-box;
}

.ptik-vote {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 2px;
	cursor: pointer;
	color: rgba(0, 0, 0, 0.75);
	transition: color 0.2s ease;
}

.ptik-vote svg {
	width: 18px;
	height: 18px;
	display: block;
}

.ptik-vote--up:hover,
.ptik-vote--up.is-voted {
	color: var(--ptik-green);
}

.ptik-vote--down:hover,
.ptik-vote--down.is-voted {
	color: var(--ptik-red);
}

.ptik-vote-score {
	min-width: 18px;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	color: var(--ptik-text);
	direction: ltr;
	unicode-bidi: isolate;
}

.ptik-vote-score.is-positive {
	color: var(--ptik-green);
}

.ptik-vote-score.is-negative {
	color: var(--ptik-red);
}

.ptik-no-comments {
	padding: 24px 0;
	color: #9b9ba5;
	text-align: center;
}

/* ---------- صفحه‌بندی ---------- */

.ptik-comments-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 20px 0 8px;
	border-top: 2px solid var(--ptik-gray1);
	margin-top: 8px;
}

.ptik-page-btn {
	background: #fff;
	color: var(--ptik-text);
	border: none;
	border-radius: var(--ptik-radius);
	box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.08);
	padding: 10px 22px;
	font: inherit;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.ptik-page-btn:hover:not(.is-disabled) {
	background: var(--ptik-primary);
	color: #fff;
}

.ptik-page-btn.is-disabled {
	opacity: 0.45;
	cursor: default;
}

.ptik-page-info {
	font-size: 14px;
	color: #9b9ba5;
}

/* ---------- پیام ورود ---------- */

.ptik-login-required {
	text-align: center;
}

.ptik-login-required-text {
	margin: 0 0 16px;
	color: var(--ptik-text);
	font-size: 15px;
}

/* ---------- مودال ---------- */

.ptik-modal[hidden] {
	display: none;
}

.ptik-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ptik-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
}

.ptik-modal-box {
	position: relative;
	background: #fff;
	border-radius: 6px;
	padding: 30px 26px 26px;
	max-width: 420px;
	width: 100%;
	text-align: center;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
	animation: ptik-modal-in 0.3s ease;
}

@keyframes ptik-modal-in {
	from {
		opacity: 0;
		transform: scale(0.85);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.ptik-modal-icon {
	width: 100px;
	height: 100px;
	margin: 0 auto 22px;
}

.ptik-modal-icon svg {
	width: 100%;
	height: 100%;
}

.ptik-modal-icon-circle {
	stroke: #a5dc86;
	stroke-width: 2;
	stroke-dasharray: 151;
	stroke-dashoffset: 151;
	animation: ptik-circle-draw 0.7s ease forwards;
}

.ptik-modal-icon-check {
	stroke: #a5dc86;
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: ptik-check-draw 0.35s ease 0.6s forwards;
}

@keyframes ptik-circle-draw {
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes ptik-check-draw {
	to {
		stroke-dashoffset: 0;
	}
}

.ptik-modal-text {
	color: var(--text, #555);
	font-size: 17px;
	line-height: 1.9;
	margin: 0 0 24px;
}

.ptik-modal-btn {
	background: var(--primary, #2f6fed);
	color: #fff;
	border: none;
	border-radius: var(--radius1, 10px);
	padding: 12px 44px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.ptik-modal-btn:hover {
	background: var(--secondary, #f2643f);
}

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

@media (max-width: 600px) {
	.ptik-form-row {
		flex-direction: column;
		gap: 12px;
	}

	.ptik-sortbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.ptik-comment-replies-count__full {
		display: none;
	}

	.ptik-comment-replies-count__short {
		display: inline;
	}
}

/* ---------- استایل ۱ — بازطراحی کارت (الگو: lastsecond.ir) ---------- */

.ptik-form-card {
	border: 1px solid rgb(235, 235, 245);
	border-radius: 10px;
	margin-top: 30px;
}

.ptik-comment-form input[type="text"],
.ptik-comment-form input[type="email"],
.ptik-comment-form input[type="url"],
.ptik-comment-form textarea {
	height: 60px;
}

.ptik-comment-form input[type="text"],
.ptik-comment-form input[type="email"],
.ptik-comment-form input[type="url"],
.ptik-comment-form textarea {
	border-radius: 10px;
	border-width: 2px;
	background-color: #f9f9fa;
}

.comment-list-item__add-box input[type=email]:focus,
.comment-list-item__add-box input[type=text]:focus,
.comment-list-item__add-box textarea:focus {
	background-color: #fff;
	box-shadow: 0 0 1px 2px var(--primary);
	transition: all .3s ease-out;
}

.ptik-comment-form input:focus,
.ptik-comment-form textarea:focus {
	background-color: #FFF;
	border-color: var(--primary);
}

.ptik-submit-btn {
	height: 45px;
	width: 168px;
	font-weight: 400;
	padding: 0;
	border-radius: 40px;
}

.ptik-submit-btn:hover,
.ptik-submit-btn:focus {
	background-color: #8d0f0f;
}

.ptik-sortbar-label {
	font-weight: 400;
}

.ptik-sort-btn {
	height: 42px;
	padding: 0 22px;
	box-shadow: 0 3px 6px 0 rgba(0, 0, 0, .05);
	border: 1px var(--border1);
	border-radius: 50px;
}

.ptik-comments-card {
	padding: 0;
	box-shadow: 0 0 0;
}

.ptik-form-footer {
	margin-top: -10px;
}

.ptik-comment {
	border: 0;
	padding: 20px;
	box-shadow: rgba(24, 23, 24, 0.03) 0px 3px 4.75px 0.25px;
	border: 1px solid var(--border1);
	margin-bottom: 10px;
}

.ptik-vote-score {
	font-weight: 400;
	padding-top: 2px;
}

.ptik-comment--admin.ptik-comment--reply {
	padding-right: 20px;
	margin-right: 50px;
	border-radius: var(--radius1);
}

.ptik-comment--admin {
	background: rgba(0, 0, 0, .029);
}

/* ---------- امتیاز review محصول (ووکامرس) ---------- */

.ptik-form-row--review-rating {
	margin-bottom: 14px;
}

.ptik-form-row--review-rating.is-hidden {
	display: none;
}

.ptik-review-rating-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.ptik-review-rating-inline--form {
	width: 100%;
	justify-content: flex-start;
}

.ptik-review-rating-label {
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	color: var(--ptik-text);
	white-space: nowrap;
}

.ptik-review-rating-required {
	color: var(--ptik-red);
}

.ptik-rating--review-picker {
	display: block;
	width: 100%;
	margin: 0;
	align-items: flex-start;
}

.ptik-rating--review-picker .ptik-rating__stars {
	margin: 0;
	flex-shrink: 0;
}

.ptik-rating--review-picker.is-selected .ptik-rating__star {
	cursor: default;
}

.ptik-comment-head .ptik-comment-review-stars,
.ptik-comment-meta .ptik-comment-review-stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-inline: 8px;
	vertical-align: middle;
}

.ptik-comment-review-star {
	display: inline-flex;
	width: 18px;
	height: 18px;
	opacity: 0.25;
	line-height: 0;
}

.ptik-comment-review-star.is-on {
	opacity: 1;
}

.ptik-comment-review-star svg {
	width: 18px;
	height: 18px;
}
