/*
 * FKPF Discussion — presentation layer.
 *
 * Mirrors the site's own design language (dark "assembler" variation):
 *   body background: theme-2   (#201d18 — the page is already this)
 *   ink / text:      theme-4   (#e8e1d3 cream)
 *   muted text:      theme-5   (#b0a692)
 *   separators:      theme-3   (#262219)
 *   accent / links:  theme-1   (#d29a83 terracotta)
 *
 * The plugin inherits the theme's font-family (Cambon) and the body's
 * dark background; nothing here sets a font-family or a page
 * background. The eyebrow + H1 + lead + divider scaffold at the top
 * of the Discussion page lives in the page content itself (matching
 * News / Contact / FAQ), so this file only styles the board the
 * shortcode emits and the reply form a single topic renders.
 *
 * Tokens come from --wp--preset--color--theme-* so the board tracks
 * the active variation automatically (light, dark, custom).
 */

.fkpf-discussion {
	color: var(--wp--preset--color--theme-4);
	font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.446), 1rem);
	line-height: 1.85;
	max-width: 800px;
}
.fkpf-discussion * {
	box-sizing: border-box;
}
.fkpf-discussion a {
	color: var(--wp--preset--color--theme-1);
	text-decoration: none;
}
.fkpf-discussion a:hover {
	text-decoration: underline;
}

/* Toolbar: count on the left, "Start a new topic" anchor on the right.
   Same muted/uppercase treatment as the News category eyebrows. */
.fkpf-discussion-toolbar {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 1.5rem;
}
.fkpf-discussion-count {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wp--preset--color--theme-5);
}
.fkpf-discussion-new-link {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
}
.fkpf-discussion-new-link:hover {
	text-decoration: underline;
}

/* Topic list — a plain <ul>, each row a flex with a top divider, the
   same card-divider pattern the News listing uses. */
.fkpf-topic-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.fkpf-topic-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 1.25rem;
	padding: 24px 0 0;
	border-top: 1px solid var(--wp--preset--color--theme-3);
}
.fkpf-topic-row:last-child {
	border-bottom: 1px solid var(--wp--preset--color--theme-3);
}
.fkpf-topic-title {
	flex: 1 1 auto;
	min-width: 60%;
	/* Matches the News post-title: medium clamp, weight 500. */
	font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.982), 1.15rem);
	font-weight: 500;
	font-style: normal;
	line-height: 1.5;
	margin: 0;
}
.fkpf-topic-title:hover {
	text-decoration: underline;
}
.fkpf-topic-meta {
	flex: 1 0 100%;
	margin: 8px 0 0;
	font-size: clamp(0.75rem, 0.75rem + ((1vw - 0.2rem) * 0.179), 0.85rem);
	font-style: normal;
	font-weight: 400;
	color: var(--wp--preset--color--theme-5);
}
.fkpf-topic-meta a {
	color: var(--wp--preset--color--theme-5);
}
.fkpf-topic-meta a:hover {
	color: var(--wp--preset--color--theme-1);
}

.fkpf-discussion-empty {
	margin: 2rem 0;
	font-style: italic;
	color: var(--wp--preset--color--theme-5);
}

/* Pager — same restrained text-only treatment as the archive pager. */
.fkpf-discussion-pager {
	margin: 1.5rem 0 0;
	font-size: 0.85rem;
}
.fkpf-discussion-pager .page-numbers {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	margin: 0 0.1rem;
	text-decoration: none;
	color: var(--wp--preset--color--theme-4);
}
.fkpf-discussion-pager .page-numbers:hover {
	text-decoration: underline;
}
.fkpf-discussion-pager .current {
	font-weight: 600;
	color: var(--wp--preset--color--theme-1);
}

/* Error notice — bordered box, same restraint as the site's notice
   blocks (no background fill, just a theme-3 rule). */
.fkpf-discussion-error {
	border: 1px solid var(--wp--preset--color--theme-3);
	padding: 0.75rem 1rem;
	margin: 0 0 1.5rem;
}
.fkpf-discussion-error p {
	margin: 0;
	font-style: italic;
	color: var(--wp--preset--color--theme-5);
}

/* Login prompt for anonymous visitors — same vibe as the empty-state
   paragraph: muted, italic lead, with the two buttons below. */
