/**
 * Fiction Flock — editor styling
 *
 * Trix's default chrome is Basecamp's, not ours. This makes the editor look
 * like the rest of the site's form fields so it doesn't read as a bolted-on
 * third-party widget.
 */

.ff-editor-wrap { margin: 0 0 4px; }

/* Toolbar --------------------------------------------------------------- */
.ff-editor-wrap trix-toolbar {
	margin: 0 0 6px;
}
.ff-editor-wrap trix-toolbar .trix-button-row {
	gap: 4px;
}
.ff-editor-wrap trix-toolbar .trix-button-group {
	border: 1px solid #e6e1d8;
	border-radius: 8px;
	background: #fff;
	margin: 0;
	overflow: hidden;
}
.ff-editor-wrap trix-toolbar .trix-button {
	border: 0;
	border-right: 1px solid #f0ece4;
	background: #fff;
	width: 34px;
	height: 32px;
	padding: 0;
	color: #4a4a4a;
}
.ff-editor-wrap trix-toolbar .trix-button:last-child { border-right: 0; }
.ff-editor-wrap trix-toolbar .trix-button:hover:not(:disabled) { background: #faf7f1; }
.ff-editor-wrap trix-toolbar .trix-button.trix-active {
	background: #174b4c;
	color: #fff;
}
.ff-editor-wrap trix-toolbar .trix-button:disabled { opacity: .35; }

/* Editor body ----------------------------------------------------------- */
.ff-editor-wrap trix-editor {
	border: 1px solid #ddd6c9;
	border-radius: 10px;
	padding: 12px 14px;
	background: #fff;
	font-family: Lora, Georgia, serif;
	font-size: 15px;
	line-height: 25px;
	color: #3a3a3a;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	overflow-wrap: break-word;
}
.ff-editor-wrap trix-editor:focus {
	outline: none;
	border-color: #174b4c;
	box-shadow: 0 0 0 3px rgba( 23, 75, 76, .10 );
}
.ff-editor-wrap trix-editor:empty:not(:focus)::before {
	color: #9a948a;
	font-style: italic;
}

.ff-editor-wrap trix-editor p  { margin: 0 0 10px; }
.ff-editor-wrap trix-editor p:last-child { margin-bottom: 0; }
.ff-editor-wrap trix-editor ul,
.ff-editor-wrap trix-editor ol { margin: 0 0 10px; padding-left: 22px; }
.ff-editor-wrap trix-editor li { margin: 0 0 4px; }
.ff-editor-wrap trix-editor a  { color: #174b4c; }

/* Trix renders headings/quotes even with the buttons removed, if a member
   pastes them. Keep them from blowing out the field. */
.ff-editor-wrap trix-editor h1 { font-size: 20px; line-height: 28px; margin: 0 0 10px; }
.ff-editor-wrap trix-editor blockquote {
	border-left: 3px solid #e6e1d8;
	margin: 0 0 10px;
	padding-left: 12px;
	color: #6a6a6a;
}

/* The attach button is removed in JS; belt and braces in case a cached
   script version loads. */
.ff-editor-wrap trix-toolbar [data-trix-action="attachFiles"] { display: none !important; }

@media only screen and ( max-width: 600px ) {
	.ff-editor-wrap trix-editor { font-size: 16px; } /* no iOS zoom on focus */
	.ff-editor-wrap trix-toolbar .trix-button { width: 38px; height: 36px; }
}
