/**
 * Forumax Extension — Ideas.
 * Front-end styles for the idea board (upvote button; archive/single/form/profile
 * styles are added incrementally).
 */

:root {
	--fmxext-idea-accent: #0e9384;
}

/* ---- Upvote button ---- */
.fmxext-idea-vote {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-width: 54px;
	padding: 0.45rem 0.5rem;
	border: 1px solid #d0d5dd;
	border-radius: 10px;
	background: #fff;
	color: #475467;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.fmxext-idea-vote:hover:not(:disabled) {
	border-color: var(--fmxext-idea-accent);
	color: var(--fmxext-idea-accent);
}

.fmxext-idea-vote.is-voted {
	border-color: var(--fmxext-idea-accent);
	background: rgba(14, 147, 132, 0.08);
	color: var(--fmxext-idea-accent);
}

.fmxext-idea-vote:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.fmxext-idea-vote-icon {
	display: inline-flex;
}

.fmxext-idea-vote-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* Voted: fill the arrow solid (matches the topic upvote button). */
.fmxext-idea-vote.is-voted .fmxext-idea-vote-icon svg {
	fill: currentColor;
}

.fmxext-idea-vote-count {
	font-size: 0.9rem;
	font-weight: 700;
}

/* ---- Idea board (archive) ---- */
.fmxext-ideas {
	--fmxext-idea-accent: #0e9384;
	box-sizing: border-box;
}

.fmxext-ideas *,
.fmxext-ideas *::before,
.fmxext-ideas *::after {
	box-sizing: border-box;
}

/* Controls: status filter pills + sort toggle */
.fmxext-ideas-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

.fmxext-ideas-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.fmxext-ideas-filter {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.85rem;
	border: 1px solid #e4e7ec;
	border-radius: 999px;
	background: #fff;
	color: #475467;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fmxext-ideas-filter:hover {
	border-color: #d0d5dd;
	color: #101828;
}

.fmxext-ideas-filter.is-active {
	background: rgba(14, 147, 132, 0.10);
	border-color: var(--fmxext-idea-accent);
	color: var(--fmxext-idea-accent);
}

.fmxext-ideas-sort {
	display: inline-flex;
	padding: 3px;
	border: 1px solid #e4e7ec;
	border-radius: 999px;
	background: #f2f4f7;
}

