/* 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: 2/1;
	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;
}

/* Use flexbox to align the two sections side by side */
.son-home-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px; /* Add some space between the columns */
}
/* Remove bullets from the .son-home-buttons list */
.son-home-buttons {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Style the buttons to match the original look */
.son-home-buttons a {
    display: block;
    padding: 10px;
    width: 100%;
    margin-bottom: 0.4em;
    text-align: center;
    background-color: #f5f5f5; /* Lighter background color, closer to original */
    color: #000; /* Darker text color */
    border-radius: 5px; /* Rounded corners */
    border: 1px solid #c0c0c0; /* Slightly more defined border */
    text-decoration: none !important; /* Ensure no underline */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Slightly more defined shadow */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effect */
}

/* Ensure text-decoration is removed on all states */
.son-home-buttons a:hover,
.son-home-buttons a:focus,
.son-home-buttons a:active {
    text-decoration: none !important; /* Remove underline in all states */
    background-color: #e6e6e6; /* Slightly darker background on hover */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15); /* Slightly deeper shadow on hover */
}

/* Add padding inside the quick links container */
.quick-links-container {
    padding: 10px 20px; /* Add padding for cleaner look */
    border: 1px solid #000;
}

/* More compact quick links */
.quick-links {
    padding-left: 20px;
    list-style-type: disc;
    margin: 0; /* Remove default margin */
    line-height: 1.2em; /* Compact line spacing */
}

.quick-links li {
    margin-bottom: 0.3em; /* Reduce space between items */
}

.quick-links a.quick-link {
    font-size: 10pt;
    color: var(--ic-brand-font-color-dark);
    text-decoration: none;
}

.quick-links a.quick-link:hover {
    text-decoration: underline; /* Optional underline on hover */
}

/* Typography */
.quick-links-container p {
    font-size: 12pt;
    color: #000000;
    font-weight: bold;
}



/* 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; }
}

.son-hide {
	visibility: hidden;
}