/*
 * Isolated CMS body styles for blog detail.
 * 1) all:revert strips theme/Bootstrap author styles from descendants
 * 2) CKEditor contents.css rules remapped under .blog-detail-wrap .content
 * Source: myadmin/bower_components/ckeditor/contents.css
 */

/* ---- Isolation: ignore site CSS inside CMS HTML ---- */
.blog-detail-wrap .content,
.blog-detail-wrap .content * {
	all: revert;
}

/* Container = editor body + .cke_editable (skip editor chrome margin/white page bg) */
.blog-detail-wrap .content {
	display: block;
	font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
	font-size: 13px;
	line-height: 1.6;
	color: #333;
	word-wrap: break-word;
	background-color: transparent;
	margin: 0;
	padding: 0;
	max-width: 100%;
	box-sizing: border-box;
}

/* ---- contents.css (scoped) ---- */
.blog-detail-wrap .content blockquote {
	font-style: italic;
	font-family: Georgia, Times, "Times New Roman", serif;
	padding: 2px 0;
	border-style: solid;
	border-color: #ccc;
	border-width: 0;
	padding-left: 20px;
	padding-right: 8px;
	border-left-width: 5px;
}

.blog-detail-wrap .content.cke_contents_rtl blockquote,
.blog-detail-wrap .content[dir="rtl"] blockquote {
	padding-left: 8px;
	padding-right: 20px;
	border-left-width: 0;
	border-right-width: 5px;
}

.blog-detail-wrap .content a {
	color: #0782C1;
}

.blog-detail-wrap .content ol,
.blog-detail-wrap .content ul,
.blog-detail-wrap .content dl {
	padding: 0 40px;
}

.blog-detail-wrap .content h1,
.blog-detail-wrap .content h2,
.blog-detail-wrap .content h3,
.blog-detail-wrap .content h4,
.blog-detail-wrap .content h5,
.blog-detail-wrap .content h6 {
	font-weight: normal;
	line-height: 1.2;
}

.blog-detail-wrap .content hr {
	border: 0;
	border-top: 1px solid #ccc;
}

.blog-detail-wrap .content img.right {
	border: 1px solid #ccc;
	float: right;
	margin-left: 15px;
	padding: 5px;
}

.blog-detail-wrap .content img.left {
	border: 1px solid #ccc;
	float: left;
	margin-right: 15px;
	padding: 5px;
}

.blog-detail-wrap .content pre {
	white-space: pre-wrap;
	word-wrap: break-word;
	-moz-tab-size: 4;
	tab-size: 4;
}

.blog-detail-wrap .content .marker {
	background-color: Yellow;
}

.blog-detail-wrap .content span[lang] {
	font-style: italic;
}

.blog-detail-wrap .content figure {
	text-align: center;
	border: solid 1px #ccc;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.05);
	padding: 10px;
	margin: 10px 20px;
	display: inline-block;
	max-width: 100%;
}

.blog-detail-wrap .content figure > figcaption {
	text-align: center;
	display: block;
}

.blog-detail-wrap .content a > img {
	padding: 1px;
	margin: 1px;
	border: none;
	outline: 1px solid #0782C1;
}

.blog-detail-wrap .content .code-featured {
	border: 5px solid red;
}

.blog-detail-wrap .content .math-featured {
	padding: 20px;
	box-shadow: 0 0 2px rgba(200, 0, 0, 1);
	background-color: rgba(255, 0, 0, 0.05);
	margin: 10px;
}

.blog-detail-wrap .content .image-clean {
	border: 0;
	background: none;
	padding: 0;
}

.blog-detail-wrap .content .image-clean > figcaption {
	font-size: 0.9em;
	text-align: right;
}

.blog-detail-wrap .content .image-grayscale {
	background-color: white;
	color: #666;
}

.blog-detail-wrap .content .image-grayscale img,
.blog-detail-wrap .content img.image-grayscale {
	filter: grayscale(100%);
}

.blog-detail-wrap .content .embed-240p {
	max-width: 426px;
	max-height: 240px;
	margin: 0 auto;
}

.blog-detail-wrap .content .embed-360p {
	max-width: 640px;
	max-height: 360px;
	margin: 0 auto;
}

.blog-detail-wrap .content .embed-480p {
	max-width: 854px;
	max-height: 480px;
	margin: 0 auto;
}