.fmxext-ideas-sort-opt {
	padding: 0.3rem 0.85rem;
	border-radius: 999px;
	color: #667085;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}

.fmxext-ideas-sort-opt.is-active {
	background: #fff;
	color: var(--fmxext-idea-accent);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

/* List + cards */
.fmxext-ideas-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.fmxext-idea-card {
	display: flex;
	align-items: stretch;
	gap: 1.1rem;
	padding: 1.25rem 1.4rem;
	border: 1px solid #eaecf0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

/* Vote column stretches to the full card height (see reference). */
.fmxext-idea-card-vote {
	flex: 0 0 auto;
	display: flex;
}

.fmxext-idea-card-vote .fmxext-idea-vote {
	height: 100%;
	/* Icon + count centered together as a group in the tall button. */
	justify-content: center;
	padding-top: 0.6rem;
	padding-bottom: 0.6rem;
}

.fmxext-idea-card-body {
	flex: 1 1 auto;
	min-width: 0;
}

.fmxext-idea-card-badges {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

/* Status pill */
.fmxext-idea-status {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	gap: 0.4rem;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}

.fmxext-idea-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	flex: 0 0 auto;
}

.fmxext-idea-status--new              { background: #f2f4f7; color: #475467; }
.fmxext-idea-status--needs-clarification { background: #fff6ed; color: #b93815; }
.fmxext-idea-status--needs-votes      { background: #eef4ff; color: #3538cd; }
.fmxext-idea-status--under-review     { background: #fffaeb; color: #b54708; }
.fmxext-idea-status--planned          { background: #eff8ff; color: #175cd3; }
.fmxext-idea-status--completed        { background: #ecfdf3; color: #067647; }
.fmxext-idea-status--abandoned        { background: #fef3f2; color: #b42318; }

/* Tag pill — hashtag layout matching the topic tags; box metrics match the
 * status badge above so the two align and share the same height. */
.fmxext-idea-tag {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	padding: 0.2rem 0.6rem;
	border-radius: 6px;
	background: #f2f4f7;
	color: #475467;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	text-decoration: none;
}

.fmxext-idea-tag:hover {
	background: #e9f7f3;
	color: var(--fmxext-idea-accent);
}

.fmxext-idea-card-title {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
}

.fmxext-idea-card-title a {
	color: #101828;
	text-decoration: none;
}

.fmxext-idea-card-title a:hover {
	color: var(--fmxext-idea-accent);
}

.fmxext-idea-card-excerpt {
	margin: 0 0 0.75rem;
	color: #475467;
	font-size: 0.95rem;
	line-height: 1.55;
	/* Clamp to a single line so all cards stay a uniform height. */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fmxext-idea-card-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.55rem;
	color: #667085;
	font-size: 0.85rem;
}

.fmxext-idea-author {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #344054;
	font-weight: 600;
}

.fmxext-idea-author-avatar img {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: block;
}

.fmxext-idea-comments {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.fmxext-ideas-empty {
	padding: 2rem;
	text-align: center;
	color: #667085;
	border: 1px dashed #eaecf0;
	border-radius: 14px;
	background: #fff;
}

/* Pagination (reuse the profile pager look) */
.fmxext-ideas-pagination {
	display: flex;
	justify-content: center;
	gap: 0.35rem;
	margin-top: 1.5rem;
}

.fmxext-ideas-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 0.6rem;
	border: 1px solid #e4e9ee;
	border-radius: 8px;
	background: #fff;
	color: #475467;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.fmxext-ideas-pagination .page-numbers.current {
	background: var(--fmxext-idea-accent);
	border-color: var(--fmxext-idea-accent);
	color: #fff;
}

.fmxext-ideas-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

/* ---- Status stats card ---- */
.fmxext-idea-stats {
	padding: 1.25rem 1.4rem;
	border: 1px solid #eaecf0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.fmxext-idea-stats-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: #101828;
}

.fmxext-idea-stats-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fmxext-idea-stats-row {
	border-top: 1px solid #f2f4f7;
}

.fmxext-idea-stats-row:first-child {
	border-top: 0;
}

.fmxext-idea-stats-link {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 0;
	color: inherit;
	text-decoration: none;
}

.fmxext-idea-stats-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: 0 0 auto;
	background-color: currentColor;
}

.fmxext-idea-stats-label {
	flex: 1 1 auto;
	min-width: 0;
	color: #475467;
	font-size: 0.95rem;
}

.fmxext-idea-stats-count {
	color: #101828;
	font-weight: 700;
	font-size: 0.95rem;
}

a.fmxext-idea-stats-link:hover .fmxext-idea-stats-label {
	color: #101828;
}

/* ---- Single idea: peripheral shortcodes ---- */

/* Breadcrumbs */
.fmxext-idea-breadcrumbs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.4rem;
	font-size: 0.85rem;
	color: #667085;
}

.fmxext-idea-breadcrumbs-link {
	color: #667085;
	text-decoration: none;
}

.fmxext-idea-breadcrumbs-link:hover {
	color: var(--fmxext-idea-accent, #0e9384);
}

.fmxext-idea-breadcrumbs-sep {
	color: #98a2b3;
}

.fmxext-idea-breadcrumbs-current {
	color: #101828;
	font-weight: 600;
}

/* Muted current crumb (the tag on an idea-tag page, already shown as the heading). */
.fmxext-idea-breadcrumbs-current--muted {
	color: #98a2b3;
	font-weight: 500;
}

/* Tag list (single) */
.fmxext-idea-tag-list {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	flex-wrap: wrap;
	gap: 0.4rem;
}

/* Meta line */
.fmxext-idea-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	color: #667085;
	font-size: 0.9rem;
}

.fmxext-idea-meta-author {
	color: #344054;
	font-weight: 600;
	text-decoration: none;
}

.fmxext-idea-meta-author:hover {
	color: var(--fmxext-idea-accent, #0e9384);
}

.fmxext-idea-meta-dot {
	color: #cbd2da;
}

.fmxext-idea-meta-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

/* "About this idea" side card */
.fmxext-idea-aboutcard {
	padding: 1.25rem 1.4rem;
	border: 1px solid #eaecf0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.fmxext-idea-aboutcard-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: #101828;
}

.fmxext-idea-aboutcard-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fmxext-idea-aboutcard-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.6rem 0;
	border-top: 1px solid #f2f4f7;
}

.fmxext-idea-aboutcard-list li:first-child {
	border-top: 0;
}

.fmxext-idea-aboutcard-label {
	color: #667085;
	font-size: 0.9rem;
}

.fmxext-idea-aboutcard-value {
	color: #101828;
	font-weight: 700;
	font-size: 0.9rem;
}

.fmxext-idea-aboutcard-author {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #344054;
	font-weight: 600;
	font-size: 0.9rem;
}

.fmxext-idea-aboutcard-author img {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: block;
}

/* Related ideas */
.fmxext-idea-related {
	padding: 1.25rem 1.4rem;
	border: 1px solid #eaecf0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.fmxext-idea-related-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: #101828;
}

.fmxext-idea-related-list {
	display: flex;
	flex-direction: column;
}

.fmxext-idea-related-item {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 0.6rem 0;
	border-top: 1px solid #f2f4f7;
}

.fmxext-idea-related-item:first-child {
	border-top: 0;
}

.fmxext-idea-related-icon {
	color: #98a2b3;
	flex: 0 0 auto;
	display: inline-flex;
	margin-top: 1px;
}

.fmxext-idea-related-link {
	color: #344054;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
}

.fmxext-idea-related-link:hover {
	color: var(--fmxext-idea-accent, #0e9384);
}

/* ---- Single idea: body + comments + inline edit ---- */
.fmxext-idea-single {
	--fmxext-idea-accent: #0e9384;
}

.fmxext-idea-single *,
.fmxext-idea-single *::before,
.fmxext-idea-single *::after {
	box-sizing: border-box;
}

/* Shared buttons */
.fmxext-idea-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 1.05rem;
	border-radius: 8px;
	border: 1px solid transparent;
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1;
	cursor: pointer;
}

.fmxext-idea-btn--primary {
	background: var(--fmxext-idea-accent);
	color: #fff;
}

.fmxext-idea-btn--primary:hover {
	filter: brightness(0.96);
}

.fmxext-idea-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Idea body — post card (mirrors the topic/reply content box) */
.fmxext-idea-post {
	position: relative;
	background: #fff;
	border: 1px solid #eaecf0;
	border-radius: 12px;
	padding: 1.25rem 1.5rem 1rem;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.fmxext-idea-post-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.fmxext-idea-post-author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.fmxext-idea-post-avatar img {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

.fmxext-idea-post-authormeta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.fmxext-idea-post-authorline {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.fmxext-idea-post-name {
	font-size: 0.98rem;
	font-weight: 700;
	color: #101828;
}

.fmxext-idea-post-role {
	display: inline-flex;
	align-items: center;
	padding: 0.1rem 0.5rem;
	border-radius: 6px;
	background: #eff8ff;
	color: #175cd3;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.5;
}

.fmxext-idea-post-date {
	font-size: 0.82rem;
	color: #98a2b3;
}

.fmxext-idea-body-content {
	color: #344054;
	font-size: 1rem;
	line-height: 1.7;
}

.fmxext-idea-body-content p {
	margin: 0 0 1rem;
}

.fmxext-idea-body-content p:last-child {
	margin-bottom: 0;
}

/* Idea post footer — upvote / Comment / Share */
.fmxext-idea-post-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1.1rem;
	padding-top: 0.9rem;
	border-top: 1px solid #f2f4f7;
}

.fmxext-idea-post-actions {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.fmxext-idea-action {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.85rem;
	border: 1px solid #e4e7ec;
	border-radius: 999px;
	background: #fff;
	color: #475467;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.fmxext-idea-action:hover {
	color: var(--fmxext-idea-accent);
	border-color: var(--fmxext-idea-accent);
	background: #f0fdfa;
}

/* Horizontal upvote button inside the footer (reuses the vote button markup) */
.fmxext-idea-post-footer .fmxext-idea-vote {
	flex-direction: row;
	align-items: center;
	gap: 0.4rem;
	min-width: 0;
	width: auto;
	padding: 0.45rem 0.9rem;
	border-radius: 999px;
	line-height: 1;
}

.fmxext-idea-post-footer .fmxext-idea-vote-count {
	font-size: 0.85rem;
}

/* Comment form input (comments are read-only once posted) */
.fmxext-idea-comment-textarea {
	width: 100%;
	padding: 0.75rem 0.85rem;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	font: inherit;
	line-height: 1.6;
	color: #111827;
	background: #fff;
	resize: vertical;
}

.fmxext-idea-comment-textarea:focus {
	outline: none;
	border-color: var(--fmxext-idea-accent);
	box-shadow: 0 0 0 3px rgba(14, 147, 132, 0.15);
}

/* Comments */
.fmxext-idea-comments-section {
	margin-top: 2rem;
}

/* Header — title + rule + sort pill (mirrors the topic replies header). */
.fmxext-idea-comments-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.fmxext-idea-comments-header-left {
	flex: 0 0 auto;
}

.fmxext-idea-comments-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	color: #101828;
	white-space: nowrap;
}

.fmxext-idea-comments-rule {
	flex: 1 1 auto;
	height: 0;
	border-top: 1px solid #e4e9ee;
}

.fmxext-idea-comments-header-right {
	flex: 0 0 auto;
}

.fmxext-idea-comments-sorting {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.fmxext-idea-comments-sort-label {
	font-size: 0.85rem;
	color: #667085;
	margin: 0;
}

.fmxext-idea-comments-sort-select {
	padding: 0.5rem 0.75rem;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	font: inherit;
	font-size: 0.9rem;
	color: #111827;
	cursor: pointer;
}

.fmxext-idea-comments-sort-select:hover {
	border-color: #98a2b3;
}

.fmxext-idea-comment-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 1.75rem;
}

/* Comment card */
.fmxext-idea-comment-card {
	background: #fff;
	border: 1px solid #eaecf0;
	border-radius: 12px;
	padding: 1rem 1.25rem;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.fmxext-idea-comment-head {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin-bottom: 0.75rem;
}

.fmxext-idea-comment-avatar img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: block;
}

.fmxext-idea-comment-authormeta {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
}

.fmxext-idea-comment-authorline {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.fmxext-idea-comment-author {
	color: #101828;
	font-weight: 700;
	font-size: 0.95rem;
}

.fmxext-idea-comment-role {
	display: inline-flex;
	align-items: center;
	padding: 0.1rem 0.5rem;
	border-radius: 6px;
	background: #eff8ff;
	color: #175cd3;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.5;
}

.fmxext-idea-comment-date {
	color: #98a2b3;
	font-size: 0.82rem;
}

.fmxext-idea-comment-content {
	color: #344054;
	font-size: 0.95rem;
	line-height: 1.6;
}

.fmxext-idea-comment-content p {
	margin: 0 0 0.75rem;
}

.fmxext-idea-comment-content p:last-child {
	margin-bottom: 0;
}

/* @mention link inside comment text */
.fmxext-idea-mention {
	color: var(--fmxext-idea-accent);
	font-weight: 600;
	text-decoration: none;
}

.fmxext-idea-mention:hover {
	text-decoration: underline;
}

/* Comment footer — Reply action */
.fmxext-idea-comment-footer {
	display: flex;
	align-items: center;
	margin-top: 0.85rem;
	padding-top: 0.75rem;
	border-top: 1px solid #f2f4f7;
}

.fmxext-idea-comment-reply {
	padding: 0.35rem 0.75rem;
	font-size: 0.82rem;
}

/* Comment form — card matching the topic reply form */
.fmxext-idea-comment-form {
	background: #fff;
	border: 1px solid #eaecf0;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.fmxext-idea-comment-form-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	/* Span to the card edges for a full-width divider under the header. */
	margin: -1.25rem -1.5rem 1.25rem;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #e4e9ee;
}

.fmxext-idea-comment-form-avatar img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: block;
}

.fmxext-idea-comment-form-heading {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}

.fmxext-idea-comment-form-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #101828;
}

.fmxext-idea-comment-form-sub {
	font-size: 0.85rem;
	color: #667085;
}

.fmxext-idea-comment-form-actions {
	display: flex;
	justify-content: flex-end;
	/* Full-width divider above the button row. */
	margin: 1.25rem -1.5rem -1.25rem;
	padding: 1.25rem 1.5rem;
	border-top: 1px solid #e4e9ee;
}

.fmxext-idea-comment-login {
	padding: 1rem 1.25rem;
	border: 1px solid #eaecf0;
	border-radius: 12px;
	background: #f9fafb;
	color: #475467;
	font-size: 0.95rem;
}
