/*!
 * Copyright ckii.com <http://ckii.com>
 * ===================================================
 *
 * @file	tck_math.css
 * @brief	Display tweaks for KaTeX output and the editor preview pane
 * @author	Chun Kang (ck@ckii.com)
 *
 * @notes
 * 2026.08.28   created
 *
 * <link rel="stylesheet" href="/_js/katex/0.18.4/tck_math.css">
 *
**/

/* Wide display math scrolls inside its own box, the same treatment a code block
   gets, instead of stretching the column. */
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }

/* throwOnError:false leaves the offending source in place -- keep it readable
   rather than collapsing its whitespace onto one line. */
.katex-error { white-space: pre-wrap; }

/* Editor preview pane (TCK_MATH.attachPreview). Sits under the editor, hidden
   until the content actually has math in it. Jira-light palette, matching the
   surrounding ticket / post chrome. */
.tck-math-preview {
	margin-top: 6px;
	border: 1px solid #DFE1E6;
	border-radius: 3px;
	background: #FAFBFC;
}
.tck-math-preview-head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 8px; padding: 4px 8px;
	border-bottom: 1px solid #DFE1E6;
	font-size: 0.75em; font-weight: 600; letter-spacing: 0.04em;
	text-transform: uppercase; color: #5E6C84;
}
.tck-math-preview-toggle {
	padding: 1px 8px;
	font-size: 0.95em; font-weight: 500;
	letter-spacing: normal; text-transform: none;
	color: #42526E; background: #FFFFFF;
	border: 1px solid #DFE1E6; border-radius: 3px;
	cursor: pointer;
}
.tck-math-preview-toggle:hover { background: #F4F5F7; color: #172B4D; }
/* Capped so a long draft's preview can never push the editor off screen. */
.tck-math-preview-body {
	padding: 8px 10px; max-height: 320px; overflow: auto;
	color: #172B4D; line-height: 1.55;
}
