/**
 * Styles for the tabcordion and accordion modules
 *
 * This file is in version control:
 * https://github.com/uofa/global-environment
 *
 * Created 15 Feb 2017
 * Updated 07 Mar 2018
 *
 * Last update: tweak behavious to be like FAQ, CD.
 *
 * @author Allan A Beattie
 * @author Zeno Zaplaic
 * @author Colin Denholm
 */


/* Generic tabcordion styles (before javascript runs)
------------------------------------------------------------ */

.tabcordion [aria-hidden='true'] {
	display: none;
}

.tabcordion {
	margin: 0;
	padding: 0;
	list-style: none;
	border-collapse:collapse
}

.tabcordion > dt {
	font-weight: bold;
}

.tabcordion > dt a {
	cursor: default;
	background: none;
}

.tabcordion > dt a,
.tabcordion_wrapper > .tabcordion_nav > li a {
	display: block;
	padding: 1em;
	line-height: 1;
	text-decoration: none;
	color: #444444;
	transition: background .2s;
}

.tabcordion > dd {
	margin: 0;
	box-sizing: border-box;
	padding: 1em;
}

/* once js kicks in we need to move the padding into the inner div because
	a block with padding and zero height will show the padding around it */
.tabcordion.tabcordion_loaded > dd {
	padding: 0;
	position: relative;
	top: 0;
}

.tabcordion > dd > div {
	padding: 1em 1em 1em;
}

.tabcordion .tabcordion .tabcordion > dd {
	background: #f5f5f5;
}

.tabcordion .tabcordion > dd {
	margin-bottom: 0;
	background-color: #fff;
}

.tabcordion > dd > div > *:last-child {
	margin-bottom: 0;
}


/* Tabcordion styles once the plugin starts running
------------------------------------------------------------ */

.tabcordion_loaded > dt {
	display: inline-block;
}

.tabcordion_loaded > dt a[aria-selected='true'],
.tabcordion_loaded .tabcordion_loaded  .tabcordion_loaded > dt a[aria-selected='true'] {
    background: #354b8c;
}

.tabcordion_loaded .tabcordion_loaded > dt a[aria-selected='true'] {
    background: #354b8c;
    border-radius: 0.2em 0.2em 0 0;
}

.tabcordion_loaded.tabcordion > dt a {
    cursor: pointer;
    color: #fff;
    background: #1F3165;
    border-radius: 0.2em;
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.47);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.tabcordion_loaded.tabcordion > dt a:hover,
.tabcordion_loaded.tabcordion > dt a:focus {
    background: #354b8c;
    box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.47);
}

.accordion.tabcordion_loaded.tabcordion > dt a {
	color: #365594;
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	box-shadow: none;
}

.accordion.tabcordion_loaded.tabcordion > dt a:hover,
.accordion.tabcordion_loaded.tabcordion > dt a:focus,
.accordion.tabcordion_loaded > dt a[aria-selected='true'],
.accordion.tabcordion_loaded .tabcordion_loaded  .tabcordion_loaded > dt a[aria-selected='true'] {
	background: #f5f5f5;
	box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.3);
}

.accordion.tabcordion_loaded > dt a[aria-selected='true'],
.accordion.tabcordion_loaded .tabcordion_loaded  .tabcordion_loaded > dt a[aria-selected='true'] {
	color: #444;
}


/* Tabcordion tab-mode styles
------------------------------------------------------------ */

.tabcordion_mode_tabs > dt {
	display: none;
}

.tabcordion_wrapper > .tabcordion_nav  {
	list-style: none;
	padding: 0;
	margin: 0;
	border-bottom: 1px solid #dbe6ec;
}

.tabcordion_wrapper > .tabcordion_nav > li {
	display: inline-block;
}

.tabcordion_wrapper > .tabcordion_nav > li a {
	background: transparent;
}

.tabcordion_wrapper > .tabcordion_nav > li a:focus {
	box-shadow: 0 -6px 0 #E5E5E5 inset;
}

.tabcordion_wrapper > .tabcordion_nav > li a[aria-selected='true'] {
	background: transparent;
	box-shadow: 0 -6px 0 #f4c900 inset;
}


/* Tabcordion accordion-mode styles
------------------------------------------------------------ */

.tabcordion_mode_accordion > .tabcordion_nav {
	display: none;
}

.tabcordion_mode_accordion > dt {
	display: block;
	box-sizing: border-box;
}

.tabcordion_mode_accordion > dt:first-child > a {
	margin-top: 0;
}

.tabcordion_mode_accordion > dt > a {
	padding-right: 40px;
	margin-top: 1em;
	position: relative;
	font-weight: normal;
}

.tabcordion_mode_accordion > dt > a:after {
	width: 0;
	position: absolute;
	right: 2em;
	top: 1em;
	font-family: 'FontAwesome';
	content: '\f078';
	height: 0;
	display: block
}

.tabcordion_mode_accordion > dt > a[aria-selected='true']:after {
	content: '\f077';
}

.tabcordion_mode_accordion > dt a[aria-selected='true'] {
	margin-bottom: 0;
}

.tabcordion_mode_accordion > dd {
	border: 1px solid #dbe6ec;
	overflow: hidden;
}

.tabcordion_mode_accordion > dd[aria-hidden='true'] {
	max-height: 0;
}

/* This class is required for animationg from display:none */
.tabcordion_mode_accordion > dd[aria-hidden='true'].tabcordion_animating {
	display: block;
}

.tabcordion_animating {
	transition: max-height 0.3s ease-in-out;
	webkit-backface-visibility: hidden;
	transform: translate3d(0, 0, 0);
	-webkit-transform: translate3d(0, 0, 0);
}