.blog-detail-wrap .content .embed-720p {
	max-width: 1280px;
	max-height: 720px;
	margin: 0 auto;
}

.blog-detail-wrap .content .embed-1080p {
	max-width: 1920px;
	max-height: 1080px;
	margin: 0 auto;
}

/*
 * After all:revert, HTML border/cellpadding behave like the CKEditor iframe.
 * Explicit table[border] rules keep borders consistent across browsers.
 */
.blog-detail-wrap .content table {
	border-collapse: separate;
	border-spacing: 0;
	empty-cells: show;
	max-width: 100%;
}

.blog-detail-wrap .content table[border]:not([border="0"]) {
	border: 1px solid #000;
}

.blog-detail-wrap .content table[border]:not([border="0"]) td,
.blog-detail-wrap .content table[border]:not([border="0"]) th {
	border: 1px solid #000;
}

.blog-detail-wrap .content table[cellpadding="0"] td,
.blog-detail-wrap .content table[cellpadding="0"] th {
	padding: 0;
}

.blog-detail-wrap .content table[cellpadding="1"] td,
.blog-detail-wrap .content table[cellpadding="1"] th {
	padding: 1px;
}

.blog-detail-wrap .content table[cellpadding="2"] td,
.blog-detail-wrap .content table[cellpadding="2"] th {
	padding: 2px;
}

.blog-detail-wrap .content table[cellpadding="3"] td,
.blog-detail-wrap .content table[cellpadding="3"] th {
	padding: 3px;
}

.blog-detail-wrap .content table[cellpadding="4"] td,
.blog-detail-wrap .content table[cellpadding="4"] th {
	padding: 4px;
}

.blog-detail-wrap .content table[cellpadding="5"] td,
.blog-detail-wrap .content table[cellpadding="5"] th {
	padding: 5px;
}

.blog-detail-wrap .content table[cellspacing="1"] {
	border-spacing: 1px;
}

.blog-detail-wrap .content img,
.blog-detail-wrap .content iframe,
.blog-detail-wrap .content video,
.blog-detail-wrap .content embed,
.blog-detail-wrap .content object {
	max-width: 100%;
	height: auto;
}

