/* Custom Comments Styling for cuahangbaoholaodong.vn */

/* Pending-moderation notice shown after submitting a comment */
.gpsc-pending-notice {
	max-width: 800px;
	margin: 0 auto 20px;
	padding: 14px 18px;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	border-left: 4px solid #006633;
	border-radius: 8px;
	color: #065f46;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.5;
}

/* Core comments area container */
.comments-area {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #2c3e50;
	max-width: 800px;
	margin: 0 auto;
}

.comments-title {
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 22px;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 24px;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	border-left: 4px solid #006633;
	padding-left: 12px;
}

/* Respond (Form container) */
#respond {
	background: #ffffff;
	border: 1px solid rgba(0, 102, 51, 0.12);
	border-radius: 16px;
	padding: 32px;
	margin: 32px 0;
	box-shadow: 0 10px 30px rgba(0, 102, 51, 0.03);
	transition: box-shadow 0.3s ease;
}

#respond:focus-within {
	box-shadow: 0 12px 36px rgba(0, 102, 51, 0.06);
}

.comment-reply-title {
	margin: 0 0 20px;
	color: #006633;
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 22px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: -0.01em;
}

#commentform {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

#commentform .gpsc-field {
	margin: 0;
}

#commentform label {
	display: block;
	margin-bottom: 8px;
	color: #4a5568;
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1.5px solid rgba(0, 102, 51, 0.18);
	border-radius: 10px;
	padding: 14px 16px;
	font-family: "Inter", sans-serif;
	font-size: 16px;
	color: #2d3748;
	background: #fafafa; /* Consistent with website input background */
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#commentform input[type="text"]::placeholder,
#commentform input[type="email"]::placeholder,
#commentform textarea::placeholder {
	color: #a0aec0;
}

#commentform input[type="text"]:focus,
#commentform input[type="email"]:focus,
#commentform textarea:focus {
	outline: none;
	background: #ffffff;
	border-color: #006633;
	box-shadow: 0 0 0 4px rgba(0, 102, 51, 0.08);
}

#commentform textarea {
	min-height: 140px;
	resize: vertical;
}

#commentform .form-submit {
	margin: 0;
	align-self: flex-start;
}

#commentform .submit,
#commentform .gpsc-submit {
	background: #006633;
	color: #ffffff;
	border: none;
	border-radius: 30px;
	padding: 12px 32px;
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 102, 51, 0.15);
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#commentform .submit:hover,
#commentform .submit:focus,
#commentform .gpsc-submit:hover,
#commentform .gpsc-submit:focus {
	background: #004d26;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 102, 51, 0.22);
}

#commentform .submit:active,
#commentform .gpsc-submit:active {
	transform: translateY(1px);
}

/* Honeypot security */
.gpsc-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Comment list container */
.comment-list {
	margin: 32px 0;
	padding: 0;
	list-style: none;
}

.gpsc-comment-card {
	list-style: none;
	margin: 0 0 20px;
}

.gpsc-comment-body {
	display: flex;
	gap: 16px;
	background: #ffffff;
	border: 1px solid rgba(0, 102, 51, 0.1);
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
	transition: all 0.25s ease;
}

.gpsc-comment-body:hover {
	border-color: rgba(0, 102, 51, 0.2);
	box-shadow: 0 6px 20px rgba(0, 102, 51, 0.03);
}

/* Highlight for post author (admin) comments */
.gpsc-comment-card.bypostauthor > .gpsc-comment-body {
	border-color: rgba(0, 102, 51, 0.28);
	background: #f4faf7; /* Gentle green tint */
}

/* Custom avatar */
.gpsc-comment-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: linear-gradient(135deg, #006633 0%, #004d26 100%); /* Solid brand green gradient */
	color: #ffffff;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 18px;
	flex-shrink: 0;
	user-select: none;
	box-shadow: 0 3px 8px rgba(0, 102, 51, 0.15);
}

/* Soft color avatar for normal users if they aren't admin */
.gpsc-comment-card:not(.bypostauthor) > .gpsc-comment-body .gpsc-comment-avatar {
	background: linear-gradient(135deg, #e6f2eb 0%, #cde5d7 100%);
	color: #006633;
	border: 1.5px solid rgba(0, 102, 51, 0.15);
	box-shadow: 0 2px 6px rgba(0, 102, 51, 0.05);
}

/* Details area */
.gpsc-comment-details {
	flex-grow: 1;
	min-width: 0; /* Prevents text overflow */
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gpsc-comment-header {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	align-items: center;
}

.gpsc-comment-author {
	color: #1a1a1a;
	font-family: "Montserrat", sans-serif;
	font-size: 16px;
	font-weight: 700;
}

/* Author badge for post author */
.gpsc-comment-card.bypostauthor > .gpsc-comment-body .gpsc-comment-author::after {
	content: "Tác giả";
	font-family: "Inter", sans-serif;
	font-size: 11px;
	font-weight: 600;
	color: #ffffff;
	background: #006633;
	padding: 2px 8px;
	border-radius: 4px;
	margin-left: 8px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	display: inline-block;
	vertical-align: middle;
	line-height: 1.2;
}

.gpsc-comment-date {
	color: #8a96a3;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
}

.gpsc-comment-date::before {
	content: "•";
	margin-right: 8px;
	color: #cbd5e0;
	font-weight: bold;
}

.gpsc-comment-content {
	color: #334155;
	font-size: 15px;
	line-height: 1.6;
}

.gpsc-comment-content p {
	margin: 0 0 12px;
}

.gpsc-comment-content p:last-child {
	margin-bottom: 0;
}

/* Reply link button */
.gpsc-comment-actions {
	display: flex;
	margin-top: 4px;
}

.comment-reply-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #006633;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-decoration: none;
	padding: 6px 16px;
	background: #f0f7f3;
	border-radius: 20px;
	transition: all 0.2s ease;
}

.comment-reply-link:hover {
	background: #006633;
	color: #ffffff;
}

.comment-reply-link .reply-icon {
	display: inline-block;
	width: 12px;
	height: 10px;
	background-color: currentColor;
	clip-path: polygon(40% 0%, 40% 40%, 100% 40%, 100% 60%, 40% 60%, 40% 100%, 0% 50%);
	transform: scaleX(-1); /* Points to the left (reply) */
}

/* Threading hierarchy */
.comment-list .children {
	margin-top: 16px;
	margin-left: 36px;
	padding-left: 24px;
	border-left: 2px solid rgba(0, 102, 51, 0.08);
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Hide WP default avatar styles */
.comments-area .avatar {
	display: none;
}

/* Responsive adjustments */
@media (max-width: 600px) {
	#respond {
		padding: 20px;
		margin: 20px 0;
		border-radius: 12px;
	}

	.comment-reply-title {
		font-size: 18px;
		margin-bottom: 16px;
	}

	#commentform input[type="text"],
	#commentform input[type="email"],
	#commentform textarea {
		padding: 12px 14px;
		font-size: 15px;
	}

	#commentform .submit,
	#commentform .gpsc-submit {
		width: 100%;
		text-align: center;
	}

	.gpsc-comment-body {
		padding: 16px;
		gap: 12px;
	}

	.gpsc-comment-avatar {
		width: 38px;
		height: 38px;
		font-size: 15px;
	}

	.gpsc-comment-author {
		font-size: 15px;
	}

	.gpsc-comment-date {
		font-size: 12px;
	}

	.gpsc-comment-content {
		font-size: 14.5px;
	}

	.comment-list .children {
		margin-left: 12px;
		padding-left: 12px;
	}
}
