/*

File: teacher.css

Styles on teacher pages.

Sections:
	General
	...

*/

/*********************************************************/
/* General */
/*********************************************************/

/* TODO: Shouldn't this be in a master? */
#main-content ul,
#main-content ol {
	margin: 0;
}

.tch-left {
	float: left;
}

.tch-right {
	float: right;
}

.tch-clear {
	clear: both;
}

.tch-center {
	text-align: center;
}

.tch-one-line {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tch-relative {
	position: relative;
}

.tch-pointer {
	cursor: pointer;
}

/* List from http://stackoverflow.com/questions/2032652/ */
.tch-pre {
	font-family: Consolas, Monaco, Lucida Console, Liberation Mono,
		DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
}

.tch-noselect {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/*********************************************************/
/* Stuff that will make levans mad */
/*********************************************************/

#side-column .menu.open h1 {
	background-color: #1b365d;
}
#side-column .menu.open h1 a {
	color: #fff !important;
}

/* main.css inexplicably sets this to a different value at some window size,
which results in fail. */
.grid {
	letter-spacing: normal !important;
}

/*********************************************************/
/* Main containers */
/*********************************************************/

#tch-page {
	/* From http://css-tricks.com/snippets/css/better-helvetica/ */
	font-family: "Roboto", sans-serif;
	font-weight: 400;

	float: left;
	width: 982px;

	margin: 0 auto;
	position: relative;
	height: 100%;
}

.tch-narrow-notice {
	display: none;
}

/* Responsive design */

@media (max-width: 1270px) {
	#tch-page {
		width: 732px;
	}
}
@media (max-width: 1020px) {
	#tch-page {
		width: 642px;
	}
}
@media (max-width: 930px) {
	#tch-page {
		width: 552px;
	}
}
@media (max-width: 840px) {
	#tch-page {
		width: 100%;
	}
}
@media (max-width: 640px) {
	.tch-narrow-notice {
		display: block;
	}
}

/*********************************************************/
/* Intro */
/*********************************************************/

.tch-bottom-right-button {
	position: absolute;
	bottom: 16px;
	right: 16px;
}

.tch-bottom-right-button .btn {
	height: 30px;
	line-height: 30px;
	text-transform: uppercase;
}

.tch-get-started,
.tch-intro-bullet-head {
	color: #1b365d;
	font-size: 16pt;
	font-weight: bold;
}

.tch-get-started {
	width: -webkit-calc(100% - 200px);
	width: calc(100% - 200px);
}

.tch-intro-bullet {
	padding: 10px 0;
}
.tch-intro-bullet > div {
	display: inline-block;
}
.tch-intro-bullet-icon {
	width: 100px;
	text-align: center;
	vertical-align: top;
	padding-top: 5px;
}
.tch-intro-bullet-icon img {
	width: 50px;
	height: auto;
}
.tch-intro-bullet-main {
	width: 70%;
	width: -webkit-calc(100% - 130px);
	width: calc(100% - 130px); /* 100 + 2 * aops panel padding */
}

.tch-intro-footnote {
	margin-bottom: 20px;
}

@media (max-width: 1270px) {
	.tch-get-started {
		width: 500px;
	}
}
@media (max-width: 1020px) {
	.tch-get-started {
		width: 410px;
	}
}
@media (max-width: 930px) {
	.tch-get-started {
		width: 320px;
	}
}
@media (max-width: 840px) {
	.tch-get-started {
		width: -webkit-calc(100% - 200px);
		width: calc(100% - 200px);
	}
}
@media (max-width: 500px) {
	.tch-get-started {
		visibility: hidden;
		height: 40px;
	}
	.tch-intro-bullet-icon {
		width: 60px;
	}
	.tch-intro-bullet-main {
		width: 75%;
		width: -webkit-calc(100% - 90px);
		width: calc(100% - 90px); /* 60 + 2 * aops panel padding */
	}
}

/*********************************************************/
/* Teacher Registration */
/*********************************************************/

.tch-reg-input {
	margin: 8px 0;
}

.tch-reg-input label {
	display: inline-block;
	width: 150px;
	text-align: right;
}

