//Variables
$primary-color: #7376df;
$primary-color-hover: #6365d2;
$almost-white: #f7f7f7;
$lighter-gray: #dfdfdf;
$light-gray: #a0a0a0;
$medium-gray: #7c7c7c;
$dark-gray: #444444;
$base-font-size: 16px;
$main-font: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
$headline-font: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;

@mixin border-radius {
	border-radius: .3rem;
}

// General Styles
 
body {
 	background-color: #ffffff;
 	font-family: $main-font;
 	font-size: $base-font-size;
 	color: $dark-gray;
 }

h1, h2 {
	font-family: $headline-font;
	padding-bottom: 1.2rem;
	border-bottom: 1px solid $lighter-gray;
}

h3, h4, h5, h6 {
	font-family: $headline-font;
}

a, a:visited {
	color: $primary-color;
}

a:hover, a:focus, a:active {
	color: $primary-color-hover;
	text-decoration: none;
}

.nav-pills .nav-item.show .nav-link, .nav-pills .nav-link.active {
	background-color: $primary-color;
}

h1 {
	font-family: $headline-font;
	font-size: 2.4rem;
	font-weight: 600;
}

h2 {
	font-family: $headline-font;
	font-size: 2.4rem;
	font-weight: 500;
}

h3 {
	font-family: $headline-font;
	font-size: 1.8rem;
	font-weight: 500;
}

h4 {
	font-family: $headline-font;
	font-size: 1.4rem;
	font-weight: 500;
}

h5 {
	font-family: $headline-font;
	font-size: 1rem;
	letter-spacing: .1rem;
	font-weight: 600;
	text-transform: uppercase;
}

h6 {
	font-family: $headline-font;
	font-size: .8rem;
	letter-spacing: .1rem;
	font-weight: 500;
	text-transform: uppercase;
}

p {
	color: $medium-gray;
	font-size: .9rem;
}

.card-inverse p {
	color: #fff;
	font-size: .9rem;
}

.card h1 {
	border: none;
	margin: 0;
	padding-bottom: .5rem;
}

.no-padding {
	padding: 0;
}

.clear {
	clear: both;
}

.justify-center {
	display: flex;
	align-items: center;
	justify-content: center;
}

.text-muted {
	color: $light-gray!important;
}

.divider {
	display: block;
	width: 100%;
	height: 1px;
	background-color: $lighter-gray;
	margin: 2rem auto;
}

.circle {
	border-radius: 499rem;
}

.jumbotron {
	padding: 3rem 2rem;
	background-color: $almost-white;
}

// Override Primary Color

.btn-primary, .btn-primary.disabled, .btn-primary:disabled, .btn-outline-primary:hover, .btn-outline-primary:active, .btn-outline-primary.active, .show > .btn-outline-primary.dropdown-toggle, .card-primary, .page-item.active .page-link, .list-group-item.active {
	background-color: $primary-color!important;
	border-color: $primary-color!important;
}

.btn-primary:hover, .btn-primary:active, .btn-primary.active, .show > .btn-primary.dropdown-toggle {
	background-color: $primary-color-hover!important;
	border-color: $primary-color-hover!important;
}

.btn-outline-primary {
	color: $primary-color!important;
	border-color: $primary-color!important;
}

.btn-outline-primary.disabled, .btn-outline-primary:disabled, .btn-link, .page-link, .text-primary {
	color: $primary-color!important;
}

.btn-link:focus, .btn-link:hover, .page-link:focus, .page-link:hover, a.text-primary:focus, a.text-primary:hover {
	color: $primary-color-hover!important;
}

.dropdown-item.active, .dropdown-item:active, .custom-control-input:checked ~ .custom-control-indicator, .custom-checkbox .custom-control-input:indeterminate ~ .custom-control-indicator, .nav-pills .nav-item.show .nav-link, .badge-primary, .progress-bar, .bg-primary {
	background-color: $primary-color!important;
	background-image: none;
}

.nav-pills .nav-link.active, .badge-primary[href]:focus, .badge-primary[href]:hover, a.bg-primary:focus, a.bg-primary:hover {
	background-color: $primary-color-hover!important;
}

