/* ==========================================================================
   BanglaTrick — Q&A Comments + Best Answer
   ========================================================================== */

/* ---------- Best Answer Highlight (already partly in qa-single.css) ---------- */
.bt-qa-answer.is-best {
	box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15), 0 4px 16px rgba(16, 185, 129, 0.08);
}
.bt-qa-answer.is-best .bt-qa-best-btn {
	background: #10b981;
	border-color: #10b981;
	color: white;
}

/* ---------- Comments Block ---------- */
.bt-qa-answer-comments {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px dashed var(--border);
}
.bt-qa-comments-head {
	margin-bottom: 12px;
}
.bt-qa-comments-title {
	font-size: 0.875rem;
	font-weight: 700;
	margin: 0;
	color: var(--heading);
}
.bt-qa-comments-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 14px;
}

/* ---------- Single Comment ---------- */
.bt-qa-comment {
	position: relative;
}
.bt-qa-comment-inner {
	display: flex;
	gap: 10px;
	padding: 10px 12px;
	background: var(--surface);
	border-radius: 8px;
	border: 1px solid var(--border);
	transition: border-color 0.15s;
}
.bt-qa-comment:hover > .bt-qa-comment-inner {
	border-color: rgba(22, 119, 255, 0.25);
}

.bt-qa-comment-avatar-link {
	flex-shrink: 0;
	line-height: 0;
}
.bt-qa-comment-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}

.bt-qa-comment-content {
	flex: 1;
	min-width: 0;
}

.bt-qa-comment-head {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 4px;
	font-size: 0.75rem;
}
.bt-qa-comment-author {
	font-weight: 700;
	color: var(--heading);
	text-decoration: none;
}
.bt-qa-comment-author:hover {
	color: var(--primary);
}
.bt-qa-comment-pts {
	font-size: 0.6875rem;
	color: var(--muted);
	background: var(--background);
	padding: 1px 6px;
	border-radius: 3px;
}
.bt-qa-comment-time {
	font-size: 0.6875rem;
	color: var(--muted);
}

.bt-qa-comment-body {
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--text);
	word-wrap: break-word;
}
.bt-qa-comment-body p {
	margin: 0 0 6px;
}
.bt-qa-comment-body p:last-child {
	margin-bottom: 0;
}
.bt-qa-comment-body a {
	color: var(--primary);
	text-decoration: underline;
}

.bt-qa-mention {
	color: var(--primary);
	font-weight: 600;
	background: var(--primary-soft);
	padding: 1px 6px;
	border-radius: 4px;
	text-decoration: none;
}
.bt-qa-mention:hover {
	background: var(--primary);
	color: white;
}

.bt-qa-comment-actions {
	display: flex;
	gap: 12px;
	margin-top: 6px;
}
.bt-qa-comment-action {
	background: transparent;
	border: none;
	padding: 0;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--muted);
	cursor: pointer;
	font-family: inherit;
	transition: color 0.15s;
}
.bt-qa-comment-action:hover {
	color: var(--primary);
}

/* ---------- Comment children (nesting) ---------- */
.bt-qa-comment-children {
	margin-left: 28px;
	margin-top: 10px;
	padding-left: 12px;
	border-left: 2px solid var(--border);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
@media (max-width: 640px) {
	.bt-qa-comment-children {
		margin-left: 14px;
		padding-left: 8px;
	}
}

/* Depth color-coded left border (cycle 4 colors) */
.bt-qa-comment-depth-0 > .bt-qa-comment-inner { border-left: 3px solid var(--primary); }
.bt-qa-comment-depth-1 > .bt-qa-comment-inner { border-left: 3px solid #10b981; }
.bt-qa-comment-depth-2 > .bt-qa-comment-inner { border-left: 3px solid #f59e0b; }
.bt-qa-comment-depth-3 > .bt-qa-comment-inner { border-left: 3px solid #8b5cf6; }

/* ---------- Comment form ---------- */
.bt-qa-comment-form {
	margin-top: 12px;
}
.bt-qa-comment-textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 0.875rem;
	font-family: inherit;
	background: var(--background);
	color: var(--text);
	resize: vertical;
	min-height: 60px;
	line-height: 1.5;
}
.bt-qa-comment-textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-soft);
}
.bt-qa-comment-form-actions {
	margin-top: 6px;
	display: flex;
	gap: 8px;
}
.bt-qa-comment-reply-box {
	margin-top: 10px;
}

/* ---------- Mention dropdown ---------- */
.bt-qa-mention-dropdown {
	position: absolute;
	z-index: 9999;
	background: var(--background);
	border: 1px solid var(--border);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	min-width: 220px;
	max-height: 260px;
	overflow-y: auto;
	padding: 6px;
	font-size: 0.875rem;
	animation: btQaMentionFade 0.15s ease;
}
@keyframes btQaMentionFade {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

.bt-qa-mention-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s;
	color: var(--text);
}
.bt-qa-mention-item:hover,
.bt-qa-mention-item.is-selected {
	background: var(--primary-soft);
	color: var(--primary);
}
.bt-qa-mention-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.bt-qa-mention-name {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.bt-qa-mention-name strong {
	font-weight: 600;
	font-size: 0.875rem;
	color: inherit;
}
.bt-qa-mention-name small {
	font-size: 0.6875rem;
	color: var(--muted);
}
.bt-qa-mention-empty {
	padding: 12px;
	text-align: center;
	font-size: 0.8125rem;
	color: var(--muted);
}