/*
 * ZetaFlix Comments – structura din referință, în tonul temei (dark).
 */

.zfc-comments {
	--zfc-bg: var(--zpc-bg, #0b0d12);
	--zfc-surface: var(--zpc-section, #141820);
	--zfc-card: var(--zpc-card, #1a1f2a);
	--zfc-border: var(--zpc-border, #2a303d);
	--zfc-text: var(--zpc-text, #f4f6fa);
	--zfc-muted: var(--zpc-muted, #a9b1bf);
	--zfc-accent: var(--zpc-accent, #e6b800);
	--zfc-link: #6aa8ff;
	--zfc-radius: 14px;

	clear: both;
	float: none;
	width: 100%;
	max-width: 100%;
	margin-top: 26px;
	padding: 20px 0 0;
	color: var(--zfc-text);
}

.zfc-comments *,
.zfc-comments *::before,
.zfc-comments *::after {
	box-sizing: border-box;
}

/* ---------- topbar ---------- */

.zfc-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--zfc-border);
	margin-bottom: 6px;
}

.zfc-title {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding-bottom: 10px;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--zfc-text);
}

.zfc-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -11px;
	width: 100%;
	height: 3px;
	border-radius: 3px;
	background: var(--zfc-accent);
}

.zfc-title .zfc-count {
	font-size: 16px;
	font-weight: 800;
}

.zfc-title .zfc-people {
	color: var(--zfc-muted);
	margin-left: 4px;
}

.zfc-tools {
	display: flex;
	align-items: center;
	gap: 10px;
}

.zfc-tool {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	color: var(--zfc-muted);
	background: transparent;
	transition: color .15s ease, background .15s ease;
}

.zfc-tool--bolt { color: var(--zfc-accent); }
.zfc-tool--hot { color: #ff6a3d; }

.zfc-tool:hover { background: var(--zfc-card); }

.zfc-sort select {
	appearance: none;
	-webkit-appearance: none;
	padding: 7px 30px 7px 12px;
	border: 1px solid var(--zfc-border);
	border-radius: 10px;
	background: var(--zfc-card)
		url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b1bf' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
		no-repeat right 8px center / 14px 14px;
	color: var(--zfc-text);
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
}

.zfc-sort select:focus {
	outline: none;
	border-color: var(--zfc-accent);
}

/* ---------- formular ---------- */

.zfc-comments .zfc-form,
.zfc-comments .comment-respond {
	margin: 22px 0;
	padding: 16px;
	border: 1px solid var(--zfc-border);
	border-radius: var(--zfc-radius);
	background: var(--zfc-surface);
}

.zfc-comments .comment-reply-title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
	color: var(--zfc-text);
}

.zfc-comments .comment-reply-title small a {
	color: var(--zfc-muted);
	font-weight: 500;
}

.zfc-comments textarea,
.zfc-comments input[type="text"],
.zfc-comments input[type="email"],
.zfc-comments input[type="url"] {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--zfc-border);
	border-radius: 10px;
	background: var(--zfc-card);
	color: var(--zfc-text);
	font-size: 14px;
}

.zfc-comments textarea::placeholder,
.zfc-comments input::placeholder { color: var(--zfc-muted); }

.zfc-comments textarea:focus,
.zfc-comments input:focus {
	outline: none;
	border-color: var(--zfc-accent);
}

.zfc-comments .zfc-field { margin: 0 0 12px; }

.zfc-comments .comment-form-author,
.zfc-comments .comment-form-email,
.zfc-comments .comment-form-url {
	margin: 0 0 12px;
}

.zfc-comments .form-submit { margin: 4px 0 0; }

.zfc-comments .zfc-submit,
.zfc-comments .form-submit input[type="submit"] {
	padding: 10px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--zfc-accent);
	color: #10131a;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .15s ease;
}

.zfc-comments .zfc-submit:hover,
.zfc-comments .form-submit input[type="submit"]:hover { filter: brightness(1.08); }

.zfc-comments .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--zfc-muted);
}

.zfc-comments .comment-form-cookies-consent input { width: auto; }

/* ---------- lista ---------- */

.zfc-list,
.zfc-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.zfc-list > li {
	list-style: none;
	border-bottom: 1px solid var(--zfc-border);
}

.zfc-list > li:last-child { border-bottom: 0; }

.zfc-comment-body {
	display: flex;
	gap: 14px;
	padding: 18px 0;
}

.zfc-avatar-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	width: 64px;
}

.zfc-comments img.zfc-avatar,
.zfc-comments .zfc-avatar-col img {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--zfc-border);
	background: var(--zfc-card);
}

.zfc-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .02em;
	white-space: nowrap;
}

.zfc-badge--member { background: #1f7a4d; color: #eafff3; }
.zfc-badge--admin  { background: var(--zfc-accent); color: #10131a; }
.zfc-badge--guest  { background: var(--zfc-card); color: var(--zfc-muted); border: 1px solid var(--zfc-border); }

.zfc-comment-main {
	flex: 1 1 auto;
	min-width: 0;
}

.zfc-comment-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.zfc-author {
	font-size: 15px;
	font-weight: 700;
	color: var(--zfc-link);
	text-decoration: none;
}

.zfc-author:hover { text-decoration: underline; }

.zfc-meta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.zfc-time {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: var(--zfc-muted);
	white-space: nowrap;
}

.zfc-kebab {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
}

.zfc-kebab span {
	display: block;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--zfc-muted);
}

.zfc-kebab:hover { background: var(--zfc-card); }
.zfc-kebab.is-copied span { background: var(--zfc-accent); }

.zfc-content {
	font-size: 15px;
	line-height: 1.6;
	color: var(--zfc-text);
	word-wrap: break-word;
}

.zfc-content p { margin: 0 0 8px; }
.zfc-content p:last-child { margin-bottom: 0; }
.zfc-content a { color: var(--zfc-link); }

.zfc-pending {
	font-size: 13px;
	font-style: italic;
	color: var(--zfc-accent);
}

.zfc-actions {
	margin-top: 8px;
}

.zfc-actions a,
.zfc-comments .comment-reply-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 14px;
	font-weight: 600;
	color: var(--zfc-muted);
	text-decoration: none;
}

