/**
 * EduNexa — ادونکسا
 * Comments & Educational Q&A Stylesheet
 *
 * @package EduNexa
 * @author  امیر حسین بناوند (Amir Hossein Banavand)
 * @link    https://npocto.ir
 * @version 1.0.0
 */

/* ==========================================================================
   1. Comments Section Wrapper & Header
   ========================================================================== */
.Edu-comments-area {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 38px 42px;
	margin-top: 40px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
	direction: rtl;
	text-align: right;
	position: relative;
}

.Edu-comments-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f1f5f9;
	margin-bottom: 30px;
}

.Edu-comments-header-title {
	display: flex;
	align-items: center;
	gap: 14px;
}

.Edu-comments-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(250, 178, 55, 0.15);
	color: #925c00;
	flex-shrink: 0;
}

.Edu-comments-icon svg {
	width: 22px;
	height: 22px;
}

.Edu-comments-title {
	font-size: 1.3rem;
	font-weight: 800;
	color: #1e293b;
	margin: 0 0 4px 0;
}

.Edu-comments-subtitle {
	font-size: 0.85rem;
	color: #64748b;
	display: block;
}

.Edu-comments-count-pill {
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	color: #334155;
	font-size: 0.82rem;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 999px;
	white-space: nowrap;
}

/* ==========================================================================
   2. Comments List & Threading Hierarchy
   ========================================================================== */
.Edu-comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.Edu-comment-list .children {
	list-style: none;
	margin: 16px 0 0 0;
	padding: 0 24px 0 0;
	border-right: 2px dashed #cbd5e1;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.Edu-comment-item {
	margin: 0;
}

.Edu-comment-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 22px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.Edu-comment-card:hover {
	background: #ffffff;
	border-color: #cbd5e1;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Post author highlight border */
.bypostauthor > .Edu-comment-card {
	border-right: 4px solid #FAB237;
	background: #fffdf5;
}

/* Comments Closed Notice */
.Edu-comments-closed-notice {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 14px 18px;
	margin-top: 24px;
	color: #64748b;
	font-size: 0.9rem;
	font-weight: 600;
}

.Edu-comments-closed-notice .Edu-closed-icon {
	display: inline-flex;
	color: #94a3b8;
}

.Edu-comments-closed-notice .Edu-closed-icon svg {
	width: 18px;
	height: 18px;
}

/* ==========================================================================
   3. Comment Author Meta & Badges
   ========================================================================== */
.Edu-comment-meta {
	margin-bottom: 14px;
}

.Edu-comment-author-wrap {
	display: flex;
	align-items: center;
	gap: 14px;
}

.Edu-comment-avatar {
	flex-shrink: 0;
}

.Edu-comment-avatar-img {
	border-radius: 50%;
	display: block;
	border: 2px solid #e2e8f0;
}

.bypostauthor .Edu-comment-avatar-img {
	border-color: #FAB237;
}

.Edu-comment-author-details {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.Edu-comment-author-name-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.Edu-comment-author-name {
	font-size: 0.98rem;
	font-weight: 800;
	color: #1e293b;
}

.Edu-comment-author-name a {
	color: #1e293b;
	text-decoration: none;
	transition: color 0.2s ease;
}

.Edu-comment-author-name a:hover {
	color: #FAB237;
}

/* Role Badges */
.Edu-role-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.72rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
}

.Edu-role-badge svg {
	width: 12px;
	height: 12px;
}

.Edu-role-author {
	background: #fffbeb;
	color: #b45309;
	border: 1px solid #fde68a;
}

.Edu-role-admin {
	background: #f5f3ff;
	color: #6d28d9;
	border: 1px solid #ddd6fe;
}

.Edu-role-student {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.Edu-comment-date-row {
	font-size: 0.78rem;
	color: #94a3b8;
}

.Edu-comment-time {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.Edu-comment-time svg {
	width: 12px;
	height: 12px;
}

/* ==========================================================================
   4. Moderation & Body
   ========================================================================== */
.Edu-comment-awaiting-moderation {
	background: #fffbeb;
	color: #92400e;
	border: 1px solid #fef3c7;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 0.82rem;
	font-weight: 600;
	margin-bottom: 12px;
}

.Edu-comment-body {
	font-size: 0.96rem;
	line-height: 1.85;
	color: #334155;
	margin-bottom: 16px;
}

.Edu-comment-body p {
	margin-bottom: 10px;
}

.Edu-comment-body p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   5. Actions Bar (Reply & Likes / Dislikes)
   ========================================================================== */
.Edu-comment-actions-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 14px;
	border-top: 1px solid #f1f5f9;
}

.Edu-comment-reply-wrap a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	font-weight: 700;
	color: #64748b;
	text-decoration: none;
	transition: color 0.2s ease;
	padding: 4px 8px;
	border-radius: 6px;
}

.Edu-comment-reply-wrap a svg {
	width: 13px;
	height: 13px;
}

.Edu-comment-reply-wrap a:hover {
	color: #FAB237;
	background: #f8fafc;
}

/* Voting Buttons */
.Edu-comment-voting-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.Edu-comment-vote-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
	color: #64748b;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	outline: none;
}