.fkpf-new-topic-login {
	margin: 2rem 0 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--wp--preset--color--theme-3);
}
.fkpf-new-topic-login p {
	margin: 0 0 0.5rem;
	color: var(--wp--preset--color--theme-4);
}
.fkpf-new-topic-login p:first-child {
	font-style: italic;
	color: var(--wp--preset--color--theme-5);
}
.fkpf-new-topic-login-links {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

/* New-topic form — sits below a divider like every other content
   section on the site, not in a boxed card (the site uses no card
   fills anywhere). Inputs match the site's own field treatment:
   transparent over the page background, theme-3 hairline, no radius. */
.fkpf-new-topic-form {
	margin: 2rem 0 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--wp--preset--color--theme-3);
}
.fkpf-new-topic-heading {
	margin: 0 0 0.5rem;
	font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.982), 1.15rem);
	font-weight: 500;
	font-style: normal;
	color: var(--wp--preset--color--theme-4);
}
.fkpf-new-topic-author {
	margin: 0 0 1rem;
	font-size: 0.85rem;
	font-style: italic;
	color: var(--wp--preset--color--theme-5);
}
.fkpf-field {
	margin: 0 0 1rem;
}
.fkpf-field label {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wp--preset--color--theme-5);
	margin-bottom: 0.4rem;
}
.fkpf-field input[type="text"],
.fkpf-field input[type="email"],
.fkpf-field input[type="password"],
.fkpf-field textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1rem;
	line-height: 1.55;
	padding: 0.55rem 0.7rem;
	/* !important: the theme's own base styles.css targets bare
	   `input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=range])`
	   — four :not([attr]) clauses each count as an attribute selector,
	   so that rule outranks a plain `.fkpf-field input[type="..."]`
	   on specificity alone and would otherwise win with its rounded,
	   filled default chrome. */
	border: 1px solid var(--wp--preset--color--theme-3) !important;
	border-radius: 0 !important;
	background-color: transparent !important;
	color: var(--wp--preset--color--theme-4) !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
}
.fkpf-field input[type="text"]:focus,
.fkpf-field input[type="email"]:focus,
.fkpf-field input[type="password"]:focus,
.fkpf-field textarea:focus {
	outline: 2px solid var(--wp--preset--color--theme-1);
	outline-offset: 1px;
}
.fkpf-field textarea {
	resize: vertical;
	min-height: 7rem;
}
.fkpf-field-submit {
	margin-top: 0.5rem;
}

/* Buttons — match the site's .wp-element-button exactly: solid
   theme-4 fill / theme-1 text, no radius, hover darkens to a theme-5
   mix. The outline variant (Register) inverts on hover. */
.fkpf-btn {
	display: inline-block;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.4;
	background-color: var(--wp--preset--color--theme-4);
	color: var(--wp--preset--color--theme-1);
	border: 0;
	border-radius: 0;
	padding: 0.55rem 1.4rem;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.fkpf-btn:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-5) 85%, #000);
	text-decoration: none;
}
.fkpf-btn-outline {
	background-color: transparent;
	color: var(--wp--preset--color--theme-4);
	border: 1px solid var(--wp--preset--color--theme-4);
}
.fkpf-btn-outline:hover {
	background-color: var(--wp--preset--color--theme-4);
	color: var(--wp--preset--color--theme-1);
}

/* Honeypot — off-screen, never display:none (inconsistent with screen
   readers), never seen by a human. */
.fkpf-honeypot {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ----------------------------------------------------------------
 * Profile page — [fkpf_profile]. Reuses the toolbar/field/topic-row
 * treatments above; only the identity block and section spacing are
 * new here.
 * ---------------------------------------------------------------- */

.fkpf-profile-identity {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1.5rem;
}
.fkpf-profile-identity img {
	display: block;
	border-radius: 100px;
}
.fkpf-profile-name {
	margin: 0;
	font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.982), 1.15rem);
	font-weight: 500;
	font-style: normal;
	color: var(--wp--preset--color--theme-4);
}
.fkpf-profile-meta {
	margin: 4px 0 0;
	font-size: 0.85rem;
	color: var(--wp--preset--color--theme-5);
}
.fkpf-profile-form,
.fkpf-profile-topics {
	margin: 2rem 0 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--wp--preset--color--theme-3);
}
.fkpf-profile-form-hint {
	margin: -0.5rem 0 1rem;
	font-size: 0.8rem;
	font-style: italic;
	color: var(--wp--preset--color--theme-5);
}

/* Single-topic lead at the very top of the body. */
.fkpf-back-link {
	margin: 0 0 1.5rem;
	font-size: clamp(0.75rem, 0.75rem + ((1vw - 0.2rem) * 0.179), 0.85rem);
	font-style: normal;
}
.fkpf-back-link a {
	color: var(--wp--preset--color--theme-1);
	text-decoration: none;
}
.fkpf-back-link a:hover {
	text-decoration: underline;
}