.tch-reg-input input {
	width: 300px;
	border: 1px solid #ddd;
}

.tch-reg-input .tch--error {
	color: #bf1f1f;
	margin-left: 5px;
}

.tch-reg-main textarea {
	width: 100%;
	height: 100px;
	border: 1px solid #ddd;
}

.tch-login-wrapper {
	display: flex;
	width: 100%;
	justify-content: center;
}

.btn-link.tch-register-link {
	margin-left: 8px;
}

/*********************************************************/
/* Invite Course Modal */
/*********************************************************/

.tch-modal-invite-course {
	max-width: 400px;
}

.tch-modal-invite-course .tch--url {
	margin: 10px;
	padding: 10px 20px;
	border: 1px solid #ccc;
	border-radius: 8px;
	display: inline-block;
}

.tch-modal-invite-course .tch--print-note {
	margin: 10px;
	display: inline-block;
}
.tch-modal-invite-course .tch--print-note .aops-font {
	color: #1b365d;
}

/*********************************************************/
/* Invite General Modal */
/*********************************************************/

.tch-modal-invite-general {
	max-width: 400px;
}

.tch-modal-invite-general .tch--link {
	display: block;
	cursor: pointer;
}

/*********************************************************/
/* Add Course Modal */
/*********************************************************/

.tch-modal-add-course {
	width: 500px;
}

.tch-modal-add-course .tch--label {
	padding-left: 10px;
	margin-top: 10px;
}
.tch-modal-add-course .tch--label:first-child {
	margin-top: 0;
}

.tch-modal-add-course input[type="text"] {
	padding: 5px 10px;
	width: 100%;
}

.tch-modal-add-course .tch--sub-label {
	padding-left: 10px;
	color: #777;
	font-style: italic;
}

.tch-modal-add-course .tch--subject-radio {
	margin-left: 160px;
}

.tch-modal-add-course .tch--subject-help {
	color: #1b365d;
	cursor: pointer;
}

.tch-modal-add-course .tch--status {
	margin: 5px;
	color: #a00;
}

/*********************************************************/
/* Students */
/*********************************************************/

.tch-students h1 {
	display: inline-block;
}
.tch-students:not(.tch--show-inactive) .tch--is-inactive {
	display: none;
}

/*.tch-students-info {
	display: inline-block;
	font-size: 18pt;
	color: #1b365d;
}*/

.tch-students-left {
	float: left;
	width: 180px;
	margin-right: 4px;
}
.tch-students-right {
	float: left;
	width: 768px;
	overflow-x: hidden;
}

.tch-students-top-left,
.tch-students-top-right {
	position: relative;
	height: 180px;
}

.tch-students.tch--show-inactive .tch-students-top-left,
.tch-students.tch--show-inactive .tch-students-top-right {
	height: 200px;
}

/* Top left */

.tch-students-top-left .tch--invite,
.tch-students-top-left .tch--add,
.tch-students-top-left .tch--change-password {
	color: #1b365d;
	font-weight: bold;
	margin-bottom: 8px;
	cursor: pointer;
}

.tch-students-top-left .tch--inactive {
	/*position: absolute;
	top: 134px;*/
	width: 160px;
	margin: 8px 0;
	text-transform: uppercase;
}

.tch-students-top-left .tch-table-head {
	position: absolute;
	top: 160px;
	width: 100%;
	height: 18px;
	line-height: 18px;
	margin: 1px;

	background-color: #eee;
	color: #1b365d;
	font-size: 10pt;
	font-weight: bold;
	text-align: center;
}
.tch-students.tch--show-inactive .tch-students-top-left .tch-table-head {
	top: 180px;
}

.tch-students-top-left .tch-table-head > div {
	display: inline-block;
	overflow-x: hidden;
	width: 85px;
	margin-right: 5px;
}

/* Bottom left */

.tch-students-bottom-left .tch--row {
	color: #1b365d;
	font-size: 10pt;
	line-height: 20px;
	height: 20px;
}

.tch-students-bottom-left .tch--row > div {
	display: inline-block;
	width: 90px;
	overflow: hidden;
}
.tch-students-bottom-left .tch--row > div:last-child {
	color: #888;
}
.tch-students-bottom-left .tch--row.tch--is-inactive > div:first-child {
	opacity: 0.5;
}