.Edu-comment-vote-btn svg {
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
}

.Edu-comment-vote-btn:hover {
	transform: translateY(-1px);
}

.Edu-comment-like:hover,
.Edu-comment-like.is-active {
	background: #ecfdf5;
	color: #059669;
	border-color: #a7f3d0;
}

.Edu-comment-like.is-active svg {
	fill: #059669;
}

.Edu-comment-dislike:hover,
.Edu-comment-dislike.is-active {
	background: #fef2f2;
	color: #dc2626;
	border-color: #fecaca;
}

.Edu-comment-dislike.is-active svg {
	fill: #dc2626;
}

.Edu-vote-pop {
	animation: EduVotePop 0.3s ease;
}

@keyframes EduVotePop {
	0% { transform: scale(1); }
	50% { transform: scale(1.3); }
	100% { transform: scale(1); }
}

/* ==========================================================================
   6. Comment Submission Form (#respond)
   ========================================================================== */
#respond {
	margin-top: 40px;
	padding: 28px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
}

.Edu-reply-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.2rem;
	font-weight: 800;
	color: #1e293b;
	margin: 0 0 8px 0;
}

.Edu-reply-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: rgba(250, 178, 55, 0.15);
	color: #925c00;
}

.Edu-reply-icon svg {
	width: 16px;
	height: 16px;
}

#cancel-comment-reply-link {
	font-size: 0.8rem;
	color: #ef4444;
	text-decoration: none;
	margin-right: 12px;
	font-weight: 600;
}

.Edu-comment-notes {
	font-size: 0.82rem;
	color: #64748b;
	margin: 0 0 18px 0;
}

.comment-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.comment-form .Edu-form-group {
	margin-bottom: 0;
}

.Edu-comment-field-textarea textarea {
	width: 100%;
	min-height: 120px;
	padding: 14px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	font-size: 0.95rem;
	color: #1e293b;
	background: #ffffff;
	box-sizing: border-box;
	transition: all 0.2s ease;
	outline: none;
	resize: vertical;
}

.Edu-comment-field-textarea textarea:focus {
	border-color: #FAB237;
	box-shadow: 0 0 0 3px rgba(250, 178, 55, 0.2);
}

.Edu-btn-submit-comment {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #FAB237;
	color: #222733;
	font-size: 0.92rem;
	font-weight: 700;
	padding: 10px 24px;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	align-self: flex-start;
	box-shadow: 0 4px 12px rgba(250, 178, 55, 0.25);
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.Edu-btn-submit-comment:hover {
	background: #e59d22;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(250, 178, 55, 0.4);
}

.Edu-btn-submit-comment svg {
	width: 14px;
	height: 14px;
}

/* ==========================================================================
   7. Responsive
   ========================================================================== */
@media (max-width: 768px) {
	.Edu-comments-area {
		padding: 20px 16px;
		border-radius: 16px;
		margin-top: 24px;
	}

	.Edu-comments-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.Edu-comments-title {
		font-size: 1.25rem;
	}

	.Edu-comment-list .children {
		padding-inline-start: 12px;
		margin-inline-start: 6px;
		border-inline-start: 2px solid #e2e8f0;
	}

	.Edu-comment-author-wrap {
		gap: 10px;
	}

	.Edu-comment-avatar-img {
		width: 42px;
		height: 42px;
	}

	.Edu-comment-actions-bar {
		flex-wrap: wrap;
		gap: 10px;
	}

	.Edu-comment-voting-wrap {
		gap: 6px;
	}

	.Edu-comment-vote-btn {
		padding: 4px 10px;
		font-size: 0.78rem;
	}

	#respond {
		padding: 16px;
		border-radius: 14px;
	}

	#respond .comment-form-author,
	#respond .comment-form-email,
	#respond .comment-form-url {
		width: 100%;
		float: none;
	}

	.Edu-btn-submit-comment {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.Edu-comments-area {
		padding: 16px 12px;
	}

	.Edu-comment-item {
		padding: 14px 12px;
		border-radius: 12px;
	}

	.Edu-comment-list .children {
		padding-inline-start: 8px;
		margin-inline-start: 4px;
	}

	.Edu-comment-author-name {
		font-size: 0.9rem;
	}

	.Edu-role-badge {
		font-size: 0.68rem;
		padding: 1px 6px;
	}

	.Edu-comment-body {
		font-size: 0.92rem;
		line-height: 1.75;
	}
}

