/* ============================================
   نظام التعليقات الاحترافي - تصميم 2025
   ============================================ */

/* Container الرئيسي */
.appx-comments-wrapper {
	margin: 48px 0;
	width: 100%;
	max-width: 100%;
}

/* Header القسم */
.appx-comments-header {
	margin-bottom: 32px;
	padding-bottom: 20px;
	border-bottom: 2px solid rgba(15, 23, 42, 0.08);
}

.appx-comments-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: clamp(1.5rem, 4vw, 1.85rem);
	font-weight: 800;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.appx-comments-icon {
	font-size: 1.4em;
	opacity: 0.9;
}

/* قسم التعليقات السريعة */
.appx-quick-comments-section {
	margin-bottom: 48px;
	padding: 32px;
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 24px;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.appx-quick-comments-header {
	margin-bottom: 28px;
	text-align: center;
}

.appx-quick-comments-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0 0 12px 0;
	font-size: clamp(1.25rem, 3vw, 1.5rem);
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.01em;
}

.appx-quick-comments-icon {
	font-size: 1.3em;
}

.appx-quick-comments-subtitle {
	margin: 0;
	font-size: 0.95rem;
	color: #64748b;
	line-height: 1.6;
	font-weight: 400;
}

/* قسم التعليقات العادية */
.appx-regular-comments-section {
	margin-top: 48px;
}

.appx-regular-comments-header {
	margin-bottom: 28px;
	padding-bottom: 16px;
	border-bottom: 2px solid rgba(15, 23, 42, 0.08);
}

.appx-regular-comments-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: clamp(1.2rem, 3vw, 1.4rem);
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.01em;
}

.appx-regular-comments-icon {
	font-size: 1.2em;
}