.form-control:focus {
	border-color: $primary-color!important;
}


// Primary Button

.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active {
	color: #fff!important;
	background-color: $primary-color;
	border-color: $primary-color;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
	background-color: $primary-color-hover;
	border-color: $primary-color-hover;
}

.btn-outline-primary, .btn-outline-primary:visited {
	color: $primary-color;
	border-color: $primary-color;
	background: none;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
	background-color: $primary-color;
	border-color: $primary-color;
	color: #fff;
}

// Secondary Button

.btn-secondary {
	border-color: $medium-gray;
	background-color: $medium-gray;
	color: #fff;
}

.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
	border-color: $dark-gray;
	background-color: $dark-gray;
	color: #fff;
}

.btn-outline-secondary, .btn-outline-secondary:visited {
	color: $medium-gray;
	border-color: $medium-gray;
	background: none;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-outline-secondary:active {
	border-color: $medium-gray;
	background: $medium-gray;
	color: #fff;
}

// Custom Button Styles

.btn {
	border-radius: 499rem;
	text-transform: uppercase;
	letter-spacing: .1rem;
	font-size: .8rem;
	padding: .75rem 1.25rem;
	cursor: pointer;
}

.btn:focus {
	outline: none;
	border: 0;
	box-shadow: none;
}

.btn-xs {
	font-size: .6rem;
	padding: .5rem 1rem;
}

.btn-sm {
	font-size: .7rem;
	padding: .5rem 1rem;
}

.btn-md {
	font-size: .8rem;
	padding: .75rem 1.25rem;
}

.btn-lg {
	font-size: .9rem;
	padding: 1rem 1.5rem;
}

.btn-subtle {
	border: none;
	background: $almost-white;
	color: $primary-color;
	-webkit-appearance: none;
	cursor: pointer;
}

.btn-subtle:hover, .btn-subtle:focus, .btn-subtle:active {
	color: #fff;
	background-color: $primary-color;
	outline: none;
}

.btn-stripped {
	border: none;
	background: none!important;
	color: $dark-gray!important;
	-webkit-appearance: none;
	cursor: pointer;
}

.btn-stripped:hover, .btn-stripped:focus, .btn-stripped:active {
	color: $primary-color;
	background-color: none;
	outline: none;
}

.dropdown a {
	color: $dark-gray;
}

.dropdown a:hover, .dropdown a:active, .dropdown a:focus {
	background-color: $primary-color;
	color: #fff;
}

// Sidebar

.sidebar {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	padding: 20px;
	padding-left: 0;
	padding-right: 0;
	z-index: 1000;
	overflow-x: hidden;
	overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
	border-right: 1px solid #eee;
	background: $primary-color;
	a {
		color: #fff;
		text-transform: uppercase;
		font-size: .7rem;
		letter-spacing: .2rem;
		padding: .75rem 1rem;
	}
	
	em {
		font-size: 1rem;
	}
	
	h1 {
		color: #fff;
		border: none;
		font-size: 0.9rem;
		padding: 0rem 1rem;
		text-transform: uppercase;
		letter-spacing: .2rem;
	}
	
	.site-title {
		margin-top: .5rem;
		margin-bottom: 1.75rem;
		a {
			font-size: .9rem;
			padding-left: 0;
			padding-right: 0;
			cursor: pointer;
		}
		a:hover {
			background: none!important;
		}
	}
	
	.nav {
		margin-bottom: 20px;
	}
	
	.nav-item {
		width: 100%;
	}
	
	.nav-item + .nav-item {
		margin-left: 0;
	}
	
	.nav-link {
		border-radius: 0;
	}
	
	.logout-button {
		position: absolute;
		bottom: 20px;
		left: 20px;
		width: 85%;
		text-align: center;
		@include border-radius;
	}
}

#wrapper.toggled .sidebar-nav {
	display: none;
}

#menu-toggle {
	position: absolute;
	top: 1rem;
	right: 1rem;
}