/* ----------------------------------------------------------------
 * Single-topic reply form (WordPress comment form on a fkpf_topic).
 *
 * The active (block) theme doesn't ship styles for the comment form's
 * native <input>/<textarea>/<button>, so without this the reply form
 * would render with the browser default chrome (white fields, rounded
 * corners) and break the dark palette. Scoped to .comment-form and
 * #respond inside a single fkpf_topic — ordinary blog post comment
 * forms (if any) are never published on this site, so the scoping
 * stays narrow and intentional.
 * ---------------------------------------------------------------- */

body.single-fkpf_topic #respond {
	color: var(--wp--preset--color--theme-4);
}
body.single-fkpf_topic #respond .comment-reply-title,
body.single-fkpf_topic #respond h3 {
	font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.982), 1.15rem);
	font-weight: 500;
	font-style: normal;
	color: var(--wp--preset--color--theme-4);
	margin: 0 0 1rem;
}
body.single-fkpf_topic #respond .comment-notes,
body.single-fkpf_topic #respond .logged-in-as {
	font-size: 0.8rem;
	font-style: italic;
	color: var(--wp--preset--color--theme-5);
	margin: 0 0 1rem;
}
body.single-fkpf_topic #respond .comment-notes .required,
body.single-fkpf_topic #respond .comment-form-author label .required,
body.single-fkpf_topic #respond .comment-form-email label .required,
body.single-fkpf_topic #respond .comment-form-comment label .required {
	color: var(--wp--preset--color--theme-1);
}
body.single-fkpf_topic #respond .comment-form p {
	margin: 0 0 1rem;
}
body.single-fkpf_topic #respond label {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wp--preset--color--theme-5);
	margin-bottom: 0.4rem;
}
body.single-fkpf_topic #respond input[type="text"],
body.single-fkpf_topic #respond input[type="email"],
body.single-fkpf_topic #respond input[type="url"],
body.single-fkpf_topic #respond textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1rem;
	line-height: 1.55;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--wp--preset--color--theme-3);
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--theme-4);
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
body.single-fkpf_topic #respond input[type="text"]:focus,
body.single-fkpf_topic #respond input[type="email"]:focus,
body.single-fkpf_topic #respond input[type="url"]:focus,
body.single-fkpf_topic #respond textarea:focus {
	outline: 2px solid var(--wp--preset--color--theme-1);
	outline-offset: 1px;
}
body.single-fkpf_topic #respond textarea {
	resize: vertical;
	min-height: 7rem;
}
body.single-fkpf_topic #respond .comment-form-cookies-consent {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.8rem;
	color: var(--wp--preset--color--theme-5);
}
body.single-fkpf_topic #respond .comment-form-cookies-consent label {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
	font-size: 0.8rem;
	color: var(--wp--preset--color--theme-5);
}
body.single-fkpf_topic #respond .submit,
body.single-fkpf_topic #respond input[type="submit"] {
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.4;
	background-color: var(--wp--preset--color--theme-4);
	color: var(--wp--preset--color--theme-1);
	border: 0;
	border-radius: 0;
	padding: 0.55rem 1.4rem;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.15s ease;
}
body.single-fkpf_topic #respond .submit:hover,
body.single-fkpf_topic #respond input[type="submit"]:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-5) 85%, #000);
}

/* Single-topic comment list (replies) — the block theme lays each
   reply out as wp-block-columns; we only nudge the meta text color so
   author/date sit in theme-5 and content in theme-4, matching how the
   News post meta reads. */
body.single-fkpf_topic .wp-block-comments {
	color: var(--wp--preset--color--theme-4);
}
body.single-fkpf_topic .wp-block-comments-title {
	font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.982), 1.15rem);
	font-weight: 500;
	color: var(--wp--preset--color--theme-4);
}
body.single-fkpf_topic .wp-block-comment-author-name,
body.single-fkpf_topic .wp-block-comment-date {
	color: var(--wp--preset--color--theme-5);
}
body.single-fkpf_topic .wp-block-comment-author-name a,
body.single-fkpf_topic .wp-block-comment-date a {
	color: var(--wp--preset--color--theme-5);
}
body.single-fkpf_topic .wp-block-comment-author-name a:hover,
body.single-fkpf_topic .wp-block-comment-date a:hover,
body.single-fkpf_topic .wp-block-comment-reply-link a:hover {
	color: var(--wp--preset--color--theme-1);
}
body.single-fkpf_topic .wp-block-comment-reply-link a {
	color: var(--wp--preset--color--theme-5);
	text-decoration: none;
}
body.single-fkpf_topic .wp-block-comments .comment-content {
	color: var(--wp--preset--color--theme-4);
	font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.446), 1rem);
	line-height: 1.85;
}