div#document-container {
	min-height: 400px;
	max-height: 400px;
	overflow: auto;
	border: 1px solid #888;
	-moz-box-shadow: 0 0 5px #888;
	-webkit-box-shadow: 0 0 5px#888;
	box-shadow: 0 0 5px #888;
}

div#document, body#tinymce {
	padding: 1cm;
	background-color: #fff;
	font-family: Arial, sans-serif;
}

div#document *, body#tinymce * {
	font-family: Arial, sans-serif;
}

div#documentA4 {
	-moz-transform: scale(0.5);
	-moz-transform-origin: 1em 1em;
	width: 210mm;
	height: 297mm;
	border: 1px solid #888;
	padding: 2cm;
	background-color: #fff;
	margin: 1em auto;
}

div#document div#compare-left {
	border-right:1px solid #444444;
	margin:5px 0 5px 5px;
	width:420px;
	padding:8px 12px 8px 0;
	float:left;
}

div#document div#compare-right {
	border-left:1px solid #444444;
	margin:5px 5px 5px -1px;
	width:420px;
	padding:8px 0 8px 12px;
	float:left;
}

div#document div#compare-left h3, div#document div#compare-right h3 {
	border-bottom:1px solid #444444;
}

table.qualunit {
	border-width: 0 0 1px 1px;
	border-spacing: 0;
	border-collapse: collapse;
	width: 100%;
	margin-bottom: 2em;
}

table.qualunit tr {
	width: 100%;
	font-size: 12pt;
}

table.qualunit th {
	background-color: #9cf;
	padding: 0.5em;
	border: 1px solid black;
	text-align: left;
	font-size: 80%;
	vertical-align: top;
}

table.qualunit td {
	padding: 0.5em;
	border: 1px solid black;
	background-color: #fff;
	font-size: 10pt;
	vertical-align: top;
	max-width: 50%;
	width: 50%;
}

table.qualunit.outcomes {
	counter-reset: learningoutcome 0 assessmentcriteria 0;
}

table.qualunit.outcomes td {
	padding-left: 20px;
}

table.qualunit.outcomes tr {
	counter-reset: assessmentcriteria;
}

table.qualunit.outcomes tr td:first-child p:first-child:before {
	counter-increment: learningoutcome;
	content: counter(learningoutcome);
	position: relative;
	left: -16px;
	top: 0px;
}

table.qualunit.outcomes tr td:nth-child(2) p:before {
	counter-increment: assessmentcriteria;
	content: counter(learningoutcome) "." counter(assessmentcriteria);
	position: relative;
	left: -16px;
	top: 0px;
}

div#document ol[type="a"] {
	list-style: lower-alpha;
}

/* Editor-only input hints; classes are injected at runtime in TinyMCE. */
.rf-input-meta-target {
	outline: 1px dashed #2b6cb0;
	outline-offset: 1px;
}

.rf-input-meta-label {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border: 1px solid #2b6cb0;
	border-radius: 3px;
	background: #ebf4ff;
	color: #1a365d;
	font-size: 11px;
	font-family: "Courier New", monospace;
	line-height: 1.3;
	white-space: nowrap;
	vertical-align: middle;
	pointer-events: auto;
}

/* Generated question blocks used by editor form tools. */
.rf-question-table {
	border-collapse: collapse;
	width: 100%;
	margin: 12px 0;
	border: 1px solid #cfd8e3;
	background: #fff;
	font-size: 14px;
}

.rf-question-table th,
.rf-question-table td {
	border: 1px solid #d7dee8;
	padding: 8px 10px;
	vertical-align: middle;
}

.rf-question-table thead th,
.rf-question-table > tbody > tr:first-child > th {
	background: #edf4fb;
	color: #1f3650;
	font-weight: 600;
	text-align: left;
}

.rf-question-choice td:first-child,
.rf-question-matrix td {
	text-align: center;
	width: 56px;
}

.rf-question-matrix th:first-child,
.rf-question-choice td:last-child {
	text-align: left;
}

.rf-question-matrix tbody tr:nth-child(odd) th,
.rf-question-matrix tbody tr:nth-child(odd) td {
	background: #fcfdff;
}

.rf-question-matrix tbody tr:nth-child(even) th,
.rf-question-matrix tbody tr:nth-child(even) td {
	background: #f5f9ff;
}

.rf-question-table input[type="radio"],
.rf-question-table input[type="checkbox"] {
	transform: scale(1.1);
	margin: 0;
}

body#tinymce .rf-question-table tr:hover td,
body#tinymce .rf-question-table tr:hover th {
	background: #f7fbff;
}

/* Required form fields - highlighted wherever the form is rendered,
   based on the standard HTML "required" attribute. A tooltip is added
   via the title attribute at runtime. Scoped to the TinyMCE editor
   iframe (body#tinymce) and the public page's rendered document
   content (#document-content, see collab/view_html.html and
   view_raw.html) specifically - document.css is also linked from the
   general admin app shell for unrelated pages, and from collab/base.html
   for the page chrome around the document (nav, comment box), neither
   of which should get this highlight for their own required fields. */
body#tinymce input:required,
body#tinymce textarea:required,
body#tinymce select:required,
#document-content input:required,
#document-content textarea:required,
#document-content select:required {
	outline: 2px solid #c0392b;
	outline-offset: 1px;
	background-color: #fff5f5;
}

body#tinymce input[type="radio"]:required,
body#tinymce input[type="checkbox"]:required,
#document-content input[type="radio"]:required,
#document-content input[type="checkbox"]:required {
	outline-offset: 2px;
}

/* Conditional content box target (public_site/static/js/collab.js
   ".cond.select" / "data-cond-select" feature). In the editor this
   box is outlined and labelled so it's easy to find and edit; on the
   public site it renders as a plain div that is shown/hidden by JS. */
body#tinymce .cond-target {
	display: block;
	margin: 8px 0;
	padding: 10px 12px;
	border: 1px dashed #7a5c00;
	background: #fffaf0;
}

body#tinymce .cond-target::before {
	content: "Conditional content (id: " attr(id) ")";
	display: block;
	margin-bottom: 6px;
	color: #7a5c00;
	font-size: 11px;
	font-family: "Courier New", monospace;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Dynamic response box (dynresp feature). Like .cond-target, this is
   outlined in the editor only; the identifying label is a real
   element inserted/removed at runtime (knockout-binding-editor.js),
   not CSS content, because it doubles as the click target that opens
   the edit dialog. */
body#tinymce .dynresp {
	display: block;
	margin: 8px 0;
	padding: 10px 12px;
	border: 1px dashed #2c5f8a;
	background: #eef6fb;
}

.rf-dynresp-label {
	display: block;
	width: fit-content;
	margin-bottom: 6px;
	padding: 1px 6px;
	border: 1px solid #2c5f8a;
	border-radius: 3px;
	background: #dceefb;
	color: #1c3f5c;
	font-size: 11px;
	font-family: "Courier New", monospace;
	line-height: 1.3;
}