.sidebar a:focus, .sidebar a:visited, .sidebar a:hover, .sidebar a:active {
	background-color: $primary-color-hover!important;
}

@media screen and (max-width: 576px) {
	#wrapper .sidebar-nav {
		display: none;
	}
	
	#wrapper.toggled .sidebar-nav {
		display: block!important;
	}
	
	.sidebar {
		position: inherit;
		padding-bottom: 0px;
		margin-bottom: 1rem;
	}
	
	#menu-toggle {
		background-color: $primary-color-hover;
	}
}
	@media screen and (min-width: 576px) {
	#wrapper.toggled .sidebar-nav {
		display: block;
	}
	
	#menu-toggle {
		display: none;
	}
}

// Cards

.card-title {
	margin-top: -.25rem;
	padding-bottom: .25rem;
	margin-bottom: 1rem;
}

.card-subtitle {
	margin-top: -.75rem;
	padding-bottom: .5rem;
}

.card-title-btn-container {
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	list-style: none;
}

.alert {
	color: #fff;
	a {
		color: #fff!important;
	}
}

.no-left-margin {
	margin-left: 0;
}

// Main Content

.page-header {
	font-family: $headline-font;
	margin-top: 0rem;
	margin-bottom: 2.4rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #eee;
	height: auto;
 	h1 {
		display: inline;
		border: none;
		padding: 0;
		margin-top: 0;
		margin-bottom: 0;
		width: 100%;
	}
}

.profile-photo {
	border-radius: 499rem;
	float: left;
}

.username {
	float: left;
	text-align: left;
	margin: 0 0 0 1rem;
 	h1, h2, h3, h4 {
		margin-bottom: 0;
		text-transform: none!important;
		letter-spacing: 0!important;
	}
}

.user-dropdown .dropdown-toggle::after {
	margin-top: 1rem;
	margin-left: 1rem;
}

.user-progress {
	margin-top: 1rem;
	.profile-photo {
		max-height: 75px;
		max-width: 75px!important;
	}
}

.progress-custom {
	margin-top: .25rem;
}

.progress-label {
	text-align: center!important;
	color: $primary-color;
	font-size: .75rem;
	margin-top: -.25rem;
}

.progress-bar {
	height: .3rem;
}


// Calendar Widget

#calendar, .datepicker-inline {
	width: 100%;
	text-align: center;
}

#calendar table {
	width: 100%;
}

.datepicker-switch {
	font-size: 16px;
	height: 46px!important;
}

.datepicker table tr td.old,
.datepicker table tr td.new {
	color: $lighter-gray;
}

.datepicker table tr td {
	padding: 2px 2px!important;
	cursor: pointer;
	@include border-radius;
}

#calendar th {
	text-align: center!important;
	cursor: pointer;
	@include border-radius;
}

.datepicker table tr td.active, .datepicker table tr td.active:hover, .datepicker table tr td.active.disabled, .datepicker table tr td.active.disabled:hover, .datepicker table tr td.active:hover, .datepicker table tr td.active:hover:hover, .datepicker table tr td.active.disabled:hover, .datepicker table tr td.active.disabled:hover:hover, .datepicker table tr td.active:focus, .datepicker table tr td.active:hover:focus, .datepicker table tr td.active.disabled:focus, .datepicker table tr td.active.disabled:hover:focus, .datepicker table tr td.active:active, .datepicker table tr td.active:hover:active, .datepicker table tr td.active.disabled:active, .datepicker table tr td.active.disabled:hover:active, .datepicker table tr td.active.active, .datepicker table tr td.active:hover.active, .datepicker table tr td.active.disabled.active, .datepicker table tr td.active.disabled:hover.active, .open .dropdown-toggle.datepicker table tr td.active, .open .dropdown-toggle.datepicker table tr td.active:hover, .open .dropdown-toggle.datepicker table tr td.active.disabled, .open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
	color: #ffffff;
	background-color: $primary-color;
	text-shadow: none;
	border-color: #285e8e;
}

