/* COLOR VARIABLE DEFINITIONS: Conforms to UCDH Color Treatments 
https://health.ucdavis.edu/graphicstandards/fonts-colors/index.html */
/* COLOR variabls for use in this CSS file only. */
:root {
	/* Primary */
	--aggie-blue-100: rgba(2, 40, 81, 1);
	--aggie-blue-80: rgba(2, 40, 81, 0.8);
	--aggie-blue-50: rgba(2, 40, 81, 0.5);

	--aggie-gold-100: rgba(255, 191, 0, 1);
	--aggie-gold-80: rgba(255, 191, 0, 0.8);
	--aggie-gold-50: rgba(255, 191, 0, 0.5);

	/* Secondary */
	--orange-100: rgba(241,138,0, 1);
	--orange-80: rgba(241,138,0, 0.8);
	--orange-50: rgba(241,138,0, 0.5);
	
	--blue-100: rgba(0, 142, 170, 1);
	--blue-80: rgba(0, 142, 170, 0.8);
	--blue-50: rgba(0, 142, 170, 0.5);
	
	--violet-100: rgba(118, 35, 108, 1);
	--violet-80: rgba(118, 35, 108, 0.8);
	--violet-50: rgba(118, 35, 108, 0.5);
	
	--green-100: rgba(61,174, 43, 1);
	--green-80: rgba(61,174, 43, 0.8);
	--green-50: rgba(61,174, 43, 0.5);
	
	--red-100: rgba(193, 2, 48, 1);
	--red-80: rgba(193, 2, 48, 0.8);
	--red-50: rgba(193, 2, 48, 0.5);
	
	--gray-100: rgba(179, 179, 179, 1);
	--gray-80: rgba(179, 179, 179, 0.8);
	--gray-50: rgba(179, 179, 179, 0.5);
	--gray-20: rgba(179, 179, 179, 0.2);
	
	/* Reduce brightness */
	--black-50: rgba(0,0,0, 0.50);
	--black-20: rgba(0,0,0, 0.20);

	/* No color */
	--clear: rgba(255,255,255, 0.0);

}


/* CANVAS HOME PAGE TWEAKS: Changes to standard Canvas elements to improve UI */
/* Reduce font size of announcements on home page. */
div#announcements_on_home_page * {
	font-size: .9rem;
}


/* SON HOME PAGE (piloting): A responsive, compliant, accessible home page for use by all SON courses */
/* HEADER CONTAINER */
.son-home-top {
	width: 100%;
	margin-left: 8px;
	border-radius: 4px;
	box-shadow: 0 0 8px #777;
}
/* Text styling for child elements of HEADER CONTAINER */
.son-course-title p { /* All paragraph text */
	text-align: center;
	display: inline-block;
}
.son-course-name { /* Title of course */
	font-size: 1.6rem;
	line-height: 1.8em;
	max-height: 3.6em;
	font-weight: 600;
	color: white;
	text-transform: uppercase;
	margin-left: 8px;
	text-shadow: 0 0 4px #000;
	word-wrap: break-word;
	overflow: hidden;
}
.son-course-welcome { /* Welcome text */
	font-weight: 400;
	font-size:1.3rem;
	color: white;
	text-shadow: 0 0 3px #000;
}
/* Styling for HEADER CONTAINER */
.son-overlay {
	height:240px;
	top:0;
	width: calc(100% - 12px);
	margin: 6px;
	border-radius: 4px;
	background-image: linear-gradient(225deg,  var(--blue-50), var(--blue-80));
	background-position: center center;
	position: absolute;
	overflow: hidden;
	justify-content: center;
}
.son-overlay .context-box {
	align-content:center;
}
.son-home-top>img {
	opacity: 1;
	object-fit: cover;
	height:240px;
	margin: 6px;
	width: calc(100% - 12px);
	overflow: hidden;
	border-radius: 4px;
	animation: fadein 4s;
}


/* COLOR options for HEADER CONTAINER */
/* Preferred */
.son-overlay.black{
	background-image: linear-gradient(225deg,  var(--black-20), var(--black-50));
}


/* Other Options */
.son-overlay.orange{
	background-image: linear-gradient(225deg,  var(--orange-50), var(--orange-80));
}
.son-overlay.blue{
	background-image: linear-gradient(225deg,  var(--blue-50), var(--blue-80));
}
.son-overlay.violet{
	background-image: linear-gradient(225deg,  var(--violet-50), var(--violet-80));
}
.son-overlay.green{
	background-image: linear-gradient(225deg,  var(--green-50), var(--green-80));
}
.son-overlay.red{
	background-image: linear-gradient(225deg,  var(--red-50), var(--red-80));
}
.son-overlay.gray{
	background-image: linear-gradient(225deg,  var(--gray-20), var(--gray-50));
}
.son-overlay.clear{
	background-image: linear-gradient(225deg,  var(--clear), var(--clear));
}


/* COURSE INFORMATION: Contains instructor profile image, links, credentials, and a message from the instructor(s) */
/* Circular profile photo */
.son-bio {
	align-items: center;
	align-content: middle;
	background-color: #fff;
	margin: 3px 0 3px 0;
}
.son-bio > br {
	display: none;
}
.son-bio-container {
	margin: auto 12px auto 12px;
}
.son-bio p {
	display: block;
	font-size: .9em;
}
.son-bio > img {
	align-self: auto;
	max-width: 80px;
	max-height: 80px;
	aspect-ratio: 1/1;
	border-radius: 50%;
	object-fit: cover;
	float: left;
	margin: 0 10px 10px 10px;
}
.son-course-note {
	max-height: 6em;
	line-height: 1.5em;
	overflow:auto;
	padding-right: 4px;
}
.son-jump-down {
	color: rgb(255,255,255);
	text-shadow: 0 0 3px #000;
	user-select:none;
	height: 50px;
}
.son-jump-down:hover {
	cursor: pointer;
}
.son-unread-count {
	margin-left:3px;
	color: black;
}

