/**
 * Custom CSS for Funnelback auto-completion and search results
 *
 * This file is in version control:
 * https://github.com/uofa/global-environment
 *
 * Created 29 Jun 2018
 * Updated 20 Apr 2022
 *
 * Last update: fix focus style on global search box, AB.
 *
 * @author Liliana Nowak
 * @author Allan A Beattie
 * @author Colin Denholm
 */


.twitter-typeahead {
	display: table-cell !important;
}

.tt-menu {
	background-clip: padding-box;
	background-color: #fff;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176);
	font-size: 14px;
	padding-bottom: 5px;
	width: 100%;
}

.tt-menu .tt-suggestion {
	clear: both;
	color: #333;
	cursor: pointer;
	display: block;
	font-weight: normal;
	line-height: 1.42857;
	padding: 3px 10px;
	text-align: left;
}

.tt-menu .tt-suggestion:hover,
.tt-menu .tt-cursor {
	background-color: #428bca;
	color: #fff;
	text-decoration: none;
}

.tt-menu .tt-category,
.tt-menu .tt-group {
	background-color: #f5f5f5;
	border-bottom: 1px solid #ddd;
	border-top: 1px solid #ddd;
}

.tt-menu .tt-category {
	margin: 3px 0;
	padding: 7px 5px;
}

.tt-menu .tt-dataset:first-child .tt-category,
.tt-horizontal .tt-dataset .tt-category {
	border-top: none;
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	margin-top: 0;
}

.tt-menu .tt-group {
	padding: 3px 5px;
	text-align: center;
}

.tt-menu .tt-group:first-of-type {
	border-top: none;
}

.tt-horizontal {
	width: 100%;
}

.tt-horizontal .tt-dataset {
	float: left;
	width: 100%;
}

.tt-scrollable {
	overflow-y: auto;
	max-height: 460px;
}

.tt-hint {
	color: #ccc !important;
}

.tt-menu {
	border-radius: 0 0 0.3em 0.3em !important;
}


/* global toggleable search
------------------------------------------------------------ */

#global_search fieldset {
	overflow: inherit;
}

#global_search .twitter-typeahead {
	display: block !important;
	float: left;
	width: 80%;
}

#global_search #query.tt-input {
	width: 100%;
}

#global_search .tt-menu {
	width: 100%;
	width: calc(100% + 1px);
	border-color: #e5e5e5;
	border-width: 1px;
	border-top: 0;
}


/* hero search box
------------------------------------------------------------ */

.hero_search .twitter-typeahead {
	float: left;
	width: 85%;
}

.hero_search .twitter-typeahead input {
	width: 100%;
}

.hero_search .tt-menu {
	margin-top: -0.6em;
	padding-top: 0.6em;
	border: 0;
	box-shadow: 0 0.5em 0.6em rgba(0, 0, 0, 0.3);
}