/* Container التعليقات */
.appx-comments-container {
	margin-top: 24px;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* كل تعليق - تصميم نظيف واحترافي */
.appx-comment-item {
	display: flex;
	gap: 16px;
	padding: 20px;
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 16px;
	direction: rtl;
	text-align: right;
	width: 100%;
	box-sizing: border-box;
	word-wrap: break-word;
	overflow-wrap: break-word;
	transition: all 0.2s ease;
	position: relative;
}

.appx-comment-item:hover {
	border-color: rgba(15, 23, 42, 0.15);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Avatar - دائري بسيط */
.appx-comment-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border: 2px solid rgba(255, 255, 255, 0.9);
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.appx-comment-avatar-letter {
	font-size: 1.25rem;
	font-weight: 700;
	color: #ffffff;
	text-transform: uppercase;
	line-height: 1;
}

/* Body التعليق */
.appx-comment-main {
	flex: 1;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
	direction: rtl;
	text-align: right;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

/* Badge الرد */
.appx-comment-reply-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	background: rgba(15, 23, 42, 0.05);
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 8px;
	font-size: 0.8rem;
	font-weight: 600;
	color: #475569;
	margin-bottom: 12px;
}

/* Header التعليق */
.appx-comment-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.appx-comment-author {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.01em;
}

.appx-comment-author a {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s ease;
}

.appx-comment-author a:hover {
	color: #6366f1;
}

.appx-comment-date {
	font-size: 0.875rem;
	color: #64748b;
	font-weight: 400;
}

/* محتوى التعليق */
.appx-comment-text {
	font-size: 0.95rem;
	line-height: 1.7;
	color: #334155;
	margin-bottom: 12px;
	word-wrap: break-word;
	overflow-wrap: break-word;
	direction: rtl;
	text-align: right;
	unicode-bidi: embed;
}

.appx-comment-text p {
	margin: 0 0 10px;
}

.appx-comment-text p:last-child {
	margin-bottom: 0;
}

/* رسالة الموافقة */
.appx-comment-pending {
	margin-top: 12px;
	padding: 10px 14px;
	background: rgba(251, 191, 36, 0.1);
	border: 1px solid rgba(251, 191, 36, 0.3);
	border-radius: 8px;
	font-size: 0.875rem;
	color: #92400e;
	font-weight: 500;
}

/* رابط الرد */
.appx-comment-reply-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	padding: 6px 14px;
	font-size: 0.875rem;
	font-weight: 600;
	color: #6366f1;
	background: rgba(99, 102, 241, 0.08);
	border: 1px solid rgba(99, 102, 241, 0.2);
	border-radius: 8px;
	text-decoration: none;
	transition: all 0.2s ease;
}

.appx-comment-reply-link:hover {
	background: rgba(99, 102, 241, 0.12);
	border-color: rgba(99, 102, 241, 0.3);
	color: #4f46e5;
}

/* الردود */
.appx-comment-item.is-reply {
	background: #f8fafc;
	border-color: rgba(15, 23, 42, 0.1);
	margin-inline-start: 32px;
}

.appx-comment-item.is-reply .appx-comment-avatar {
	width: 40px;
	height: 40px;
}

.appx-comment-item.is-reply .appx-comment-avatar-letter {
	font-size: 1.1rem;
}

/* التعليقات السريعة */
.appx-quick-comments-section .appx-comment-item {
	background: #fffef7;
	border-color: rgba(251, 191, 36, 0.2);
}

.appx-quick-comments-section .appx-comment-avatar {
	background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
	box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
}

/* Pagination */
.appx-comments-pagination {
	margin-top: 40px;
	text-align: center;
}

.appx-comments-pagination .nav-links {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.appx-comments-pagination .page-numbers {
	padding: 8px 16px;
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 8px;
	text-decoration: none;
	color: #475569;
	font-weight: 600;
	font-size: 0.9rem;
	background: #ffffff;
	transition: all 0.2s ease;
}

.appx-comments-pagination .page-numbers:hover {
	background: rgba(15, 23, 42, 0.05);
	border-color: rgba(15, 23, 42, 0.2);
	color: #0f172a;
}

.appx-comments-pagination .page-numbers.current {
	background: #0f172a;
	color: #ffffff;
	border-color: #0f172a;
}

/* Empty State */
.appx-comments-empty {
	text-align: center;
	padding: 60px 20px;
	color: #64748b;
}

.appx-comments-empty-icon {
	display: block;
	font-size: 3.5rem;
	margin-bottom: 16px;
	opacity: 0.5;
}

.appx-comments-empty p {
	margin: 0;
	font-size: 1rem;
}

/* Form - تصميم نظيف */
.appx-comment-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 48px;
	padding: 28px;
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 20px;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.appx-comment-form-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

@media (min-width: 640px) {
	.appx-comment-form-row {
		grid-template-columns: repeat(2, 1fr);
	}
}

.appx-comment-form-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.appx-comment-form-label {
	font-weight: 600;
	font-size: 0.9rem;
	color: #0f172a;
	letter-spacing: -0.01em;
}

.appx-comment-form-label .required {
	color: #ef4444;
	font-weight: 700;
}

.appx-comment-form-input,
.appx-comment-form-textarea {
	width: 100%;
	padding: 12px 16px;
	font-size: 0.95rem;
	border: 1px solid rgba(15, 23, 42, 0.15);
	border-radius: 10px;
	background: #ffffff;
	box-sizing: border-box;
	font-family: inherit;
	color: #0f172a;
	transition: all 0.2s ease;
}

.appx-comment-form-input:focus,
.appx-comment-form-textarea:focus {
	border-color: #6366f1;
	outline: none;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
	background: #ffffff;
}

.appx-comment-form-input::placeholder,
.appx-comment-form-textarea::placeholder {
	color: #94a3b8;
}

.appx-comment-form-textarea {
	resize: vertical;
	min-height: 120px;
	line-height: 1.6;
}

.appx-comment-form-hint {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: rgba(251, 191, 36, 0.1);
	border: 1px solid rgba(251, 191, 36, 0.2);
	border-radius: 8px;
	font-size: 0.85rem;
	color: #92400e;
	margin-top: 4px;
	font-weight: 500;
}

.appx-comment-form-submit {
	padding: 14px 28px;
	font-size: 1rem;
	font-weight: 700;
	color: #ffffff;
	background: #0f172a;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	letter-spacing: -0.01em;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.appx-comment-form-submit:hover {
	background: #1e293b;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
	transform: translateY(-1px);
}

.appx-comment-form-submit:active {
	transform: translateY(0);
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.15);
}

.appx-comment-form-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: #94a3b8;
	box-shadow: none;
	transform: none;
}

.appx-comment-form-message {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 0.9rem;
	display: none;
	font-weight: 500;
}

.appx-comment-form-message.is-success {
	display: block;
	background: rgba(34, 197, 94, 0.1);
	border: 1px solid rgba(34, 197, 94, 0.3);
	color: #059669;
}

.appx-comment-form-message.is-error {
	display: block;
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.3);
	color: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
	.appx-comment-item {
		flex-direction: column;
		gap: 12px;
		padding: 16px;
		border-radius: 12px;
	}

	.appx-comment-item.is-reply {
		margin-inline-start: 16px;
	}

	.appx-comment-avatar {
		width: 40px;
		height: 40px;
	}

	.appx-comment-avatar-letter {
		font-size: 1.1rem;
	}

	.appx-comment-form {
		padding: 20px;
		border-radius: 16px;
	}

	.appx-quick-comments-section {
		padding: 24px 20px;
	}
}
