/* =============================================================================
   Comments CSS — WeAreInvictus210 (Reddit-style threaded comments)
   ============================================================================= */

/* ── Compose box (card with glow) ────────────────────────────────────────── */
.inv-comments__compose {
	background: #111827;
	border: 1px solid rgba(245, 158, 11, 0.15);
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 0 20px rgba(245, 158, 11, 0.04), 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.inv-comments__compose:focus-within {
	border-color: rgba(245, 158, 11, 0.3);
	box-shadow: 0 0 28px rgba(245, 158, 11, 0.08), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.inv-comments__textarea {
	width: 100%;
	background: #0c1222;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 10px;
	color: #f0f4ff;
	font-family: 'Inter', sans-serif;
	font-size: 0.85rem;
	line-height: 1.5;
	padding: 12px 14px;
	resize: vertical;
	min-height: 72px;
	transition: border-color 0.15s;
}

.inv-comments__textarea:focus {
	outline: none;
	border-color: rgba(245, 158, 11, 0.4);
}

.inv-comments__textarea::placeholder {
	color: #6b7494;
}

.inv-comments__submit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 20px;
	background: #f59e0b;
	color: #080d1a;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s, transform 0.1s;
}

.inv-comments__submit:hover:not(:disabled) {
	background: #d97706;
	transform: translateY(-1px);
}

.inv-comments__submit:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ── CTA for guests / unverified (card with gradient accent) ─────────────── */
.inv-comments__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 20px 24px;
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, #111827 70%);
	border: 1px solid rgba(245, 158, 11, 0.12);
	border-radius: 12px;
	text-align: center;
}

.inv-comments__cta-icon {
	font-size: 1.5rem;
	line-height: 1;
}

.inv-comments__cta p {
	flex-basis: 100%;
	margin: 0;
}

.inv-comments__cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 24px;
	background: #f59e0b;
	color: #080d1a;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.15s, transform 0.1s;
}

.inv-comments__cta-btn:hover {
	background: #d97706;
	transform: translateY(-1px);
}

/* ── Sort tabs ────────────────────────────────────────────────────────────── */
.inv-comments__sort {
	display: flex;
	gap: 4px;
}

.inv-comments__sort-tab {
	padding: 6px 16px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #6b7494;
	background: none;
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	transition: color 0.12s, background 0.12s, border-color 0.12s;
}

.inv-comments__sort-tab:hover {
	color: #c8cce8;
	background: rgba(255, 255, 255, 0.04);
}

.inv-comments__sort-tab.is-active {
	color: #f59e0b;
	background: rgba(245, 158, 11, 0.08);
	border-color: rgba(245, 158, 11, 0.2);
}

/* ── Loading & empty states ───────────────────────────────────────────────── */
.inv-comments__loading {
	padding: 32px 0;
	text-align: center;
	font-size: 0.8rem;
	color: #6b7494;
}

.inv-comments__empty {
	padding: 40px 0;
	text-align: center;
	font-size: 0.85rem;
	color: #6b7494;
}

.inv-comments__empty::before {
	content: '\1F4AC';
	display: block;
	font-size: 2rem;
	margin-bottom: 8px;
	opacity: 0.4;
}

/* ── Single comment ───────────────────────────────────────────────────────── */
.inv-comment {
	display: flex;
	gap: 12px;
	padding: 16px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.inv-comment:last-child {
	border-bottom: none;
}

.inv-comment__avatar {
	flex-shrink: 0;
}

.inv-comment__body {
	flex: 1;
	min-width: 0;
}

/* ── Meta (username + badges + time) ──────────────────────────────────────── */
.inv-comment__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
}

.inv-comment__username {
	font-size: 0.8rem;
	font-weight: 700;
	color: #f0f4ff;
	text-decoration: none;
	transition: color 0.12s;
}

.inv-comment__username:hover {
	color: #fff;
}

/* Level-colored usernames */
.inv-comment__username--commander {
	color: #f59e0b;
}

.inv-comment__username--warlord {
	color: #a855f7;
}

/* Level & role badges */
.inv-comment__badge {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 0.6rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 1px 6px;
	border-radius: 4px;
}

.inv-comment__badge--commander {
	background: rgba(245, 158, 11, 0.12);
	color: #f59e0b;
}

.inv-comment__badge--warlord {
	background: rgba(168, 85, 247, 0.12);
	color: #a855f7;
}

.inv-comment__badge--member {
	background: rgba(59, 130, 246, 0.12);
	color: #60a5fa;
}

.inv-comment__badge--verified {
	background: rgba(34, 197, 94, 0.12);
	color: #22c55e;
}

.inv-comment__time {
	font-size: 0.65rem;
	color: #6b7494;
}