/* CARD MENU: Contains card links to different course links*/
/* Extra spacing near cards */

.son-home-bottom {
	width:100%;
}


/* Card styling and animations*/
.son-home-card:hover {
	animation: cardhover .2s;
	box-shadow: 0 0 8px #333;
}
.son-home-card {
	border-radius: 4px;
	aspect-ratio: auto;  /* has been giving trouble in the past, may not be needed */
	animation: cardunhover .2s;
	box-shadow: 0 0 8px #777;
	background-color: rgb(96, 96, 96);
	background-image: linear-gradient(225deg,  var(--blue-80), var(--blue-100));
	border: none;
	color: #ffffff;
	text-shadow: 0 0 2px #000;
	font-weight: bold;
	position: relative;
	box-sizing: border-box;
}
#son-home-links div {
	padding: 3px;
}
#son-home-links {
	width: 100%;
	margin-left: 8px;
}
.son-home-card:before {
	content:"";
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-size: 24px;
	right: -30px;	
	color: rgba(255, 255, 255);
	transition: right 100ms ease, color 100ms ease-in;
	text-shadow: 0 0 2px rgb(34, 34, 34);
}
.son-home-card:hover:before {
	color: rgba(255, 255, 255);
	right: 16px;
}


/* COLOR options for cards */
.son-home-card.orange {
	background-image: linear-gradient(225deg,  var(--orange-80), var(--orange-100));
	background-color: rgb(0, 0, 0);
}
.son-home-card.blue {
	background-image: linear-gradient(225deg,  var(--blue-80), var(--blue-100));
}
.son-home-card.violet {
	background-image: linear-gradient(225deg,  var(--violet-80), var(--violet-100));
}
.son-home-card.green {
	background-image: linear-gradient(225deg,  var(--green-80), var(--green-100));
	background-color: rgb(0, 0, 0);
}
.son-home-card.red {
	background-image: linear-gradient(225deg,  var(--red-80), var(--red-100));
}
.son-home-card.gray {
	background-image: linear-gradient(225deg,  var(--gray-20), var(--gray-30));
}
.son-home-card.navy {
	background-image: linear-gradient(225deg,  var(--aggie-blue-80), var(--aggie-blue-100));
}
.son-home-card.gold {
	background-image: linear-gradient(225deg,  var(--aggie-gold-80), var(--aggie-gold-100));
	background-color: rgb(0, 0, 0);
}


/* Text styling for cards */
.son-home-card a span {
	display: inline-block;
	text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
	margin: 3px auto 0 auto;
	padding: auto 2px auto 1px;
	width: 100%;
}

/* Remove all styling from anchors */
.son-home-card a:link,
.son-home-card a:visited,
.son-home-card a:hover,
.son-home-card a:active ,
.son-home-card a:hover span {
	text-decoration: none !important;
	color: white;
	font-weight: 700;
}


/* Card image uniform design */
.son-home-card img {
	display: block;
	margin: 0 auto 0 auto;
	object-fit: cover;
	aspect-ratio: 2/1; /* See TEMPORARY compatibility issue with Firefox ESR */
	border-radius: 4px;
}
.son-home-card br {
	display: none;
}
#son-unread-count {
	background-color: rgba(0,0,0,.1);
	visibility:hidden;
	color:rgba(0,0,0,.2);
	font-size: .7em;
	min-width: 10px;
	min-height: 10px;
	font-weight: 700;
	padding: 0 2px;
	display: flex;
	float: right;
	align-items: center;
	justify-content: center;
	border-radius: 2px;
	border: 1px solid rgba(0,0,0,.2);
	text-shadow: none !important;
}


/* TEMPORARY */
/* Remove when UCDH Firefox updated to version 89, sometime after Dec. 2021 */
@supports not (aspect-ratio: 2/1) {
	.son-home-card img {
		max-height: 150px;
	}
}



/* ANIMATIONS */
/* Banner image fade-in to make page loading smoother */
@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}


/* Shading changes when hovering over a card */
@keyframes cardhover {
    from { box-shadow: 0 0 8px #777; }
    to   { box-shadow: 0 0 8px #333; }
}
@keyframes cardunhover {
    from { box-shadow: 0 0 8px #333; }
    to   { box-shadow: 0 0 8px #777; }
}
#course_home_content > #wiki_page_show > div.header-bar-outer-container {
	display: none;
}

/* Hide header bar and page title only for Badge Buddy */
body.context-course_1034856 #wiki_page_show .header-bar-outer-container > div.sticky-toolbar > div > div.page-toolbar-start {
	display: none;
}

body.context-course_1034856 #wiki_page_show .show-content.user_content.clearfix.enhanced > h1.page-title {
  display: none;
}

body.context-course_1034856 #mobile-header {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

body.context-course_1034856.pages.show #wiki_page_show .header-bar-outer-container {
	display: none !important;
}

.son-hide {
	visibility: hidden;
}