/* Top right */

.tch-students-top-right .aops-scroll-outer {
	width: 100%;
	height: 180px;
}
.tch-students-top-right .aops-scroll-inner {
	width: 100%;
	height: 200px;
}
.tch-students-top-right .aops-scroll-content {
	position: relative;
	float: left;
	white-space: nowrap;
	height: 180px;
}
.tch-students-top-right .aops-scroll-bar {
	position: absolute;
	top: 165px;
	left: 0;
	width: 100%;
	height: 10px;
}
.tch-students-top-right .aops-scroll-slider {
	height: 10px;
}

.tch-students.tch--show-inactive .tch-students-top-right .aops-scroll-inner {
	height: 220px;
}
.tch-students.tch--show-inactive .tch-students-top-right .aops-scroll-outer,
.tch-students.tch--show-inactive .tch-students-top-right .aops-scroll-content {
	height: 200px;
}
.tch-students.tch--show-inactive .tch-students-top-right .aops-scroll-bar {
	top: 185px;
}

.tch-students-top-right .tch--col {
	height: 160px;
	width: 60px;
	margin: 1px;

	display: inline-block;
	white-space: normal;
	vertical-align: top;
}
.tch-students.tch--show-inactive .tch-students-top-right .tch--col {
	height: 180px;
}

.tch-students-top-right .tch--col .tch--col-label {
	-webkit-transform: rotate(270deg);
	-webkit-transform-origin: left top;
	-moz-transform: rotate(270deg);
	-moz-transform-origin: left top;
	-ms-transform: rotate(270deg);
	-ms-transform-origin: left top;
	-o-transform: rotate(270deg);
	-o-transform-origin: left top;
	transform: rotate(270deg);
	transform-origin: left top;

	position: relative;
	top: 160px;
	background-color: #777;
	color: #fff;
	font-weight: bold;
	/* Note that these dimensions get transformed */
	width: 160px;
	height: 60px;
	line-height: 16px;
	padding: 6px 12px;
}
.tch-students-top-right .tch--col.tch--is-inactive .tch--col-label {
	background-color: #999;
}

.tch-students-top-right .tch--col .tch--col-active {
	display: none;
	position: relative;
	top: 100px; /* transform nonsense; label width - label height = 160 - 60 */

	height: 16px;
	width: 16px;
	margin: 2px auto;
	border: 1px solid #777;
	border-radius: 8px;
}
.tch-students.tch--show-inactive
	.tch-students-top-right
	.tch--col
	.tch--col-active {
	display: block;
}

.tch-students-top-right .tch--col .tch--active-button {
	margin: 2px;
	height: 10px;
	width: 10px;
	border-radius: 5px;
}
.tch-students-top-right .tch--col .tch--active-button.tch--is-set {
	background-color: #1b365d;
}

/* Bottom right */

.tch-students-bottom-right {
	overflow: hidden;
}

.tch-students-bottom-right-inner-scroll {
	position: relative;
	float: left;
	white-space: nowrap;
}

.tch-students-bottom-right .tch--row {
	height: 20px;
}

.tch-students-bottom-right .tch--cell {
	width: 60px;
	height: 18px;
	line-height: 18px;
	margin: 1px;
	background-color: #ccc;

	display: inline-block;
	white-space: normal;
}
.tch-students-bottom-right .tch--row.tch--is-inactive .tch--cell {
	background-color: #eee;
}
.tch-students-bottom-right .tch--cell.tch--is-inactive {
	background-color: #eee;
}

.tch-students-bottom-right .tch--active-button {
	width: 18px;
	height: 18px;
	border: 1px solid #777;
	margin: auto;

	background-color: #fff;
}
.tch-students-bottom-right .tch--active-button.tch--is-set {
	background-color: #6ab53f;
}

/* Responsive Design */

