/**
 * Public forum styles.
 */

.prf-forum {
	--prf-brand: var(--pr-green, #12a15b);
	--prf-brand-dark: var(--pr-green-dark, #0a6b3d);
	--prf-brand-deep: var(--pr-green-deep, #053a22);
	--prf-ink: var(--pr-ink, #101613);
	--prf-body: var(--pr-body, #33413a);
	--prf-muted: var(--pr-muted, #5f6f66);
	--prf-line: var(--pr-line, #dfe7e2);
	--prf-soft: var(--pr-cream, #f4f8f5);
	--prf-white: var(--pr-white, #fff);
	--prf-danger: var(--pr-danger, #b42318);
	--prf-radius: var(--pr-radius-sm, 14px);
	--prf-shadow: var(--pr-shadow-sm, 0 18px 44px rgba(7, 11, 9, 0.08));
	color: var(--prf-body);
	font-family: var(--pr-font, "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif);
	line-height: 1.6;
	transition: opacity 0.15s ease;
}

.prf-forum *,
.prf-forum *::before,
.prf-forum *::after {
	box-sizing: border-box;
}

.prf-forum a {
	color: inherit;
	text-decoration: none;
}

/* Fetch navigation */
.prf-forum.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.prf-forum.prf-enter {
	animation: prf-fade-in 0.26s ease both;
}

@keyframes prf-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.prf-progress {
	background: linear-gradient(90deg, #1cc673, #12a15b);
	height: 3px;
	left: 0;
	opacity: 0;
	pointer-events: none;
	position: fixed;
	right: 0;
	top: 0;
	transform: scaleX(0);
	transform-origin: 0 50%;
	z-index: 9999;
}

body.admin-bar .prf-progress {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .prf-progress {
		top: 46px;
	}
}

.prf-progress.is-active {
	opacity: 1;
	transform: scaleX(0.8);
	transition: transform 2.4s cubic-bezier(0.16, 0.84, 0.44, 1), opacity 0.15s ease;
}

.prf-progress.is-done {
	opacity: 0;
	transform: scaleX(1);
	transition: transform 0.2s ease, opacity 0.28s ease 0.14s;
}

@media (prefers-reduced-motion: reduce) {
	.prf-forum.prf-enter {
		animation: none;
	}

	.prf-progress {
		display: none;
	}
}

.prf-forum h1,
.prf-forum h2,
.prf-forum h3 {
	color: var(--prf-ink);
	line-height: 1.2;
	margin: 0;
}

.prf-forum p {
	margin: 0;
}

.prf-eyebrow {
	color: var(--prf-brand-dark);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	margin: 0 0 10px;
	text-transform: uppercase;
}

/* Buttons */
.prf-btn {
	align-items: center;
	background: var(--prf-white);
	border: 1px solid var(--prf-line);
	border-radius: 999px;
	color: var(--prf-ink);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	gap: 8px;
	justify-content: center;
	line-height: 1.2;
	padding: 12px 22px;
	text-align: center;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.prf-btn:hover {
	border-color: var(--prf-brand);
	color: var(--prf-brand-dark);
	transform: translateY(-1px);
}

.prf-btn--primary {
	background: var(--prf-brand);
	border-color: var(--prf-brand);
	box-shadow: 0 12px 26px rgba(18, 161, 91, 0.28);
	color: #fff;
}

.prf-btn--primary:hover {
	background: var(--prf-brand-dark);
	border-color: var(--prf-brand-dark);
	color: #fff;
}

.prf-btn--ghost {
	background: transparent;
}

.prf-btn--danger {
	background: transparent;
	border-color: rgba(180, 35, 24, 0.35);
	color: var(--prf-danger);
}

.prf-btn--danger:hover {
	background: rgba(180, 35, 24, 0.08);
	border-color: var(--prf-danger);
	color: var(--prf-danger);
}

.prf-btn--sm {
	font-size: 0.82rem;
	padding: 8px 14px;
}

/* Notices */
.prf-notice {
	border-radius: 14px;
	font-weight: 500;
	margin: 18px 0;
	padding: 14px 18px;
}

.prf-notice--success {
	background: #e9f8f0;
	border: 1px solid #bfe9d1;
	color: #0a6b3d;
}

.prf-notice--error {
	background: #fef3f2;
	border: 1px solid #fecdca;
	color: #b42318;
}

.prf-notice--info {
	background: #eef6ff;
	border: 1px solid #c9e2ff;
	color: #1d4ed8;
}

/* Hero */
.prf-forum-hero {
	align-items: center;
	background:
		radial-gradient(circle at 88% 10%, rgba(28, 198, 115, 0.45), transparent 45%),
		linear-gradient(135deg, #053a22 0%, #0a6b3d 55%, #12a15b 100%);
	border-radius: 18px;
	color: #fff;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: space-between;
	margin-bottom: 12px;
	overflow: hidden;
	padding: 18px 22px;
	position: relative;
}

.prf-forum-hero::after {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	content: "";
	height: 200px;
	position: absolute;
	right: -50px;
	top: -90px;
	width: 200px;
}

.prf-forum-hero__copy {
	max-width: 620px;
	position: relative;
	z-index: 1;
}

.prf-forum-hero .prf-eyebrow {
	color: #b8f5d4;
	font-size: 0.66rem;
	margin-bottom: 4px;
}

.prf-forum-hero .prf-forum-hero__title {
	color: #fff;
	font-size: clamp(1.35rem, 2.6vw, 1.7rem);
	line-height: 1.15;
	margin-bottom: 4px;
}

.prf-forum-hero__lead {
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.86rem;
	line-height: 1.5;
	max-width: 560px;
}

.prf-forum-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	position: relative;
	z-index: 1;
}

.prf-forum-hero__actions .prf-btn {
	font-size: 0.88rem;
	padding: 10px 18px;
}

.prf-forum-hero__actions .prf-btn--primary {
	background: #fff;
	border-color: #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
	color: var(--prf-brand-deep);
}

.prf-forum-hero__actions .prf-btn--primary:hover {
	background: #eafff4;
	border-color: #eafff4;
	color: var(--prf-brand-deep);
}

.prf-forum-hero__actions .prf-btn--ghost {
	border-color: rgba(255, 255, 255, 0.4);
	color: #fff;
}

.prf-forum-hero__actions .prf-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

/* Toolbar */
.prf-forum-toolbar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	margin-bottom: 12px;
}

.prf-search {
	display: flex;
	flex: 1 1 280px;
	gap: 6px;
	max-width: 460px;
}

.prf-search input[type="search"] {
	background: #fff;
	border: 1px solid var(--prf-line);
	border-radius: 999px;
	flex: 1;
	font: inherit;
	font-size: 0.88rem;
	padding: 7px 14px;
}

.prf-search input[type="search"]:focus {
	border-color: var(--prf-brand);
	outline: 3px solid rgba(18, 161, 91, 0.15);
}

.prf-search .prf-btn {
	font-size: 0.86rem;
	padding: 8px 16px;
}

.prf-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.prf-chip {
	align-items: center;
	background: #fff;
	border: 1px solid var(--prf-line);
	border-radius: 999px;
	display: inline-flex;
	font-size: 0.76rem;
	font-weight: 600;
	gap: 5px;
	padding: 5px 10px;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.prf-chip:hover,
.prf-chip.is-active {
	background: var(--prf-brand);
	border-color: var(--prf-brand);
	color: #fff;
}

.prf-chip__count {
	background: rgba(7, 11, 9, 0.08);
	border-radius: 999px;
	font-size: 0.72rem;
	padding: 1px 7px;
}

.prf-chip.is-active .prf-chip__count,
.prf-chip:hover .prf-chip__count {
	background: rgba(255, 255, 255, 0.22);
}

.prf-forum-category-desc {
	color: var(--prf-muted);
	font-size: 0.9rem;
	margin-bottom: 14px;
}

/* Layout */
.prf-forum-layout {
	align-items: start;
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(0, 1fr) 268px;
}

.prf-forum-main {
	min-width: 0;
}

/* Thread cards */
.prf-thread-list {
	display: grid;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.prf-thread-card {
	background: #fff;
	border: 1px solid var(--prf-line);
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(7, 11, 9, 0.05);
	overflow: hidden;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.prf-thread-card:hover {
	border-color: rgba(18, 161, 91, 0.45);
	box-shadow: 0 12px 30px rgba(7, 11, 9, 0.09);
	transform: translateY(-2px);
}

.prf-thread-card__main {
	display: block;
	padding: 12px 14px;
}

.prf-thread-card__meta {
	align-items: center;
	color: var(--prf-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.72rem;
	gap: 7px;
	margin-bottom: 4px;
}

.prf-thread-card__cat {
	background: #e9f8f0;
	background: color-mix(in srgb, var(--prf-cat, #12a15b) 12%, #fff);
	border-radius: 999px;
	color: var(--prf-cat, #12a15b);
	font-size: 0.68rem;
	font-weight: 700;
	padding: 2px 8px;
}

.prf-thread-card__title {
	font-size: 1rem;
	line-height: 1.3;
	margin-bottom: 3px;
}

.prf-thread-card__excerpt {
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--prf-muted);
	display: -webkit-box;
	font-size: 0.84rem;
	line-height: 1.45;
	margin-bottom: 7px;
	overflow: hidden;
}

.prf-thread-card__foot {
	align-items: center;
	color: var(--prf-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.74rem;
	gap: 6px;
}

.prf-badge {
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 3px 10px;
	text-transform: uppercase;
}

.prf-badge--pending {
	background: #fff4e5;
	color: #b45309;
}

.prf-badge--pinned {
	background: #e9f8f0;
	color: #0a6b3d;
}

.prf-badge--closed {
	background: #eef2f0;
	color: #5f6f66;
}

.prf-avatar {
	align-items: center;
	background: var(--prf-soft);
	border-radius: 50%;
	color: var(--prf-brand-dark);
	display: inline-flex;
	font-size: 0.68rem;
	font-weight: 700;
	height: 22px;
	justify-content: center;
	width: 22px;
}

.prf-dot {
	opacity: 0.6;
}

/* Empty state */
.prf-empty {
	background: #fff;
	border: 1px dashed var(--prf-line);
	border-radius: 14px;
	padding: 32px 24px;
	text-align: center;
}

.prf-empty h2 {
	font-size: 1.12rem;
	margin-bottom: 6px;
}

.prf-empty p {
	color: var(--prf-muted);
	font-size: 0.92rem;
	margin-bottom: 16px;
}

/* Sidebar */
.prf-forum-side {
	display: grid;
	gap: 12px;
}

@media (min-width: 981px) {
	.prf-forum-side {
		position: sticky;
		top: calc(var(--pr-header-height, 84px) + 18px);
	}
}

.prf-panel {
	background: #fff;
	border: 1px solid var(--prf-line);
	border-radius: 12px;
	padding: 16px;
}

.prf-panel h3 {
	font-size: 0.92rem;
	margin-bottom: 6px;
}

.prf-panel p {
	color: var(--prf-muted);
	font-size: 0.82rem;
	line-height: 1.5;
}

.prf-panel--cta {
	background: linear-gradient(160deg, #e9f8f0, #ffffff);
	border-color: #bfe9d1;
}

.prf-panel--cta h1 {
	font-size: clamp(1.3rem, 2.6vw, 1.65rem);
	margin-bottom: 8px;
}

.prf-panel--cta .prf-btn {
	margin-top: 10px;
}

.prf-rules {
	color: var(--prf-muted);
	font-size: 0.84rem;
	margin: 10px 0 0;
	padding-left: 18px;
}

.prf-rules li + li {
	margin-top: 5px;
}

/* Pagination */
.prf-pagination {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	margin-top: 18px;
}

.prf-pagination span {
	color: var(--prf-muted);
	font-size: 0.85rem;
}

/* Breadcrumb */
.prf-breadcrumb {
	margin-bottom: 18px;
}

.prf-breadcrumb a {
	color: var(--prf-brand-dark);
	font-size: 0.88rem;
	font-weight: 600;
}

/* Thread detail */
.prf-post {
	background: #fff;
	border: 1px solid var(--prf-line);
	border-radius: 18px;
	box-shadow: 0 10px 30px rgba(7, 11, 9, 0.06);
	padding: 24px;
}

.prf-post__meta {
	align-items: center;
	color: var(--prf-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.78rem;
	gap: 8px;
	margin-bottom: 10px;
}

.prf-post__title {
	font-size: clamp(1.3rem, 2.6vw, 1.7rem);
	margin-bottom: 10px;
}

.prf-post__author {
	align-items: center;
	color: var(--prf-muted);
	display: flex;
	font-size: 0.82rem;
	gap: 8px;
}

.prf-post__body {
	border-top: 1px solid var(--prf-line);
	font-size: 0.96rem;
	margin-top: 16px;
	padding-top: 18px;
	white-space: normal;
	word-wrap: break-word;
}

.prf-post__foot {
	align-items: center;
	border-top: 1px solid var(--prf-line);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
	padding-top: 14px;
}

.prf-post__foot form {
	margin: 0;
}

/* Replies */
.prf-replies {
	margin-top: 22px;
}

.prf-replies__head {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 12px;
}

.prf-replies__head h2 {
	font-size: 1.05rem;
}

.prf-reply-list {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.prf-reply {
	background: #fff;
	border: 1px solid var(--prf-line);
	border-radius: var(--prf-radius);
	padding: 16px 18px;
}

.prf-reply.is-pending {
	border-style: dashed;
	opacity: 0.9;
}

.prf-reply__head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.prf-reply__head strong {
	color: var(--prf-ink);
	font-size: 0.92rem;
}

.prf-reply__time {
	color: var(--prf-muted);
	display: block;
	font-size: 0.78rem;
}

.prf-reply__body {
	font-size: 0.95rem;
	word-wrap: break-word;
}

.prf-reply__actions {
	align-items: center;
	border-top: 1px solid var(--prf-line);
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 12px;
	padding-top: 10px;
}

.prf-reply__actions form {
	margin: 0;
}

.prf-link-btn {
	background: none;
	border: 0;
	color: var(--prf-muted);
	cursor: pointer;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0;
}

.prf-link-btn:hover {
	color: var(--prf-brand-dark);
}

/* Forms */
.prf-reply-form {
	background: #fff;
	border: 1px solid var(--prf-line);
	border-radius: var(--prf-radius);
	margin-top: 18px;
	padding: 18px;
}

.prf-reply-form > label {
	color: var(--prf-ink);
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 10px;
}

.prf-reply-form textarea,
.prf-field textarea,
.prf-field input,
.prf-field select,
.prf-report__form textarea,
.prf-report__form select {
	background: #fff;
	border: 1px solid var(--prf-line);
	border-radius: 12px;
	font: inherit;
	padding: 12px 14px;
	width: 100%;
}

.prf-reply-form textarea:focus,
.prf-field textarea:focus,
.prf-field input:focus,
.prf-field select:focus,
.prf-report__form textarea:focus,
.prf-report__form select:focus {
	border-color: var(--prf-brand);
	outline: 3px solid rgba(18, 161, 91, 0.14);
}

.prf-reply-form__foot,
.prf-form__foot {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	margin-top: 12px;
}

.prf-counter {
	color: var(--prf-muted);
	font-size: 0.78rem;
}

.prf-form-card {
	background: #fff;
	border: 1px solid var(--prf-line);
	border-radius: 18px;
	box-shadow: 0 10px 30px rgba(7, 11, 9, 0.06);
	padding: 24px;
}

.prf-form-card__head {
	margin-bottom: 18px;
}

.prf-form-card__head h1 {
	font-size: clamp(1.3rem, 2.6vw, 1.65rem);
	margin-bottom: 6px;
}

.prf-form-card__head p {
	color: var(--prf-muted);
}

.prf-form {
	display: grid;
	gap: 16px;
}

.prf-field {
	display: grid;
	gap: 7px;
}

.prf-field > span {
	color: var(--prf-ink);
	font-size: 0.86rem;
	font-weight: 600;
}

.prf-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.prf-form__hint {
	color: var(--prf-muted);
	font-size: 0.8rem;
}

/* Report */
.prf-report {
	margin: 0;
}

.prf-report > summary {
	list-style: none;
}

.prf-report > summary::-webkit-details-marker {
	display: none;
}

.prf-report__form {
	background: var(--prf-soft);
	border: 1px solid var(--prf-line);
	border-radius: 14px;
	display: grid;
	gap: 10px;
	margin-top: 10px;
	max-width: 420px;
	padding: 16px;
}

.prf-report__form label {
	display: grid;
	font-size: 0.8rem;
	gap: 5px;
}

/* Responsive */
@media (max-width: 980px) {
	.prf-forum-layout {
		grid-template-columns: 1fr;
	}

	.prf-forum-side {
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	}
}

@media (max-width: 640px) {
	.prf-forum-hero {
		padding: 20px;
	}

	.prf-chips {
		flex-wrap: nowrap;
		margin-inline: calc(var(--pr-gutter, 24px) * -1);
		overflow-x: auto;
		padding: 0 var(--pr-gutter, 24px) 2px;
		scrollbar-width: none;
	}

	.prf-chips::-webkit-scrollbar {
		display: none;
	}

	.prf-chip {
		flex: none;
	}

	.prf-forum-hero__actions {
		width: 100%;
	}

	.prf-forum-hero__actions .prf-btn {
		flex: 1 1 auto;
	}

	.prf-post,
	.prf-form-card {
		padding: 18px;
	}

	.prf-search {
		flex-basis: 100%;
		max-width: none;
	}

	.prf-pagination {
		justify-content: center;
	}
}

@media (max-width: 560px) {
	.prf-forum-layout {
		gap: 16px;
	}

	.prf-btn {
		font-size: 0.86rem;
		padding: 10px 18px;
	}

	.prf-forum-hero__title {
		font-size: 1.35rem;
	}

	.prf-forum-hero__lead {
		font-size: 0.86rem;
	}

	.prf-thread-card__main {
		padding: 14px;
	}

	.prf-thread-card__title {
		font-size: 1rem;
	}

	.prf-empty {
		padding: 26px 18px;
	}

	.prf-panel {
		padding: 16px;
	}

	.prf-post__title {
		font-size: 1.2rem;
	}
}