@media (max-width: 767px) {
	.blog-detail-wrap .content {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.blog-detail-wrap .content table,
	.blog-detail-wrap .content iframe,
	.blog-detail-wrap .content img,
	.blog-detail-wrap .content video,
	.blog-detail-wrap .content embed,
	.blog-detail-wrap .content object {
		max-width: 100% !important;
	}

	.blog-detail-wrap .content iframe {
		width: 100% !important;
	}
}


/* ---- Heading hierarchy (brief B15) ---- */
.blog-detail-wrap .content h2 {
	font-size: 42px;
	margin: 1em 0 0.5em;
}

.blog-detail-wrap .content h3 {
	font-size: 28px;
	margin: 1em 0 0.5em;
}

.blog-detail-wrap .content h4 {
	font-size: 20px;
	margin: 1em 0 0.5em;
}

.blog-detail-wrap .content h5 {
	font-size: 16px;
	margin: 1em 0 0.5em;
}

/* ---- Lists: ensure bullets/numbers visible ---- */
.blog-detail-wrap .content ul {
	list-style-type: disc;
}

.blog-detail-wrap .content ol {
	list-style-type: decimal;
}

.blog-detail-wrap .content li {
	display: list-item;
}

/* ---- Blockquote: distinct visual ---- */
.blog-detail-wrap .content blockquote {
	margin: 1em 0;
	padding: 12px 20px;
	background: #f9f9f9;
}

/* ---- Video: responsive wrapper ---- */
.blog-detail-wrap .content iframe[src*="youtube"],
.blog-detail-wrap .content iframe[src*="youtu.be"] {
	width: 100%;
	min-height: 315px;
	aspect-ratio: 16 / 9;
}

/* ---- Paragraph spacing ---- */
.blog-detail-wrap .content p {
	margin: 0 0 1em;
	line-height: 1.6;
}

@media (max-width: 767px) {
	.blog-detail-wrap .content h2 {
		font-size: 28px;
	}
	.blog-detail-wrap .content h3 {
		font-size: 22px;
	}
	.blog-detail-wrap .content h4 {
		font-size: 18px;
	}
}


/* ---- Legal page WYSIWYG fidelity (terms-of-service, privacy-policy, etc.) ---- */
.legal-page-body.ckeditor-content,
.legal-page-body.ckeditor-content * {
	all: revert;
}

.legal-page-body.ckeditor-content {
	display: block;
	font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
	font-size: 15px;
	line-height: 1.8;
	color: #333;
	word-wrap: break-word;
	background-color: transparent;
	margin: 0;
	padding: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.legal-page-body.ckeditor-content a {
	color: #0782C1;
	text-decoration: underline;
}

.legal-page-body.ckeditor-content h2 {
	font-size: 25px;
	line-height: 1.35;
	font-weight: 600;
	margin: 38px 0 14px;
}

.legal-page-body.ckeditor-content h3 {
	font-size: 18px;
	line-height: 1.5;
	font-weight: 600;
	margin: 25px 0 10px;
}

.legal-page-body.ckeditor-content h4 {
	font-size: 16px;
	line-height: 1.5;
	font-weight: 600;
	margin: 22px 0 8px;
}

.legal-page-body.ckeditor-content h5 {
	font-size: 14px;
	line-height: 1.5;
	font-weight: 600;
	margin: 20px 0 8px;
}

.legal-page-body.ckeditor-content h1,
.legal-page-body.ckeditor-content h2,
.legal-page-body.ckeditor-content h3,
.legal-page-body.ckeditor-content h4,
.legal-page-body.ckeditor-content h5,
.legal-page-body.ckeditor-content h6 {
	line-height: 1.2;
}

.legal-page-body.ckeditor-content p {
	margin: 0 0 14px;
	line-height: 1.8;
}

.legal-page-body.ckeditor-content ul,
.legal-page-body.ckeditor-content ol,
.legal-page-body.ckeditor-content dl {
	padding: 0 40px;
	margin: 0 0 20px;
}

.legal-page-body.ckeditor-content ul {
	list-style-type: disc;
}

.legal-page-body.ckeditor-content ol {
	list-style-type: decimal;
}

.legal-page-body.ckeditor-content li {
	display: list-item;
	margin-bottom: 8px;
}

.legal-page-body.ckeditor-content strong {
	font-weight: 600;
}

.legal-page-body.ckeditor-content blockquote {
	font-style: italic;
	font-family: Georgia, Times, "Times New Roman", serif;
	padding: 12px 20px;
	margin: 1em 0;
	border-left: 5px solid #ccc;
	background: #f9f9f9;
}

.legal-page-body.ckeditor-content hr {
	border: 0;
	border-top: 1px solid #ccc;
}

.legal-page-body.ckeditor-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	max-width: 100%;
}

.legal-page-body.ckeditor-content table[border]:not([border="0"]) {
	border: 1px solid #000;
}

.legal-page-body.ckeditor-content table[border]:not([border="0"]) td,
.legal-page-body.ckeditor-content table[border]:not([border="0"]) th {
	border: 1px solid #000;
}

.legal-page-body.ckeditor-content th,
.legal-page-body.ckeditor-content td {
	padding: 10px 12px;
	vertical-align: top;
}

.legal-page-body.ckeditor-content img,
.legal-page-body.ckeditor-content iframe,
.legal-page-body.ckeditor-content video,
.legal-page-body.ckeditor-content embed,
.legal-page-body.ckeditor-content object {
	max-width: 100%;
	height: auto;
}

.legal-page-body.ckeditor-content iframe[src*="youtube"],
.legal-page-body.ckeditor-content iframe[src*="youtu.be"] {
	width: 100%;
	min-height: 315px;
	aspect-ratio: 16 / 9;
}

.legal-page-body.ckeditor-content figure {
	text-align: center;
	border: solid 1px #ccc;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.05);
	padding: 10px;
	margin: 10px 20px;
	display: inline-block;
	max-width: 100%;
}

.legal-page-body.ckeditor-content figure > figcaption {
	text-align: center;
	display: block;
}

.legal-page-body.ckeditor-content pre {
	white-space: pre-wrap;
	word-wrap: break-word;
	tab-size: 4;
}

@media (max-width: 767px) {
	.legal-page-body.ckeditor-content {
		font-size: 14px;
		line-height: 1.75;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.legal-page-body.ckeditor-content p {
		margin-bottom: 12px;
	}

	.legal-page-body.ckeditor-content h2 {
		font-size: 22px;
	}

	.legal-page-body.ckeditor-content h3 {
		font-size: 17px;
	}

	.legal-page-body.ckeditor-content h4 {
		font-size: 15px;
	}

	.legal-page-body.ckeditor-content ul,
	.legal-page-body.ckeditor-content ol {
		padding-left: 20px;
	}

	.legal-page-body.ckeditor-content table,
	.legal-page-body.ckeditor-content iframe,
	.legal-page-body.ckeditor-content img {
		max-width: 100% !important;
	}

	.legal-page-body.ckeditor-content iframe {
		width: 100% !important;
	}
}


/* ---- Generic .ckeditor-content WYSIWYG fidelity ---- */
.ckeditor-content,
.ckeditor-content * {
	all: revert;
}

.ckeditor-content {
	display: block;
	font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
	font-size: 15px;
	line-height: 1.8;
	color: #333;
	word-wrap: break-word;
	background-color: transparent;
	margin: 0;
	padding: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.ckeditor-content a {
	color: #0782C1;
	text-decoration: underline;
}

.ckeditor-content h1,
.ckeditor-content h2,
.ckeditor-content h3,
.ckeditor-content h4,
.ckeditor-content h5,
.ckeditor-content h6 {
	font-weight: normal;
	line-height: 1.2;
}

.ckeditor-content h2 {
	font-size: 42px;
	margin: 1em 0 0.5em;
}

.ckeditor-content h3 {
	font-size: 28px;
	margin: 1em 0 0.5em;
}

.ckeditor-content h4 {
	font-size: 20px;
	margin: 1em 0 0.5em;
}

.ckeditor-content h5 {
	font-size: 16px;
	margin: 1em 0 0.5em;
}

.ckeditor-content p {
	margin: 0 0 1em;
	line-height: 1.8;
}

.ckeditor-content ul,
.ckeditor-content ol,
.ckeditor-content dl {
	padding: 0 40px;
	margin: 0 0 20px;
}

.ckeditor-content ul {
	list-style-type: disc;
}

.ckeditor-content ol {
	list-style-type: decimal;
}

.ckeditor-content li {
	display: list-item;
	margin-bottom: 8px;
}

.ckeditor-content strong {
	font-weight: 600;
}

.ckeditor-content blockquote {
	font-style: italic;
	font-family: Georgia, Times, "Times New Roman", serif;
	padding: 12px 20px;
	margin: 1em 0;
	border-left: 5px solid #ccc;
	background: #f9f9f9;
}

.ckeditor-content hr {
	border: 0;
	border-top: 1px solid #ccc;
}

.ckeditor-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	max-width: 100%;
}

.ckeditor-content table[border]:not([border="0"]) {
	border: 1px solid #000;
}

.ckeditor-content table[border]:not([border="0"]) td,
.ckeditor-content table[border]:not([border="0"]) th {
	border: 1px solid #000;
}

.ckeditor-content th,
.ckeditor-content td {
	padding: 10px 12px;
	vertical-align: top;
}

.ckeditor-content img,
.ckeditor-content iframe,
.ckeditor-content video,
.ckeditor-content embed,
.ckeditor-content object {
	max-width: 100%;
	height: auto;
}

.ckeditor-content iframe[src*="youtube"],
.ckeditor-content iframe[src*="youtu.be"] {
	width: 100%;
	min-height: 315px;
	aspect-ratio: 16 / 9;
}

.ckeditor-content figure {
	text-align: center;
	border: solid 1px #ccc;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.05);
	padding: 10px;
	margin: 10px 20px;
	display: inline-block;
	max-width: 100%;
}

.ckeditor-content figure > figcaption {
	text-align: center;
	display: block;
}

.ckeditor-content pre {
	white-space: pre-wrap;
	word-wrap: break-word;
	tab-size: 4;
}

@media (max-width: 767px) {
	.ckeditor-content {
		font-size: 14px;
		line-height: 1.75;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.ckeditor-content p {
		margin-bottom: 12px;
	}

	.ckeditor-content h2 {
		font-size: 28px;
	}

	.ckeditor-content h3 {
		font-size: 22px;
	}

	.ckeditor-content h4 {
		font-size: 18px;
	}

	.ckeditor-content ul,
	.ckeditor-content ol {
		padding-left: 20px;
	}

	.ckeditor-content table,
	.ckeditor-content iframe,
	.ckeditor-content img {
		max-width: 100% !important;
	}

	.ckeditor-content iframe {
		width: 100% !important;
	}
}
