/* HNC Community — forms, profiles, member lists.
   Consumes the theme's tokens; falls back sanely under any other theme. */

.hnc-authbox {
	max-width: 480px;
	margin: 0 auto 40px;
}
.hnc-authbox--wide { max-width: 700px; }

.hnc-authbox__title { margin-bottom: 8px; }
.hnc-authbox__lede {
	color: var(--hnc-muted, #6b6b6b);
	font-size: 14.5px;
	margin-bottom: 20px;
}
.hnc-authbox__alt {
	font-size: 14px;
	color: var(--hnc-muted, #6b6b6b);
	margin-top: 14px;
}
.hnc-authbox__alt a { font-weight: 700; text-decoration: underline; }

/* ---------- forms ---------- */

.hnc-form .hnc-field,
#hnc-loginform p { margin: 0 0 16px; }

.hnc-field label,
#hnc-loginform label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 5px;
}

.hnc-field input[type="text"],
.hnc-field input[type="email"],
.hnc-field input[type="url"],
.hnc-field input[type="password"],
.hnc-field textarea,
.hnc-field select,
#hnc-loginform input[type="text"],
#hnc-loginform input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--hnc-line, #e4e4e4);
	border-radius: var(--hnc-radius, 4px);
	font: inherit;
	font-size: 15px;
	background: var(--hnc-base, #fff);
	color: var(--hnc-ink, #0a0a0a);
}
.hnc-field textarea { resize: vertical; min-height: 140px; }

.hnc-field__help {
	display: block;
	font-size: 12.5px;
	color: var(--hnc-muted, #6b6b6b);
	margin-top: 4px;
	font-weight: 400;
}

.hnc-field--check label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 13.5px;
}
.hnc-field--check input { margin-top: 3px; }

#hnc-loginform .login-remember label {
	display: flex;
	align-items: center;
	gap: 7px;
	font-weight: 400;
}
#hnc-loginform .login-submit input[type="submit"],
#hnc-loginform #wp-submit {
	width: 100%;
	background: var(--hnc-ink, #0a0a0a);
	color: var(--hnc-base, #fff);
	border: 0;
	border-radius: var(--hnc-radius, 4px);
	padding: 12px 18px;
	font-size: 13.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
	cursor: pointer;
}

/* Honeypot — off-screen, not display:none (bots skip hidden fields). */
.hnc-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- notices ---------- */

.hnc-notice {
	padding: 11px 14px;
	border-radius: var(--hnc-radius, 4px);
	font-size: 14px;
	background: var(--hnc-surface, #f4f4f4);
	border-left: 3px solid var(--hnc-muted, #6b6b6b);
	margin-bottom: 18px;
}
.hnc-notice--error { border-left-color: #d63638; background: #fdf0f0; color: #8a1f21; }
.hnc-notice--ok { border-left-color: #1a7f37; background: #eef8f1; color: #14622b; }

.hnc-vote__error {
	font-size: 12px;
	color: #d63638;
	margin-left: 8px;
}

/* ---------- profile ---------- */

.hnc-profile__head {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	padding-bottom: 24px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--hnc-line, #e4e4e4);
	flex-wrap: wrap;
}
.hnc-profile__avatar { border-radius: 50%; }
.hnc-profile__id { min-width: 0; flex: 1; }
.hnc-profile__name { margin-bottom: 6px; }

.hnc-profile__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 13.5px;
	color: var(--hnc-muted, #6b6b6b);
	margin-bottom: 8px;
}
.hnc-profile__karma { font-weight: 700; color: var(--hnc-accent, #ff4500); }
.hnc-profile__level {
	background: var(--hnc-surface, #f4f4f4);
	padding: 2px 9px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--hnc-ink, #0a0a0a);
}
.hnc-profile__reddit a { color: var(--hnc-accent, #ff4500); font-weight: 700; font-size: 14px; }
.hnc-profile__bio { font-size: 14.5px; margin-top: 8px; max-width: 62ch; }
.hnc-profile__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- member directory ---------- */

.hnc-members { list-style: none; margin: 0; padding: 0; }
.hnc-members__row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid var(--hnc-line, #e4e4e4);
	font-size: 14px;
}
.hnc-members__row > a { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hnc-members__avatar { border-radius: 50%; }
.hnc-members__name { font-weight: 700; }
.hnc-members__karma {
	margin-left: auto;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--hnc-accent, #ff4500);
}

/* ---------- profile card widget ---------- */

.hnc-profilecard {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	background: var(--hnc-surface, #f4f4f4);
	border-radius: var(--hnc-radius, 4px);
}
.hnc-profilecard--guest { display: block; text-align: center; }
.hnc-profilecard--guest p { font-size: 14px; margin-bottom: 12px; }
.hnc-profilecard__avatar { border-radius: 50%; }
.hnc-profilecard__name { display: block; font-weight: 700; font-size: 14.5px; }
.hnc-profilecard__karma { font-size: 12.5px; color: var(--hnc-muted, #6b6b6b); }

/* ---------- reply sort bar ---------- */

.hnc-comments__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
}

.hnc-sortbar {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12.5px;
}
.hnc-sortbar__label {
	color: var(--hnc-muted, #6b6b6b);
	margin-right: 2px;
}
.hnc-sortbar__opt {
	padding: 4px 9px;
	border-radius: 999px;
	font-weight: 700;
	color: var(--hnc-muted, #6b6b6b);
	line-height: 1.4;
}
.hnc-sortbar__opt:hover { background: var(--hnc-surface, #f4f4f4); }
.hnc-sortbar__opt.is-active {
	background: var(--hnc-ink, #0a0a0a);
	color: var(--hnc-base, #fff);
}

/* ---------- responsive ---------- */

@media (max-width: 600px) {
	.hnc-authbox { margin-bottom: 28px; }

	/* Avatar and identity stack rather than squeezing the name to two words. */
	.hnc-profile__head { gap: 16px; }
	.hnc-profile__avatar { width: 64px; height: 64px; }
	.hnc-profile__stats { gap: 8px 12px; font-size: 13px; }
	.hnc-profile__actions > * { flex: 1 1 auto; text-align: center; }

	.hnc-members__row { flex-wrap: wrap; }
	.hnc-members__karma { margin-left: auto; }
}

/* iOS zooms on focus below 16px. */
@media (max-width: 860px) {
	.hnc-field input[type="text"],
	.hnc-field input[type="email"],
	.hnc-field input[type="url"],
	.hnc-field input[type="password"],
	.hnc-field textarea,
	.hnc-field select,
	#hnc-loginform input[type="text"],
	#hnc-loginform input[type="password"] { font-size: 16px; }
}

@media (hover: none) and (pointer: coarse) {
	.hnc-field input[type="text"],
	.hnc-field input[type="email"],
	.hnc-field input[type="url"],
	.hnc-field input[type="password"],
	.hnc-field select,
	#hnc-loginform input[type="text"],
	#hnc-loginform input[type="password"] { min-height: 44px; }

	#hnc-loginform .login-submit input[type="submit"],
	#hnc-loginform #wp-submit { min-height: 44px; }

	.hnc-field--check label { padding: 4px 0; }
	.hnc-field--check input { width: 20px; height: 20px; }

	.hnc-members__row > a { padding: 4px 0; }
	.hnc-authbox__alt a { display: inline-block; padding: 4px 0; }
	.hnc-profile__reddit a { display: inline-block; padding: 4px 0; }
}