.inv-comment__pinned {
	font-size: 0.65rem;
	color: #f59e0b;
	font-weight: 600;
}

/* ── Content ──────────────────────────────────────────────────────────────── */
.inv-comment__content {
	font-size: 0.85rem;
	line-height: 1.55;
	color: #c8cce8;
	word-break: break-word;
}

.inv-comment__deleted {
	font-size: 0.8rem;
	font-style: italic;
	color: #6b7494;
}

/* ── Level-colored left border ────────────────────────────────────────────── */
.inv-comment--commander {
	border-left: 3px solid rgba(245, 158, 11, 0.3);
	padding-left: 12px;
}

.inv-comment--warlord {
	border-left: 3px solid rgba(168, 85, 247, 0.3);
	padding-left: 12px;
}

/* ── Actions bar (vote, reply, admin) ─────────────────────────────────────── */
.inv-comment__actions {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 8px;
}

.inv-comment__vote-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: none;
	border: none;
	border-radius: 4px;
	color: #6b7494;
	cursor: pointer;
	transition: color 0.12s, background 0.12s;
	font-size: 0.85rem;
	line-height: 1;
}

.inv-comment__vote-btn:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #c8cce8;
}

.inv-comment__vote-btn.is-active-up {
	color: #f59e0b;
}

.inv-comment__vote-btn.is-active-down {
	color: #ef4444;
}

.inv-comment__score {
	font-size: 0.75rem;
	font-weight: 700;
	color: #c8cce8;
	min-width: 20px;
	text-align: center;
}

.inv-comment__score--positive {
	color: #f59e0b;
}

.inv-comment__score--negative {
	color: #ef4444;
}

.inv-comment__action-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	background: none;
	border: none;
	border-radius: 4px;
	color: #6b7494;
	font-size: 0.7rem;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.12s, background 0.12s;
}

.inv-comment__action-btn:hover {
	color: #c8cce8;
	background: rgba(255, 255, 255, 0.04);
}

.inv-comment__action-btn--delete:hover {
	color: #ef4444;
}

.inv-comment__action-btn--pin:hover {
	color: #f59e0b;
}

/* ── Replies (threaded, indented) ─────────────────────────────────────────── */
.inv-comment__replies-toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 0;
	background: none;
	border: none;
	color: #60a5fa;
	font-size: 0.7rem;
	font-weight: 600;
	cursor: pointer;
	margin-top: 4px;
	transition: color 0.12s;
}

.inv-comment__replies-toggle:hover {
	color: #93bbfc;
}

.inv-comment__replies {
	margin-top: 4px;
	margin-left: 0;
	padding-left: 16px;
	border-left: 2px solid rgba(255, 255, 255, 0.06);
}

.inv-comment__replies .inv-comment {
	padding: 12px 0;
}

/* ── Reply compose (inline) ───────────────────────────────────────────────── */
.inv-comment__reply-form {
	margin-top: 8px;
	padding-left: 16px;
	border-left: 2px solid rgba(245, 158, 11, 0.2);
}

.inv-comment__reply-form textarea {
	width: 100%;
	background: #111827;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	color: #f0f4ff;
	font-family: 'Inter', sans-serif;
	font-size: 0.8rem;
	line-height: 1.5;
	padding: 10px 12px;
	resize: none;
	min-height: 56px;
}

.inv-comment__reply-form textarea:focus {
	outline: none;
	border-color: rgba(245, 158, 11, 0.5);
}

.inv-comment__reply-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

.inv-comment__reply-submit {
	padding: 6px 14px;
	background: #f59e0b;
	color: #080d1a;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s;
}

.inv-comment__reply-submit:hover {
	background: #d97706;
}

.inv-comment__reply-cancel {
	padding: 6px 14px;
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	color: #6b7494;
	font-size: 0.7rem;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.12s, border-color 0.12s;
}

.inv-comment__reply-cancel:hover {
	color: #c8cce8;
	border-color: rgba(255, 255, 255, 0.2);
}

/* ── Load more button ─────────────────────────────────────────────────────── */
.inv-comments__more {
	text-align: center;
	padding: 16px 0;
}

.inv-comments__load-more-btn {
	display: inline-flex;
	align-items: center;
	padding: 10px 28px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	color: #c8cce8;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s;
}

.inv-comments__load-more-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.15);
}

/* ── Mobile adjustments ───────────────────────────────────────────────────── */
@media (max-width: 639px) {
	.inv-comment__replies {
		padding-left: 10px;
	}

	.inv-comment__reply-form {
		padding-left: 10px;
	}

	.inv-comments__compose {
		padding: 12px;
	}
}
