/**
 * WYSIWYG output — match TinyMCE editor layout (override global theme resets).
 */

.hi-wysiwyg-content {
	color: #000000;
	font-size: 17px;
	line-height: 25px;
	text-align: left;
	width: 100%;
}

.hi-wysiwyg-content::after {
	content: "";
	display: table;
	clear: both;
}

/* Block spacing (matches editor content_style). */
.hi-wysiwyg-content > *:first-child {
	margin-top: 0;
}

.hi-wysiwyg-content p {
	margin: 0 0 1em;
}

.hi-wysiwyg-content p:last-child {
	margin-bottom: 0;
}

/* Headings */
.hi-wysiwyg-content h1,
.hi-wysiwyg-content h2,
.hi-wysiwyg-content h3,
.hi-wysiwyg-content h4,
.hi-wysiwyg-content h5,
.hi-wysiwyg-content h6 {
	font-weight: 700;
	line-height: 1.25;
	margin: 1.25em 0 0.5em;
}

.hi-wysiwyg-content h1:first-child,
.hi-wysiwyg-content h2:first-child,
.hi-wysiwyg-content h3:first-child,
.hi-wysiwyg-content h4:first-child,
.hi-wysiwyg-content h5:first-child,
.hi-wysiwyg-content h6:first-child {
	margin-top: 0;
}

/* Text alignment — classes, legacy align attr, and inline styles from TinyMCE. */
.hi-wysiwyg-content .alignleft,
.hi-wysiwyg-content [align="left"] {
	text-align: left;
}

.hi-wysiwyg-content .aligncenter,
.hi-wysiwyg-content [align="center"] {
	text-align: center;
}

.hi-wysiwyg-content .alignright,
.hi-wysiwyg-content [align="right"] {
	text-align: right;
}

.hi-wysiwyg-content .alignjustify,
.hi-wysiwyg-content [align="justify"] {
	text-align: justify;
}

/* Lists — restore bullets/numbers stripped by theme reset. */
.hi-wysiwyg-content ul,
.hi-wysiwyg-content ol {
	margin: 0 0 1em;
	padding: 0 0 0 1.75em;
}

.hi-wysiwyg-content ul {
	list-style: disc outside;
}

.hi-wysiwyg-content ol {
	list-style: decimal outside;
}

.hi-wysiwyg-content li {
	display: list-item;
	list-style: inherit;
	margin: 0.35em 0;
	padding: 0;
}

.hi-wysiwyg-content ul ul,
.hi-wysiwyg-content ol ol,
.hi-wysiwyg-content ul ol,
.hi-wysiwyg-content ol ul {
	margin-bottom: 0;
}

/* Nested list styles */
.hi-wysiwyg-content ul ul {
	list-style-type: circle;
}

.hi-wysiwyg-content ul ul ul {
	list-style-type: square;
}

/* Blockquote / indent */
.hi-wysiwyg-content blockquote {
	border-left: 3px solid #cccccc;
	margin: 1em 0 1em 1.5em;
	padding: 0.25em 0 0.25em 1em;
}

/* Preserve intentional line breaks and spacing in pre/code. */
.hi-wysiwyg-content pre,
.hi-wysiwyg-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.hi-wysiwyg-content pre {
	background: #f5f5f5;
	margin: 0 0 1em;
	overflow-x: auto;
	padding: 1em;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.hi-wysiwyg-content code {
	background: #f5f5f5;
	padding: 0.1em 0.35em;
}

/* Images and floats */
.hi-wysiwyg-content img {
	height: auto;
	max-width: 100%;
}

.hi-wysiwyg-content img.alignleft,
.hi-wysiwyg-content .alignleft img {
	display: inline;
	float: left;
	margin: 0.25em 1.5em 1em 0;
}

.hi-wysiwyg-content img.alignright,
.hi-wysiwyg-content .alignright img {
	display: inline;
	float: right;
	margin: 0.25em 0 1em 1.5em;
}

.hi-wysiwyg-content img.aligncenter,
.hi-wysiwyg-content .aligncenter img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.hi-wysiwyg-content figure {
	margin: 0 0 1em;
	max-width: 100%;
}

.hi-wysiwyg-content figure.aligncenter {
	text-align: center;
}

.hi-wysiwyg-content figcaption {
	font-size: 0.9em;
	margin-top: 0.5em;
}

/* Tables */
.hi-wysiwyg-content table {
	border-collapse: collapse;
	margin: 0 0 1em;
	width: 100%;
}

.hi-wysiwyg-content th,
.hi-wysiwyg-content td {
	border: 1px solid #dddddd;
	padding: 0.5em 0.75em;
	text-align: left;
	vertical-align: top;
}

.hi-wysiwyg-content th {
	font-weight: 700;
}

.hi-wysiwyg-content hr {
	border: 0;
	border-top: 1px solid #dddddd;
	margin: 1.5em 0;
}

/* Links */
.hi-wysiwyg-content a {
	color: #0065b3;
	text-decoration: underline;
}

.hi-wysiwyg-content a:hover {
	text-decoration: none;
}
