/* Prophecy forum rich-text editor — shared between bbPress forms and
   the profile signature field on BuddyPress pages.
   Loaded via prophecy-forum-editor-style handle in both contexts. */

.pcy-forum-editor {
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg2);
	transition: border-color .15s;
}

.pcy-forum-editor:focus-within {
	border-color: var(--accent);
}

.pcy-editor-toolbar {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 5px 8px;
	background: var(--bg3, #0d0d11);
	border-bottom: 1px solid var(--border);
	flex-wrap: wrap;
}

.pcy-tb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 4px;
	border: none;
	border-radius: 5px;
	background: transparent;
	color: var(--text3);
	cursor: pointer;
	font-size: .75rem;
	font-family: var(--font-ui);
	line-height: 1;
	transition: background .12s, color .12s;
	user-select: none;
	-webkit-user-select: none;
}

.pcy-tb-btn:hover {
	background: rgba(255,255,255,.07);
	color: var(--text);
}

.pcy-tb-btn.is-active {
	background: color-mix(in srgb, var(--accent) 18%, transparent);
	color: var(--accent);
}

.pcy-tb-bold   { font-weight: 800; font-family: Georgia, serif; font-size: .9rem; }
.pcy-tb-italic { font-style: italic; font-family: Georgia, serif; font-size: .9rem; }
.pcy-tb-under  { text-decoration: underline; }
.pcy-tb-strike { text-decoration: line-through; }
.pcy-tb-h2     { font-size: .65rem; font-weight: 700; letter-spacing: .04em; }

.pcy-tb-sep {
	width: 1px;
	height: 18px;
	background: var(--border);
	margin: 0 3px;
	flex-shrink: 0;
}

.pcy-editor-content {
	min-height: 130px;
	padding: 12px 14px;
	font-size: .875rem;
	color: var(--text);
	font-family: var(--font-ui);
	line-height: 1.65;
	outline: none;
	word-break: break-word;
}

/* Placeholder via CSS ::before */
.pcy-editor-content.is-empty:not(:focus)::before {
	content: attr(data-placeholder);
	color: var(--text3);
	pointer-events: none;
}

/* Formatted content inside the editor */
.pcy-editor-content h2 {
	font-size: 1.1rem;
	font-weight: 700;
	margin: .5em 0 .2em;
	color: var(--text);
}

.pcy-editor-content blockquote {
	border-left: 3px solid var(--accent);
	margin: .6em 0;
	padding: .3em 0 .3em 1em;
	color: var(--text3);
	font-style: italic;
}

.pcy-editor-content pre {
	background: var(--bg3, #0d0d11);
	border: 1px solid var(--border);
	border-radius: 5px;
	padding: .6em .85em;
	font-family: monospace;
	font-size: .82rem;
	overflow-x: auto;
	margin: .5em 0;
}

.pcy-editor-content code {
	background: var(--bg3, #0d0d11);
	padding: .1em .35em;
	border-radius: 3px;
	font-family: monospace;
	font-size: .85em;
}

.pcy-editor-content a {
	color: var(--accent);
	text-decoration: underline;
}

.pcy-editor-content ul,
.pcy-editor-content ol {
	padding-left: 1.6em;
	margin: .4em 0;
}

.pcy-editor-content ul { list-style: disc; }
.pcy-editor-content ol { list-style: decimal; }

.pcy-editor-content li {
	margin-bottom: .2em;
}

/* The hidden textarea that gets synced on submit */
.pcy-editor-hidden {
	display: none !important;
}

/* Signature variant — shorter height */
.pcy-forum-editor[data-mode="signature"] .pcy-editor-content {
	min-height: 60px;
}

/* Editor inside a bbPress form */
.bbp-form .pcy-forum-editor {
	margin-bottom: 0;
}