.datepicker table tr td span:hover, .datepicker thead tr:first-child th:hover, .datepicker tfoot tr th:hover, .datepicker table tr td.day:hover, .datepicker table tr td.day.focused {
	background: rgba(0, 0, 0, 0.05);
}

.panel-heading .glyphicon {
	margin-right: 10px;
}


// Timeline Widget

.timeline {
	list-style: none;
	padding: 20px 0 20px;
	position: relative;
}

.timeline:before {
	top: 0;
	bottom: 0;
	position: absolute;
	content: " ";
	width: 2px;
	background-color: #eeeeee;
	left: 25px;
	margin-right: -1.5px;
}

.timeline > li {
	margin-bottom: 20px;
	position: relative;
}

.timeline > li:before, .timeline > li:after {
	content: " ";
	display: table;
}

.timeline > li:after {
	clear: both;
}

.timeline > li > .timeline-panel {
	width: calc( 100% - 65px );
	float: right;
	border: 1px solid $lighter-gray;
	border-radius: 2px;
	padding: 10px 20px;
	position: relative;
	box-shadow: none;
}

.timeline > li > .timeline-panel:before {
	position: absolute;
	top: 26px;
	left: -11px;
	display: inline-block;
	border-top: 11px solid transparent;
	border-right: 11px solid $lighter-gray;
	border-left: 0 solid $lighter-gray;
	border-bottom: 11px solid transparent;
	content: " ";
}

.timeline > li > .timeline-panel:after {
	position: absolute;
	top: 27px;
	left: -10px;
	display: inline-block;
	border-top: 10px solid transparent;
	border-right: 10px solid #fff;
	border-left: 0 solid #fff;
	border-bottom: 10px solid transparent;
	content: " ";
}

.timeline > li > .timeline-badge {
	color: $dark-gray;
	width: 46px;
	height: 46px;
	line-height: 2.8rem;
	font-size: 1.4rem;
	text-align: center;
	position: absolute;
	top: 16px;
	left: 0px;
	margin-right: -25px;
	margin-left: 3px;
	border: 1px solid $lighter-gray;
	background-color: #fff;
	z-index: 100;
	border-radius: 9999px;
}

.timeline-badge.primary {
	background-color: $primary-color !important;
	color: #fff!important;
	border: none!important;
}

.timeline-badge.success {
	background-color: #8ad919 !important;
}

.timeline-badge.warning {
	background-color: #ffb53e !important;
}

.timeline-badge.danger {
	background-color: #f9243f !important;
}

.timeline-badge.info {
	background-color: #30a5ff !important;
}

// Latest News Widget

.article {
	padding: 1rem 0;
	border-bottom: 1px solid $lighter-gray;
	margin-bottom: 1rem;
}

.article:first-child {
	padding: 0 0 10px 0;
}

.article:last-child {
	padding: 0 0 10px 0;
	border: none;
	margin-bottom: 0;
}

.article h4 a {
	margin-bottom: 10px;
}

.article .date {
	text-align: center;
	font-size: 1.8rem;
	margin: 0 auto;
	display: block;
}

.article .date .text-muted {
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .1rem;
}


// Todo List Widget

.todo-list-item {
	list-style: none;
	padding: .75rem 1rem .15rem 1rem;
	@include border-radius;
	.fa {
		margin: 0 .25rem 0 0;
		color: $dark-gray;
	}
	
	.fa:hover {
		color: $primary-color;
	}
	
	input[type=checkbox] {
		margin: 0 .5rem 0 0!important;
		border: 1px solid #333;
	}
}

.todo-list {
	padding: 0;
	margin: -15px;
	background: #fff;
	color: $dark-gray;
}

input[type=checkbox]:checked + label {
	text-decoration: line-through;
	color: $light-gray;
}

.todo-list-item:hover, a.todo-list-item:focus {
	text-decoration: none;
	background-color: $almost-white;
}

.todo-list-item .trash .fa:hover {
	color: #ef4040;
}

.todo-list-footer {
	margin: -20px;
	margin-top: 2rem;
	.btn {
		border-radius: .4rem;
	}
}

