/* SCEExtended 1.4.1 - MIT */

.scex-heading {
	line-height: 1.25;
	margin: 1em 0 .45em;
}

.scex-h2 { font-size: 1.7em; }
.scex-h3 { font-size: 1.4em; }
.scex-h4 { font-size: 1.18em; }

.scex-section {
	border: 1px solid #d6dce2;
	border-radius: 8px;
	margin: 1.2em 0;
	padding: 1.1em;
}

.scex-columns {
	display: grid;
	gap: 1.25em;
	margin: 1.2em 0;
}

.scex-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scex-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.scex-column { min-width: 0; }

.scex-flowcolumns {
	column-fill: balance;
	column-gap: 2em;
	column-rule: 1px solid #d7dde4;
	margin: 1.2em 0;
	orphans: 3;
	widows: 3;
}

.scex-flowcolumns-2 { column-count: 2; }
.scex-flowcolumns-3 { column-count: 3; }
.scex-flowcolumns-4 { column-count: 4; }

.scex-flowcolumns .scex-heading,
.scex-flowcolumns .scex-card,
.scex-flowcolumns .scex-notice,
.scex-flowcolumns figure,
.scex-flowcolumns table {
	break-inside: avoid-column;
}

.scex-card {
	background: rgba(255, 255, 255, .55);
	border: 1px solid #d6dce2;
	border-radius: 9px;
	box-shadow: 0 3px 12px rgba(18, 32, 47, .09);
	margin: 1.2em 0;
	padding: 1.1em;
}

.scex-notice {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-left: 5px solid #3b82f6;
	border-radius: 5px;
	margin: 1.1em 0;
	padding: .9em 1em;
}

.scex-notice-success {
	background: #f0fdf4;
	border-color: #bbf7d0;
	border-left-color: #16a34a;
}

.scex-notice-warning {
	background: #fffbeb;
	border-color: #fde68a;
	border-left-color: #d97706;
}

.scex-notice-danger {
	background: #fef2f2;
	border-color: #fecaca;
	border-left-color: #dc2626;
}

.scex-highlight {
	border-radius: 2px;
	padding: 0 .12em;
}

.scex-dropcap {
	display: block;
}

.scex-typography-controls {
	align-items: center;
	display: inline-flex !important;
	gap: 4px;
	height: 26px;
	padding: 0 4px !important;
}

.scex-toolbar-select {
	background: #fff;
	border: 1px solid #aab2bd;
	border-radius: 3px;
	box-sizing: border-box;
	color: #263238;
	height: 22px;
	line-height: 20px;
	margin: 2px 0;
	max-width: 190px;
	padding: 0 22px 0 6px;
}

.scex-font-select { min-width: 145px; }
.scex-size-select { min-width: 115px; }

.scex-toolbar-select:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 1px rgba(37, 99, 235, .2);
	outline: none;
}

.scex-dropcap:not(.scex-dropcap-rendered)::first-letter,
.scex-dropcap-letter {
	float: left;
	font-size: 3.4em;
	font-weight: 700;
	line-height: .78;
	margin: .08em .12em 0 0;
}

.scex-pagebreak {
	border: 0;
	border-top: 2px dashed #9ca3af;
	margin: 2em 0;
}

.scex-media {
	box-sizing: border-box;
	display: block;
	margin: 1.25em auto;
	max-width: min(100%, var(--scex-media-max-width, 1100px));
	text-align: center;
}

.scex-media video,
.scex-media img {
	background: #111827;
	border-radius: 7px;
	box-shadow: 0 3px 14px rgba(0, 0, 0, .18);
	display: block;
	height: auto;
	margin: 0 auto;
	max-width: 100%;
}

.scex-media video {
	max-height: var(--scex-video-max-height, 720px);
	width: 100%;
}

.scex-media figcaption {
	font-size: .9em;
	margin-top: .55em;
}

.scex-attachment-placeholder {
	background: #edf2f7;
	border: 1px solid #cbd5e0;
	border-radius: 4px;
	display: inline-block;
	padding: 4px 8px;
}

.sceditor-button-scexheading div,
.sceditor-button-scexlayout div,
.sceditor-button-scexnotice div,
.sceditor-button-scexstyle div,
.sceditor-button-scexattachment div,
.sceditor-button-scexhr div,
.sceditor-button-scexselectend div,
.sceditor-button-scexunlink div {
	background-image: url("icons.svg") !important;
	background-repeat: no-repeat !important;
	background-size: 128px 16px !important;
	height: 16px !important;
	margin: 2px 0 !important;
	width: 16px !important;
}

.sceditor-button-scexheading div { background-position: 0 0 !important; }
.sceditor-button-scexlayout div { background-position: -16px 0 !important; }
.sceditor-button-scexnotice div { background-position: -32px 0 !important; }
.sceditor-button-scexstyle div { background-position: -48px 0 !important; }
.sceditor-button-scexattachment div { background-position: -64px 0 !important; }
.sceditor-button-scexunlink div { background-position: -80px 0 !important; }

.sceditor-scex-heading .sceditor-option,
.sceditor-scex-layout .sceditor-option,
.sceditor-scex-notice .sceditor-option,
.sceditor-scex-style .sceditor-option {
	display: block;
	padding: 5px 10px;
	white-space: nowrap;
}

@media (max-width: 700px) {
	.scex-font-select { min-width: 118px; width: 118px; }
	.scex-size-select { min-width: 104px; width: 104px; }
	.scex-columns-2,
	.scex-columns-3 {
		grid-template-columns: 1fr;
	}

	.scex-flowcolumns {
		column-count: 1;
	}

	.scex-section,
	.scex-card {
		padding: .85em;
	}
}

@media print {
	.scex-media video { display: none; }
	.scex-pagebreak { break-after: page; }
}

.sceditor-button-scexhr div { background-position: -96px 0 !important; }
.sceditor-button-scexselectend div { background-position: -112px 0 !important; }
.scex-import-status { padding: .5em; overflow-wrap: anywhere; }

.scex-table-wrap {
	margin: 1em 0;
	overflow-x: auto;
}

.scex-table {
	border-collapse: collapse;
	width: 100%;
}

.scex-table th,
.scex-table td {
	border: 1px solid #cbd5e0;
	padding: .45em .7em;
	vertical-align: top;
}

.scex-table th {
	background: #edf2f7;
	text-align: left;
}