.hero_search {
    background: var(--abdn-primary-highlight, #365594);
    margin: -1em 0 0;
    padding: 2em 0 5em;
}

.hero_search form,
.hero_search form * {
	box-sizing: border-box;
}

.hero_search fieldset {
	border: 0;
	font-size: 1.5em;
	margin: 0;
	padding: 0;
}

.hero_search legend {
	color: #fff;
	font-size: 1.6em;
	font-weight: 300;
	margin: 0 0 0.1em;
	text-transform: uppercase;
}

.hero_search input {
	border-radius: 0.2em 0 0 0.2em;
	border: 0;
	font-size: 1.5em;
	padding: 0.5em;
	width: 85%;
}

.hero_search button {
	background: var(--abdn-secondary, #ffca00);
	border-radius: 0 0.2em 0.2em 0;
	border: 0;
	font-size: 1.5em;
	padding: 0.5em 0;
	width: 15%;
}

/* search results
------------------------------------------------------------ */

.search_results {
	margin: 0;
	padding: 0;
	list-style: none;
}

.search_results h3 {
	margin-top: 0;
	margin-bottom: 0.3em;
	font-size: 1.2em;
}

.search_results a {
	position: relative;
}


/* links with icons
------------------------------------------------------------ */

.search_results cite[data-url*=".doc"] a::after,
.search_results cite[data-url*=".pdf"] a::after,
.search_results cite[data-url*='.ppt'] a::after,
.search_results cite[data-url*='.xls'] a::after,
.search_results cite[data-url$='rss.xml'] a::after {
	display: inline-block;
	margin-left: 0.3em;
	font-family: 'FontAwesome';
	font-size: 0.9em;
	text-decoration: none;
	color: #777;
}


/* word doc links
------------------------------------------------------------ */

.search_results cite[data-url*=".doc"] a::after {
	content: '\f1c2';
	color: #354bbc;
}


/* PDF links
------------------------------------------------------------ */

.search_results cite[data-url$=".pdf"] a::after {
	content: '\f1c1';
	color: #f42900;
}


/* powerpoint links
------------------------------------------------------------ */

.search_results cite[data-url*='.ppt'] a::after {
	content: '\f1c4';
	color: #d24828;
}


/* excel links
------------------------------------------------------------ */

.search_results cite[data-url*='.xls'] a::after {
	content: '\f1c3';
	color: #1E7145;
}


/* rss links
------------------------------------------------------------ */

.search_results cite[data-url$='rss.xml'] a::after {
	content: '\f143';
	color: #ff9c15;
}


/* deactivate icons for headings in search results
------------------------------------------------------------ */

main .search_results h3 a[href*=".doc"]::after,
main .search_results h3 a[href*=".pdf"]::after,
main .search_results h3 a[href*='.ppt']::after,
main .search_results h3 a[href*='.xls']::after,
main .search_results h3 a[href$='rss.xml']::after {
	display: none;
}

.search_results p {
	margin-bottom: 0.3em;
}

.search_results dl dd {
	margin-left: 0;
}

.search_results dt {
	font-weight: 700;
}

.search_results dd {
	margin-left: 1em;
}

.search_results cite {
	text-align: left;
}

.search_results cite a {
	font-size: 0.9em;
	color: green;
}

.search_results li {
	margin: 0 0 1em;
	padding: 1em;
	border: 1px solid #e5e5e5;
	box-shadow: 0 2px 18px -4px rgba(171, 171, 171, 0.37);
	background: #f8f8f8;
}


/* news, events and prospectus
------------------------------------------------------------ */

.type_prospectus,
.type_people,
.type_staff,
.type_students,
.type_news,
.type_events,
.type_maps {
	position: relative;
}


/* prospectus
------------------------------------------------------------ */

.type_prospectus dl {
	margin: 1em 0;
	padding: 0;
	font-size: 0.9em;
}

.type_prospectus dt {
	margin: 0.6em 0 0;
	padding: 0.3em 0.6em;
	border: 1px solid #dce4ef;
	border-width: 1px 1px 0 1px;
	background: #dce4ef;
	color: #444;
}

.type_prospectus dd {
	margin-left: 0;
	padding: 0.3em 0.6em;
	border: 1px solid #dce4ef;
	border-width: 0 1px 1px 1px;
	background: #fff;
}

.type_prospectus .ug_subject_area {
	margin: 0.6em 0 0.3em;
	font-weight: 700;
	font-size: 0.9em;
}


/* people
------------------------------------------------------------ */

.people_img {
	width: 100px;
	height: 100px;
	margin: 1em auto;
	overflow: hidden;
	border-radius: 50%;
	background: #556080;
}

.people_img img {
	width: 100%;
	max-width: 100%;
	height: auto;
}

.people_img.landscape img {
	max-width: 200%;
	height: 100%;
	width: auto;
}

.people_info dt {
	margin-top: 0.6em;
}

.people_info dd {
	margin-left: 0;
}

.people_info dd::before {
	font-family: 'FontAwesome';
	padding-right: 0.3em;
	color: #767676;
}

main .people_info a[href^="mailto:"]::after,
main .people_info a[href^="tel:"]::after {
	display: none;
}

dt.email ~ dd::before {
	content: '\f0e0';
}

dt.phone ~ dd::before {
	content: '\f095';
}


/* facets
------------------------------------------------------------ */

.search_facets {
	margin: 0;
	padding: 0;
	list-style: none;
}

.search_facets li {
	border-bottom: 1px solid #ccc;
}

.search_facets a {
	display: block;
	position: relative;
	padding: 0.6em 3em 0.6em 2.3em;
	border-bottom: 0;
	border-left: 0.3em solid transparent;
	color: #354b8c;
}

.search_facets a:hover,
.search_facets a:focus {
	border-left: 0.3em solid #f4c900;
	border-bottom: 0;
	background: #f1f1f1;
}

.search_facets a.active,
.search_facets a.active:hover {
	border-left: 0.3em solid #f4c900;
	background: #354b8c;
	color: #fff;
}

.search_facets a:hover .badge,
.search_facets a:focus .badge,
.search_facets a.active .badge {
	background: #f4c900;
	color: black;
}

.search_facets a.sub_facet {
	padding-left: 3em;
}

.search_facets .badge,
.facet_clear_wrapper .badge {
	display: inline-block;
	position: absolute;
	right: 0.6em;
	top: 1.21em;
	padding: 0.3em 0.6em;
	border-radius: 10px;
	background: #354b8c;
	font-size: 0.7em;
	font-weight: 700;
	line-height: 1;
	color: #eee;
}

.search_sub_facets {
	margin: 0;
	padding: 0 0 0 1em;
	border-top: 1px solid #ccc;
	list-style: none;
}

.search_sub_facets li:last-child {
	border-bottom: 0;
}


/* Disabled facet
------------------------------------------------------------ */

.search_facets a.disabled {
	color: #666;
	cursor: not-allowed;
}

.search_facets a.disabled:hover {
	border-left: 0.3em solid #fff;
	background: #fff;
	cursor: not-allowed;
}

.search_facets a.disabled .badge {
	background: #666;
	color: #fff;
}


/* facets on mobile, enhanced with JS
------------------------------------------------------------ */

.facet_toggle_wrapper {
	display: none;
	margin: 0 0 2em;
}

.facet_toggle_wrapper.active {
	display: block;
}

.facet_toggle {
	display: block;
	width: 100%;
	padding: 0.6em;
	border: 1px solid #c7c7c7;
	background: #e5e5e5;
	text-align: right;
}

.facet_toggle::after {
	display: inline-block;
	margin: 0 0 0 0.3em;
	font-family: FontAwesome;
	content: '\f078';
}

.facet_toggle[aria-expanded=true]::after {
	content: '\f077';
}

.facet_toggle_wrapper .search_refine {
	float: none;
	width: 100%;
}

.facet_wrapper {
	background: #eee;
}

.facet_wrapper.collapsed {
	display: none;
}


/* facet "clear" mechanism
------------------------------------------------------------ */

.facet_clear_wrapper {
	display: none;
	margin: 1em 0 0;
	padding: 1em;
	background: #5a5a5a;
}

.facet_clear_wrapper.active {
	display: block;
}

.facet_clear_wrapper dl {
	margin: 0;
	color: #eee;
}

.facet_clear_wrapper dt {
	margin: 0;
}

.facet_clear_label {
	float: left;
	margin: 0 0 0.3em;
	font-weight: 700;
}

.facet_clear {
	display: block;
	float: right;
	margin: -0.3em 0 0;
	padding: 0.3em 0.6em;
	border: 0;
	background: #111;
	color: #eee;
}

.facet_clear::before {
	display: inline-block;
	margin: 0 0.3em 0 0;
	font-family: FontAwesome;
	content: '\f00d';
}

.facet_clear:hover,
.facet_clear:focus {
	border: 0;
	background: #444;
}


/* Pagination
------------------------------------------------------------ */

.pagination li.active a {
	background: #fff;
    color: #000;
	cursor: default;
}


/* Flaticon icon font: Flaticon. Creation date: 18/05/2018 09:37
------------------------------------------------------------ */

@font-face {
	font-family: 'Flaticon';
	src: url('../../fonts/flaticon/font/Flaticon.eot');
	src: url('../../fonts/flaticon/font/Flaticon.eot?#iefix') format('embedded-opentype'),
	url('../../fonts/flaticon/font/Flaticon.woff') format('woff'),
	url('../../fonts/flaticon/font/Flaticon.ttf') format('truetype'),
	url('../../fonts/flaticon/font/Flaticon.svg#Flaticon') format('svg');
	font-weight: normal;
	font-style: normal;
}

[class^="flaticon-"]::before,
[class*=" flaticon-"]::before,
[class^="flaticon-"]::after,
[class*=" flaticon-"]::after {
	font-family: Flaticon;
	font-size: 20px;
	font-style: normal;
}

.flaticon-news::before {
	content: '\f100';
}

.flaticon-for-staff::before {
	content: '\f101';
}

.flaticon-for-students::before {
	content: '\f102';
}

.flaticon-degrees-and-courses::before {
	content: '\f103';
}

.flaticon-people::before {
	content: '\f104';
}

.flaticon-events::before {
	content: '\f105';
}

.flaticon-maps::before {
	content: '\f106';
}

.search_facets li *[class^='flaticon-']::before {
	position: absolute;
	left: 0.6em;
	font-size: 1em;
	color: #a2a1a1;
}

.search_facets li a.active[class^='flaticon-']::before {
	color: #c1cbe8;
}

.search_facets li a.disabled:hover[class^='flaticon-']::before,
.search_facets li a.disabled:focus[class^='flaticon-']::before {
	color: inherit;
	color: #a2a1a1;
}


/* media queries
------------------------------------------------------------ */

@media screen and (-webkit-min-device-pixel-ratio: 0) {
	@font-face {
		font-family: 'Flaticon';
		src: url('../../fonts/flaticon/font/Flaticon.svg#Flaticon') format('svg');
	}
}


@media (max-width: 414px) {
	.tt-horizontal .tt-dataset {
		width: 100% !important;
	}
}


@media screen and (min-width: 420px) {
	.type_prospectus dl,
	.type_prospectus dl * {
		box-sizing: border-box;
	}

	.type_prospectus dl {
		float: left;
		width: 49.25%;
		margin: 1.5% 1.5% 1.5% 0;
	}

	.type_prospectus dl:nth-of-type(2n) {
		margin-right: 0;
	}

	.type_prospectus dt {
		margin: 0;
	}

	.type_prospectus cite {
		clear: both;
	}
}


@media screen and (min-width: 500px) {
	.people_img {
		float: left;
		margin: 1em 0;
	}

	.people_info {
		margin: 1em 0 0 130px;
		margin: 1em 0 0 calc(100px + 1.3em);
		line-height:  normal;
	}
}


@media screen and (min-width: 600px) {
	.search_refine {
		float: left;
		width: 47.25%;
	}

	.search_related {
		float: right;
		width: 47.25%;
	}

	.search_related.full {
		float: none;
		width: 100%;
	}

	#global_search fieldset {
		height: 5.5em;
	}

	#global_search .twitter-typeahead {
		float: left;
		width: 44%;
	}

	#global_search .tt-menu {
		top: 100% !important;
		width: 100%;
		border: 0;
	}

	.hero_search #big_q {
		vertical-align: inherit;
		display: inline;
	}
}


