/* Styles for content saved by the rich text editor. Loaded on every page, and inside CKEditor.
   Everything is scoped to rt- classes so content made before this editor is unaffected. */

img.rt-img{
	max-width: 100%;
	height: auto !important;
}

img.rt-left{
	float: left;
	margin: 4px 18px 10px 0;
}

img.rt-right{
	float: right;
	margin: 4px 0 10px 18px;
}

img.rt-center{
	display: block;
	margin: 10px auto;
}

table.rt-table{
	max-width: 100%;
	margin: 10px 0;
	border-collapse: collapse;
}

table.rt-table td,
table.rt-table th{
	min-width: 32px;
	padding: 6px 9px;
	border: 1px solid #999;
	vertical-align: top;
	overflow-wrap: break-word;
}

table.rt-table th{
	background-color: #eee;
	color: #222;
	font-weight: bold;
}

/* Layout tables that had no borders where they were copied from */
table.rt-plain td,
table.rt-plain th{
	border-color: transparent;
}

table.rt-table td > :last-child,
table.rt-table th > :last-child{
	margin-bottom: 0;
}

@media (max-width: 600px){
	table.rt-table{
		display: block;
		overflow-x: auto;
	}

	img.rt-left,
	img.rt-right{
		float: none;
		display: block;
		margin: 10px auto;
	}
}

a.rt-video,
.rt-player{
	display: block;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 720px;
	aspect-ratio: 16 / 9;
	margin: 14px auto;
	border: 0;
	border-radius: 8px;
	overflow: hidden;
	background-color: #222;
}

a.rt-video{
	color: white !important;
	font-size: 16px;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

a.rt-video img{
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
}

/* Play button */
a.rt-video::before{
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 78px;
	height: 54px;
	transform: translate(-50%, -50%);
	border-radius: 12px;
	background-color: rgba(153, 0, 0, 0.9);
}

a.rt-video::after{
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-38%, -50%);
	border-top: 13px solid transparent;
	border-bottom: 13px solid transparent;
	border-left: 22px solid white;
}
