/* =====================================================================
   COMMENTS
   ---------------------------------------------------------------------
   WordPress builds this form itself, so everything here is styling laid
   over the standard markup — no field is renamed, moved or replaced, and
   nothing about how a comment is submitted changes.
   ---------------------------------------------------------------------
   SCOPE
   Every selector starts inside #comments or .comment-form. Nothing here
   can reach the sign-in form, the activation form, the material filters
   or any other form on the site.
   ===================================================================== */

#comments {
	width: min(100% - 40px, 860px);
	margin-inline: auto;
}

#comments .comments-title,
#comments .comment-reply-title {
	margin: 0 0 8px;
	font-size: clamp(1.3rem, 3vw, 1.8rem);
	line-height: 1.25;
	letter-spacing: -0.025em;
	color: var(--text, #eef0ff);
}

/* WordPress puts "Cancel reply" inside the heading. It is a link, not a
   heading, and it should not inherit the heading's size. */
#comments .comment-reply-title small {
	display: block;
	margin-top: 6px;
	font-size: 0.86rem;
	font-weight: 400;
}

#comments .comment-reply-title small a { color: var(--neon-cyan, #52e2fb); }

/* ---------- the form panel ---------- */
.comment-respond {
	margin-top: 34px;
	padding: clamp(22px, 3.4vw, 36px);
	border-radius: clamp(16px, 2vw, 24px);
	border: 1px solid rgba(137, 101, 255, 0.3);
	background: linear-gradient(165deg, rgba(23, 19, 58, 0.72), rgba(11, 9, 32, 0.88));
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow:
		0 30px 70px -40px rgba(0, 0, 0, 0.95),
		inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.comment-form .comment-notes,
.comment-form .logged-in-as {
	margin: 0 0 22px;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--text-dim, #9096c2);
}

.comment-form .logged-in-as a { color: var(--neon-cyan, #52e2fb); }

/* One column, always. The default theme puts author, email and url side by
   side, which is where the label/field misalignment on a phone came from. */
.comment-form p {
	margin: 0 0 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.comment-form label {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--text-soft, #c3c7e8);
}

/* The required star should not shout. */
.comment-form .required { color: #ff9a9a; }

/* ---------- fields ---------- */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	min-height: 52px;
	padding: 13px 16px;
	border-radius: 15px;
	font: inherit;
	font-size: 0.98rem;
	color: var(--text, #eef0ff);
	border: 1px solid rgba(137, 101, 255, 0.42);
	background: rgba(15, 12, 42, 0.85);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.comment-form textarea {
	min-height: 168px;
	line-height: 1.7;
	/* Only vertically: a horizontal drag would break the panel. */
	resize: vertical;
}

.comment-form ::placeholder {
	color: var(--text-dim, #9096c2);
	opacity: 1;
}

.comment-form input:hover,
.comment-form textarea:hover { border-color: rgba(160, 130, 255, 0.7); }

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--neon-cyan, #52e2fb);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.05),
		0 0 0 3px rgba(82, 226, 251, 0.16);
}

.comment-form input:focus-visible,
.comment-form textarea:focus-visible {
	outline: 2px solid var(--neon-cyan, #52e2fb);
	outline-offset: 2px;
}

/* Chrome paints an autofilled field solid yellow and ignores background.
   The inset shadow is the one property it honours. */
.comment-form input:-webkit-autofill,
.comment-form input:-webkit-autofill:hover,
.comment-form input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--text, #eef0ff);
	caret-color: var(--text, #eef0ff);
	-webkit-box-shadow: 0 0 0 1000px #14103a inset;
	box-shadow: 0 0 0 1000px #14103a inset;
	transition: background-color 100000s ease-in-out 0s;
}

/* ---------- the remember-me row ---------- */
.comment-form .comment-form-cookies-consent {
	flex-direction: row;
	align-items: flex-start;
	gap: 11px;
	margin-bottom: 24px;
}

.comment-form .comment-form-cookies-consent input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: #7c5cff;
	cursor: pointer;
}

.comment-form .comment-form-cookies-consent label {
	font-weight: 400;
	font-size: 0.88rem;
	line-height: 1.55;
	color: var(--text-dim, #9096c2);
	cursor: pointer;
}

/* ---------- submit ---------- */
.comment-form .form-submit { margin-bottom: 0; }

.comment-form input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 34px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-size: 0.96rem;
	font-weight: 700;
	cursor: pointer;
	color: #fff;
	background: var(--grad-brand, linear-gradient(120deg, #4d7cff, #b46bff));
	box-shadow: 0 16px 40px -18px rgba(120, 90, 255, 0.9);
	transition: transform 0.3s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
		box-shadow 0.3s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

@media (hover: hover) and (pointer: fine) {

	.comment-form input[type="submit"]:hover {
		transform: translateY(-2px);
		box-shadow: 0 22px 50px -18px rgba(120, 90, 255, 1);
	}
}

.comment-form input[type="submit"]:focus-visible {
	outline: 2px solid var(--neon-cyan, #52e2fb);
	outline-offset: 3px;
}

/* ---------- existing comments ---------- */
#comments .comment-list { margin: 0 0 10px; }

#comments .comment-list .comment-body {
	margin-bottom: 16px;
	padding: clamp(16px, 2.4vw, 24px);
	border-radius: 18px;
	border: 1px solid var(--glass-brd, rgba(255, 255, 255, 0.1));
	background: rgba(15, 12, 42, 0.6);
}

#comments .comment-author { font-weight: 700; color: var(--text, #eef0ff); }
#comments .comment-author .says { display: none; }

#comments .comment-metadata,
#comments .comment-metadata a {
	font-size: 0.82rem;
	color: var(--text-dim, #9096c2);
}

#comments .comment-content { line-height: 1.75; color: var(--text-soft, #c3c7e8); }

#comments .reply a {
	display: inline-block;
	margin-top: 6px;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--neon-cyan, #52e2fb);
	text-decoration: none;
}

#comments .avatar {
	border-radius: 50%;
	margin-right: 12px;
	vertical-align: middle;
}

/* ---------- phones ---------- */
@media (max-width: 620px) {

	#comments { width: calc(100% - 32px); }

	.comment-respond { padding: 20px 16px; }

	/* Full width, so a thumb does not have to find a small target. */
	.comment-form input[type="submit"] { width: 100%; }

	#comments .comment-list .comment-body { padding: 16px 14px; }

	/* WordPress nests replies with a large left padding that leaves almost
	   no room for the text on a narrow screen. */
	#comments .comment-list .children {
		margin-left: 0;
		padding-left: 12px;
		border-left: 1px solid rgba(137, 101, 255, 0.28);
	}
}

@media (prefers-reduced-motion: reduce) {

	.comment-form input,
	.comment-form textarea,
	.comment-form input[type="submit"] { transition: none; }

	.comment-form input[type="submit"]:hover { transform: none; }
}