@media (max-width: 1270px) {
	.tch-students-right {
		width: 516px;
	}
}
@media (max-width: 1020px) {
	.tch-students-right {
		width: 426px;
	}
}
@media (max-width: 930px) {
	.tch-students-right {
		width: 336px;
	}
}
@media (max-width: 840px) {
	.tch-students-right {
		width: -webkit-calc(100% - 186px);
		width: calc(100% - 186px);
	}
}

/*********************************************************/
/* Courses */
/*********************************************************/

.tch-course h1 {
	display: inline-block;
	margin: 0;
}
.tch-course .tch-course-head a {
	font-size: 18pt;
}

/* Used in no-students version of page */

.tch-course .tch--invite.tch--link {
	color: #1b365d;
	font-weight: bold;
	padding: 5px 0;
	cursor: pointer;
}

/* Layout */

.tch-course-left {
	float: left;
	width: 180px;
	margin-right: 4px;
}
.tch-course-right {
	float: left;
	width: 768px;
	overflow-x: hidden;
}

.tch-course-top-left,
.tch-course-top-right {
	position: relative;
	height: 180px;
}

/* Top left */

.tch-course-top-left .tch--body {
	display: inline-block;
	max-width: 160px;
	line-height: 22px;

	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tch-course-top-left .tch--change {
	display: inline-block;
	line-height: 22px;
	vertical-align: top;
	color: #1b365d;
	cursor: pointer;
}

.tch-course-top-left .tch--name {
	font-size: 14pt;
	color: #1b365d;
}
.tch-course-top-left .tch--name .tch--body {
	font-weight: bold;
}
.tch-course-top-left .tch--subject {
	font-size: 14pt;
	color: #1b365d;
}
.tch-course-top-left .tch--description {
	font-size: 14pt;
	color: #777;
}

.tch-course-top-left .tch--invite.btn {
	position: absolute;
	top: 134px;
	width: 180px;
	text-transform: uppercase;
}

.tch-course-top-left .tch-table-head {
	position: absolute;
	top: 160px;
	width: 100%;
	height: 18px;
	line-height: 18px;
	margin: 1px;

	background-color: #eee;
	color: #1b365d;
	font-size: 10pt;
	font-weight: bold;
	text-align: center;
}

.tch-course-top-left .tch-table-head > div {
	display: inline-block;
	width: 90px;
	cursor: pointer;
}

/* Bottom left */

.tch-course-bottom-left .tch--row {
	color: #1b365d;
	font-size: 10pt;
	line-height: 20px;
	height: 20px;
}

.tch-course-bottom-left .tch--row > div {
	display: inline-block;
	width: 90px;
	overflow-x: hidden;
	white-space: nowrap;
}
.tch-course-bottom-left .tch--row > div:last-child {
	color: #888;
	white-space: nowrap;
}

/* Top right */

.tch-course-top-right .aops-scroll-outer {
	width: 100%;
	height: 180px;
}
.tch-course-top-right .aops-scroll-inner {
	width: 100%;
	height: 200px;
}
.tch-course-top-right .aops-scroll-content {
	position: relative;
	float: left;
	white-space: nowrap;
	height: 180px;
}
.tch-course-top-right .aops-scroll-bar {
	position: absolute;
	top: 165px;
	left: 0;
	width: 100%;
	height: 10px;
}
.tch-course-top-right .aops-scroll-slider {
	height: 10px;
}

.tch-course-top-right .tch--col {
	height: 160px;
	width: 40px;
	margin: 1px;

	display: inline-block;
	white-space: normal;
	vertical-align: top;

	cursor: pointer;
}

.tch-course-top-right .tch--col .tch--col-label {
	-webkit-transform: rotate(270deg);
	-webkit-transform-origin: left top;
	-moz-transform: rotate(270deg);
	-moz-transform-origin: left top;
	-ms-transform: rotate(270deg);
	-ms-transform-origin: left top;
	-o-transform: rotate(270deg);
	-o-transform-origin: left top;
	transform: rotate(270deg);
	transform-origin: left top;

	position: relative;
	top: 160px;
	background-color: #1b365d;
	color: #fff;
	font-weight: bold;
	/* Note that these dimensions get transformed */
	width: 160px;
	height: 40px;
	line-height: 16px;
	padding: 6px 12px;
}
.tch-course-top-right .tch--col .tch--col-label:hover {
	background-color: #135b7b;
}

/* Bottom right */

.tch-course-bottom-right {
	overflow: hidden;
}

.tch-course-bottom-right-inner-scroll {
	position: relative;
	float: left;
	white-space: nowrap;
}

.tch-course-bottom-right .tch--row {
	height: 20px;
}

.tch-course-bottom-right .tch--cell {
	width: 40px;
	height: 18px;
	line-height: 18px;
	margin: 1px;

	display: inline-block;
	white-space: normal;
	vertical-align: top;

	text-align: center;
	color: #fff;
	font-weight: bold;
	font-size: 9pt;
}
.tch-course-bottom-right .tch--cell.aops-rogb-inactive {
	background-color: #ccc;
}

/* Responsive Design */

@media (max-width: 1270px) {
	.tch-course-right {
		width: 516px;
	}
}
@media (max-width: 1020px) {
	.tch-course-right {
		width: 426px;
	}
}
@media (max-width: 930px) {
	.tch-course-right {
		width: 336px;
	}
}
@media (max-width: 840px) {
	.tch-course-right {
		width: -webkit-calc(100% - 186px);
		width: calc(100% - 186px);
	}
}

/*********************************************************/
/* Courses Tooltip */
/*********************************************************/

/* Largely copied from AoPS 2 */

.tch-progress-detail {
	position: absolute;
	z-index: 500;

	height: 60px;
	border: 1px #aaa solid;
	border-radius: 4px;
	padding: 4px 8px;

	background-color: #fff;
	font-size: 10pt;
}

.tch-progress-detail-left {
	width: 80px;
	float: left;
	height: 100%;
	position: relative;
	overflow: hidden;
	z-index: 1;
}

.tch-progress-detail-right {
	height: 45px;
	width: 25px;
	position: relative;
	margin-left: 85px;
	z-index: 100;
}

.tch-progress-detail .tch--username {
	color: #006093;
	font-weight: bold;
	white-space: nowrap;
}

.tch-progress-detail .tch--topic {
	color: #444;
	font-size: 8pt;
	font-style: italic;
	padding-top: 2px;
	height: 40px;
	overflow: hidden;
}

.tch-progress-detail .tch--correct,
.tch-progress-detail .tch--total {
	text-align: center;
	color: #fff;
	font-style: bold;
}
.tch-progress-detail .tch--correct {
	padding-top: 4px;
}
.tch-progress-detail .tch--divider {
	margin-left: auto;
	margin-right: auto;
	width: 20px;
	height: 2px;
	background-color: #fff;
}

.tch-progress-detail .tch--triangle {
	clear: left;
	width: 0;
	height: 0;
}
.tch-progress-detail .tch--triangle-left {
	border-top: 10px solid white;
	border-bottom: 10px solid transparent;
	border-right: 10px solid white;
	-ms-transform: translate(-3.5px, 3px) rotate(45deg);
	-ms-transform-origin: right top;
	-webkit-transform: translate(-3.5px, 3px) rotate(45deg);
	-webkit-transform-origin: right top;
	-moz-transform: translate(-3.5px, 3px) rotate(45deg);
	-moz-transform-origin: right top;
	-o-transform: translate(-3.5px, 3px) rotate(45deg);
	-o-transform-origin: right top;
	transform: translate(-3.5px, 3px) rotate(45deg);
	transform-origin: right top;
}
.tch-progress-detail .tch--triangle-right {
	position: relative;
	border-top: 10px solid white;
	border-bottom: 10px solid transparent;
	border-left: 10px solid white;
	float: right;
	-ms-transform: translate(9px, -5px) rotate(-45deg);
	-ms-transform-origin: center;
	-webkit-transform: translate(9px, -5px) rotate(-45deg);
	-webkit-transform-origin: center;
	-moz-transform: translate(9px, -5px) rotate(-45deg);
	-moz-transform-origin: center;
	-o-transform: translate(9px, -5px) rotate(-45deg);
	-o-transform-origin: center;
	transform: translate(9px, -5px) rotate(-45deg);
	transform-origin: center;
}