@media screen and (min-width: 640px) {
	.type_prospectus dl,
	.type_prospectus dl:nth-of-type(2n) {
		float: left;
		width: 32.332%;
		margin-right: 1.5%;
	}

	.type_prospectus dl:last-of-type {
		margin-right: 0;
	}

	.type_prospectus.undergraduate dl {
		width: 23.875%;
	}

	.type_prospectus dt {
		text-align: center;
	}

	.type_prospectus dd {
		text-align: center;
	}
}


@media screen and (min-width: 940px) {
	.search_refine,
	.search_related {
		float: none;
		width: 100%;
	}

	.search_results li {
		padding: 1em 1em 1em 2.5em;
	}

	.search_facets a {
		padding: 0.3em 3em 0.3em 2.3em;
	}

	.search_facets .badge,
	.facet_clear_wrapper .badge {
		top: 0.7em;
	}

	.type_prospectus::before,
	.type_people::before,
	.type_staff::before,
	.type_students::before,
	.type_news::before,
	.type_events::before,
	.type_maps::before {
		display: inline-block;
		position: absolute;
		width: 1em;
		left: 0.45em;
		top: 0.7em;
		font-family: Flaticon;
		font-size: 1.4em;
		text-align: center;
		color: #aaa;
	}

	.type_prospectus::before {
		content: '\f103';
	}

	.type_people::before {
		content: '\f104';
	}

	.type_staff::before {
		content: '\f101';
	}

	.type_students::before {
		content: '\f102';
	}

	.type_news::before {
		content: '\f100';
	}

	.type_events::before {
		content: '\f105';
	}

	.type_maps::before {
		content: '\f106';
	}
}