.zfc-actions a:hover { color: var(--zfc-accent); }

/* ---------- răspunsuri ---------- */

.zfc-list .children {
	margin-left: 26px;
	padding-left: 22px;
	border-left: 2px solid var(--zfc-border);
}

.zfc-list .children > li { border-bottom: 0; }

.zfc-list .children .zfc-avatar-col { width: 56px; }

.zfc-list .children img.zfc-avatar,
.zfc-list .children .zfc-avatar-col img {
	width: 46px;
	height: 46px;
}

/* ---------- paginare / gol ---------- */

.zfc-empty {
	padding: 18px 0;
	color: var(--zfc-muted);
	font-size: 14px;
}

.zfc-comments .comments-pagination {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.zfc-comments .comments-pagination .page-numbers {
	padding: 6px 12px;
	border: 1px solid var(--zfc-border);
	border-radius: 8px;
	background: var(--zfc-card);
	color: var(--zfc-text);
	text-decoration: none;
	font-size: 14px;
}

.zfc-comments .comments-pagination .page-numbers.current {
	background: var(--zfc-accent);
	border-color: var(--zfc-accent);
	color: #10131a;
	font-weight: 700;
}

/* ---------- mobil ---------- */

@media (max-width: 600px) {
	.zfc-comment-body { gap: 10px; }
	.zfc-avatar-col { width: 48px; }

	.zfc-comments img.zfc-avatar,
	.zfc-comments .zfc-avatar-col img {
		width: 42px;
		height: 42px;
	}

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

	.zfc-comment-head {
		flex-wrap: wrap;
		gap: 6px;
	}
}

/* Avatar cu inițiale (fallback când utilizatorul nu are poză) */
.zfc-avatar-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--zfc-card, #1a1f2a);
	border: 1px solid var(--zfc-border, #2a303d);
	flex: 0 0 auto;
}

.zfc-avatar-initials {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .5px;
	color: var(--zfc-text, #f4f6fa);
	text-transform: uppercase;
}

.zfc-comments .zfc-avatar-wrap img.zfc-avatar {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 50%;
	object-fit: cover;
}

.zfc-list .children .zfc-avatar-wrap { width: 44px; height: 44px; }
.zfc-list .children .zfc-avatar-initials { font-size: 15px; }

@media (max-width: 600px) {
	.zfc-avatar-wrap { width: 44px; height: 44px; }
	.zfc-avatar-initials { font-size: 15px; }
}

/* ---------- corecții compatibilitate temă (v1.0.2) ---------- */

/* Numele autorului trebuie să fie mereu vizibil, chiar dacă tema ascunde headere */
.zfc-comments .zfc-comment-head {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	height: auto !important;
	width: auto !important;
	position: static !important;
	overflow: visible !important;
	clip: auto !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 6px !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
}

.zfc-comments .zfc-author {
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: var(--zfc-link, #6aa8ff) !important;
	text-indent: 0 !important;
	text-transform: none !important;
}

.zfc-comments .zfc-meta,
.zfc-comments .zfc-time { display: inline-flex !important; visibility: visible !important; opacity: 1 !important; }

/* Elimină casetele/gradientele adăugate de temă în jurul zonei de răspuns */
.zfc-comments .zfc-comment,
.zfc-comments .zfc-comment-body,
.zfc-comments .zfc-comment-main,
.zfc-comments .zfc-content,
.zfc-comments .zfc-actions {
	background: none !important;
	box-shadow: none !important;
}

.zfc-comments .zfc-comment::before,
.zfc-comments .zfc-comment::after,
.zfc-comments .zfc-comment-body::before,
.zfc-comments .zfc-comment-body::after,
.zfc-comments .zfc-actions::before,
.zfc-comments .zfc-actions::after,
.zfc-comments .zfc-content::after { content: none !important; display: none !important; }

.zfc-comments .zfc-actions {
	margin: 6px 0 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	border: 0 !important;
}

.zfc-comments .zfc-actions a,
.zfc-comments .comment-reply-link {
	padding: 2px 0 !important;
	margin: 0 !important;
	min-height: 0 !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	line-height: 1.3 !important;
}

/* Formularul de răspuns apare imediat sub comentariu */
.zfc-comments .zfc-comment .comment-respond {
	margin: 10px 0 4px !important;
	padding: 12px !important;
	background: var(--zfc-section, #141820) !important;
	border: 1px solid var(--zfc-border, #2a303d) !important;
	border-radius: 12px !important;
}

/* ---------- bară emoji ---------- */
.zfc-emoji-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 8px;
}

.zfc-emoji-bar button {
	font-size: 18px;
	line-height: 1;
	padding: 4px 6px;
	cursor: pointer;
	background: var(--zfc-card, #1a1f2a);
	border: 1px solid var(--zfc-border, #2a303d);
	border-radius: 8px;
}

.zfc-emoji-bar button:hover { border-color: var(--zfc-accent, #e6b800); }
