.comments-card {
	--surface: #fff;
	--text: #111827;
	--muted: #6b7280;
	--line: #eceff4;
	--primary: #6f7bf7;
	--primary-2: #5ac8fa;
	--focus: rgba(13, 110, 253, 0.18);
	--sp-1: 0.25rem;
	--sp-2: 0.5rem;
	--sp-3: 0.75rem;
	--sp-4: 1rem;
	--sp-5: 1.25rem;
	--sp-6: 1.5rem;
	--sp-8: 2rem;
}

.comments-wrap {
	margin: var(--sp-8) auto;
	padding: 0 var(--sp-4);
}

.comments-card {
	max-width: 880px;
	margin: 0 auto;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: var(--sp-6) var(--sp-6) var(--sp-5);
	box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

.c-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: var(--sp-3);
	border-bottom: 1px solid #f3f4f6;
	margin-bottom: var(--sp-5);
	gap: 0.75rem;
}

.c-count {
	font-weight: 800;
	letter-spacing: 0.2px;
}

.c-sort-select {
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0.4rem 0.75rem;
	background: #fff;
	font-size: 0.92rem;
}

.visually-hidden {
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.flash {
	display: none;
	margin: 12px 0;
	padding: 10px 14px;
	border-radius: 10px;
	font-weight: 600;
}

.flash--ok {
	display: block;
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.flash--err {
	display: block;
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.flash--info {
	display: block;
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

.c-user {
	position: relative;
}

.c-user a {
	text-decoration: none;
	color: var(--text);
}

.c-user-menu {
	position: absolute;
	top: 110%;
	right: 0;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 0.5rem 0;
	min-width: 160px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	display: none;
	z-index: 50;
}

.c-user.show .c-user-menu {
	display: block;
}

.c-user-menu a {
	display: block;
	padding: 0.5rem 0.9rem;
	color: var(--text);
	font-size: 0.92rem;
	text-decoration: none;
}

.c-user-menu a:hover {
	background: #f6f7fb;
}

.c-compose {
	display: flex;
	align-items: flex-start;
	gap: var(--sp-4);
	margin: var(--sp-6) 0 var(--sp-4);
}

.c-ava {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 12px;
	background: #ff4f8b;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.c-ava img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
}

.c-ava span {
	line-height: 42px;
}

.c-input {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: #fff;
	padding: 0.9rem 3.1rem 0.9rem 1rem;
	min-height: 48px;
	resize: none;
	line-height: 1.6;
	height: 100px !important;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.c-input:focus {
	outline: 0;
	border-color: #c9d7ff;
	box-shadow: 0 0 0 0.25rem var(--focus);
}

.c-hint {
	position: absolute;
	right: 3.2rem;
	bottom: 0.7rem;
	font-size: 0.83rem;
	color: #6b7280;
}

.c-hint.warn {
	color: #b45309;
}

.c-hint.danger {
	color: #b91c1c;
}

.c-send {
	position: absolute;
	right: 0.5rem;
	bottom: 0.55rem;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 999px;
	background: var(--color-primary);
	color: #fff;
	display: grid;
	place-items: center;
	cursor: pointer;
}

.c-send .spinner,
.c-send .timer {
	display: none;
}

.c-send.is-loading .spinner {
	display: block;
}

.c-send.is-loading i {
	display: none;
}

.c-send.is-cooldown .timer {
	display: block;
}

.c-send.is-cooldown i,
.c-send.is-cooldown .spinner {
	display: none;
}

.spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.9s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.c-item {
	padding: var(--sp-5) 0;
	border-top: 1px solid #f3f4f6;
}

.c-item:first-child {
	border-top: none;
}

.c-row {
	display: grid;
	grid-template-columns: 42px 1fr;
	grid-column-gap: 0.85rem;
	align-items: flex-start;
}

.c-main {
	min-width: 0;
}

.c-meta {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.25rem;
	flex-wrap: wrap;
}

.c-author {
	font-weight: 700;
}

.c-dot {
	color: var(--muted);
}

.c-time {
	color: var(--muted);
	font-size: 0.9rem;
}

.c-content {
	color: var(--text);
	line-height: 1.7;
	font-size: 1rem;
	max-width: 75ch;
	word-break: break-word;
}

.c-content p {
	margin: 0 0 var(--sp-3);
}

.c-content ul,
.c-content ol {
	margin: 0 0 var(--sp-3) var(--sp-5);
}

.c-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.js-clamp {
	display: -webkit-box;
	-webkit-line-clamp: 8;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.js-clamp.is-open {
	display: block;
}

.c-more-btn {
	margin-top: 0.35rem;
	background: transparent;
	border: none;
	color: var(--primary);
	font-weight: 600;
	padding: 0;
	cursor: pointer;
}

.c-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.4rem;
	flex-wrap: wrap;
}

.c-actions a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.92rem;
	color: #4b5563;
	text-decoration: none;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	transition: background 0.12s;
}

.c-actions a:hover {
	background: #f6f7fb;
}

.like-count {
	min-width: 1ch;
}

.replies {
	margin-top: 0.6rem;
	margin-left: 2.25rem;
}

.replies .c-row {
	grid-template-columns: 36px 1fr;
}

.replies .c-ava {
	width: 36px;
	height: 36px;
	border-radius: 10px;
}

.replies .replies {
	margin-left: 2rem;
}

.replies .replies .c-row {
	grid-template-columns: 32px 1fr;
}

.replies .replies .c-ava {
	width: 32px;
	height: 32px;
	border-radius: 8px;
}

.c-blocked {
	border: 1px dashed var(--line);
	border-radius: 16px;
	padding: 2rem 1rem;
	background: #f9fafb;
	text-align: center;
}

.c-blocked .btn-login {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: var(--color-primary);
	color: #fff !important;
	border: none;
	border-radius: 999px;
	padding: 0.6rem 1.2rem;
	text-decoration: none;
	font-weight: 600;
}

.is-hidden {
	display: none !important;
}

.c-loadmore-wrap {
	text-align: center;
	margin-top: 0.5rem;
}

.c-loadmore-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: #fff;
	color: #374151;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 0.55rem 1rem;
	cursor: pointer;
}

.c-loadmore-btn:hover {
	background: #f9fafb;
}

@media (max-width: 560px) {
	.comments-card {
		padding: var(--sp-5) var(--sp-4) var(--sp-4);
	}

	.replies {
		margin-left: 1.5rem;
	}

	.replies .replies {
		margin-left: 1.25rem;
	}
}

/* ===== Skeleton saat loading ===== */
.comments-skel {
	max-width: 880px;
	margin: 2rem auto;
	padding: 1.25rem;
	border: 1px dashed #e5e7eb;
	border-radius: 16px;
	text-align: center;
	color: #6b7280;
	background: #fafafa;
}

.sk {
	display: inline-block;
	animation: spin 1s linear infinite;
}
