/*****************************************/
/***          Table of Contents        ***/
/*****************************************/
/*
	1. Imports
	2. Variables
	3. CSS Resets
	4. Global Styling
	5. Components - Styles for entire components shared across the app
		5.1 Nav Tabs
		5.2 Form
		5.3 Alert Boxes
		5.4 Spinners
	6. Main Layout - These are section styles shared across all pages of the app
		6.1 Header
		6.2 Main
		6.3 Footer
		6.4 Nav
	7. Pages - These are styles for sections of one specific page
		7.1 Login Page
		7.2 Dashboard Page
		7.3 Course Home/Archived Pages
		7.4 Course Details Pages
		7.5 About Page
		
*/

/*****************************************/
/***            1. Imports             ***/
/*****************************************/

@import url('https://fonts.googleapis.com/css?family=Comfortaa&display=swap');
@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');

/*****************************************/
/***            2. Variables           ***/
/*****************************************/

:root {
	/*** Colors - Regular ***/
	--color-primary: #3127ca;
	--color-secondary: #555555;
	--color-danger: #ff6a56;

	--color-background-main: #fbfbfb;
	--color-background-card: #ffffff;

	/*** Colors - Hover ***/
	--color-primary-hover: #180eb1;
	--color-secondary-hover: #3c3c3c;
	--color-danger-hover: #e6513d;
	--color-background-card-hover: #fbfbfb;

	/*** Colors - Gradient ***/
	--color-blue-gradient: linear-gradient(
			353.28deg,
			#1ea2db 7.78%,
			rgba(255, 255, 255, 0) 100%
		),
		#3127ca;
	--color-green-gradient: linear-gradient(
			353.28deg,
			#6dd75c 7.78%,
			rgba(255, 255, 255, 0) 100%
		),
		#2fa15a;

	/*** Fonts ***/
	--font-family-heading: "Comfortaa", Cambria, Cochin, Georgia, Times, serif;
	--font-family-body: 'Open Sans', Arial, Helvetica, sans-serif;

	/*** Shadows ***/
	--shadow-card: 2px 2px 6px rgba(0, 0, 0, 0.1);

	/*** Borders ***/
	--border-radius: 5px;

	/*** Transition Effect ***/
	--transition-hover: color 150ms ease-in-out,
		background-color 150ms ease-in-out, background 150ms ease-in-out;
	--transition-height: height 200ms linear;
	--transition-scale: transform 200ms linear, margin 200ms linear;
	--transition-opacity: opacity 200ms linear;
}

/*****************************************/
/***            3. CSS Resets          ***/
/*****************************************/

html {
	box-sizing: border-box;
	scroll-behavior: smooth;
}

*,
*:before,
*:after {
	box-sizing: inherit;
}

/*****************************************/
/***         4. Global Styling         ***/
/*****************************************/

body {
	font-family: var(--font-family-body);
	font-size: 14px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-family: var(--font-family-heading);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
button,
span,
div,
li,
label {
	color: var(--color-secondary);
}

p {
	line-height: 1.4;
}

a,
a:hover {
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
}
.setting_list {
	display: hidden;
	list-style: none;
	box-shadow: var(--shadow-card);
	background-color: var(--color-background-card);
	padding: 2%;
	transform: translate(1px, 65px);
	text-align: right;
	position: absolute;
}
.setting_list_item {
	border: 1px solid var(--color-secondary);
	white-space: nowrap;
}

/*****************************************/
/***           5. Components           ***/
/*****************************************/

/*****************************************/
/***            5.1 Nav Tabs           ***/
/*****************************************/
/*** on Course Home/Archived pages + Course Details/Edit pages ***/

/* Course Nav TABS */
.course__nav,
.details__nav {
	margin-top: -35px;
}
/* Media Queries To Make Nav Tabs move under page heading when screen gets smaller */
@media only screen and (max-width: 400px) {
	.details__nav {
		margin-top: 0;
	}
}
@media only screen and (max-width: 320px) {
	.course__nav {
		margin-top: 0;
	}
}

.course__nav-link {
	transition: var(--transition-hover);
}
.course__nav-link:hover {
	color: var(--color-primary-hover);
}
.course__nav .course__nav-link.course__nav-link--active {
	background: var(--color-background-main);
	border-bottom: var(--color-background-main) 1px solid;
	color: var(--color-primary);
}

/*****************************************/
/***            5.2 Form               ***/
/*****************************************/
.course__form {
	width: 100%;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-card);
	background-color: var(--color-background-card);
	padding: 30px;
	margin: 30px 0;
	font-size: 18px;
	position: relative;
	overflow: hidden;
}

/* Sets Focus Color */
.form-control:focus {
	border-color: rgba(49, 39, 202, 0.5);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
		0 0 8px rgba(49, 39, 202, 0.3);
}

.course-color-selector {
	padding: 0;
}

/* Form Color Picker	*/

.color-picker {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
}
.color-list {
	list-style: none;
	padding: 0;
}
.color-list li {
	display: inline-block;
	margin: 3px;
}
.color-list input {
	display: none;
}
.color {
	height: 40px;
	width: 40px;
	border-radius: 100px;
	background-color: attr(data-color);
	transition: transform 0.3s;
}
.color:not(.active):hover {
	cursor: pointer;
	transform: scale(1.2);
}
.color.active {
	border: 5px solid #ddd;
	width: 52px;
	height: 52px;
}

/* Form Buttons */
.form__buttons-container {
	margin: 40px 0 10px;
}
.form__button {
	font-size: 12pt;
	border-radius: var(--border-radius);
	border: none;
	display: block;
	width: 100%;
	text-align: center;
	margin-top: 10px;
	padding: 12px;
	box-shadow: var(--shadow-card);
	transition: var(--transition-hover);
}
a.form__button:hover {
	text-decoration: none;
	color: var(--color-background-card);
}

.form__button--submit {
	background-color: var(--color-primary);
	color: var(--color-background-card);
}
.form__button--submit:hover {
	background-color: var(--color-primary-hover);
}
.form__button--cancel {
	background-color: var(--color-secondary);
	color: var(--color-background-card);
}
.form__button--cancel:hover {
	background-color: var(--color-secondary-hover);
}
.form__button--delete {
	background-color: var(--color-danger);
	color: var(--color-background-card);
}
.form__button--delete:hover {
	background-color: var(--color-danger-hover);
}

/*****************************************/
/***          5.3 Alert Boxes          ***/
/*****************************************/
.alertbox {
	background: var(--color-background-card);
	border-radius: var(--border-radius);
	padding: 30px;
	top: 100px;
	left: 15%;
	width: 70%;
	height: 300px;
	text-align: center;
	position: absolute;
	display: none;
	z-index: 10;
	flex-direction: column;
	justify-content: space-between;
}

.alertbox_active {
	display: flex;
}

.alert_background {
	position: fixed;
	top: 0;
	bottom: 0;
	right: 0;
	left: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1;
	pointer-events: none;
	opacity: 0;
	transition: opacity 200ms ease-in-out;
}

.alert_background--active {
	pointer-events: auto;
	opacity: 1;
}

.edit_success,
.delete_success {
	border-radius: var(--border-radius);
	padding: 30px;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	text-align: center;
	transition: opacity 300ms ease-in;
	z-index: 10;
	opacity: 0;
	pointer-events: none;
}

.edit_success_active,
.delete_success_active {
	opacity: 0.9;
}

/*****************************************/
/***         5.4 Loading Spinner       ***/
/*****************************************/
.bootstrap__spinner {
	color: var(--color-primary);
	margin: auto;
}

.bootstrap__spinner-white {
	color: white;
	display: block;
}

.spinner--centered {
	display: block;
	margin: 100px auto 120px;
}

/*****************************************/
/***          6. Main Layout           ***/
/*****************************************/

/*****************************************/
/***            6.1 Header             ***/
/*****************************************/
.header {
	height: 50px;
}

.header__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
}

.header__logo {
	height: 18px;
}

.header__flex-right {
	height: 100%;
	display: flex;
	align-items: center;
}

#header__username {
	color: var(--color-secondary);
	font-size: 12px;
}

/* Needed for text-decoration to remove underline */
button.header__settings {
	padding: 2px 0 3px 20px;
	display: flex;
	align-items: center;
	text-decoration: none;
	border: none;
	background: none;
}
.header__settings .settings__icon {
	color: var(--color-secondary);
	text-shadow: 0px 4px 5px rgba(1, 0, 36, 0.15);
	transition: var(--transition-hover);
}
.header__settings:hover .settings__icon {
	color: var(--color-primary-hover);
}

/*****************************************/
/***            6.2 Body               ***/
/*****************************************/
.body {
	background: var(--color-background-main);
}

.main {
	width: 100%;
	padding-bottom: 100px;
}

/** Page Headings **/
.page-heading__container {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
}
.page-heading {
	text-align: left;
	font-size: 20pt;
	font-weight: 700;
	padding-top: 20px;
}

/*****************************************/
/***            6.3 Footer             ***/
/*****************************************/
.footer {
	position: fixed;
	bottom: 0;
	right: 0;
	width: 100%;
	background: var(--color-background-card);
	height: 65px;
	box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.2);
	border-top-left-radius: var(--border-radius);
	border-top-right-radius: var(--border-radius);
}

/*****************************************/
/***              6.4 Nav              ***/
/*****************************************/
.nav__container {
	height: 100%;
}
.nav {
	height: 100%;
}
.nav__item {
	line-height: 10px;
}

.nav__item .nav__link {
	height: 100%;
	padding: 0;
	display: flex;
	justify-content: center;
	align-items: flex-start;
}

/* This is needed to overwrite the default bootstrap hover state */
.nav__link:hover .nav-link__icon,
.nav__link:hover .nav-link__span {
	color: var(--color-primary-hover);
}
.nav__link__container {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
}
.nav-link__icon {
	font-size: 24pt;
	margin: 8px 0 2px;
	transition: var(--transition-hover);
	text-shadow: var(--shadow-card);
}

.nav-link__span {
	font-size: 10pt;
	transition: var(--transition-hover);
	text-shadow: var(--shadow-card);
}

.nav__active .nav-link__icon,
.nav__active .nav-link__span {
	color: var(--color-primary);
}

.nav__item--timer-toggle {
	position: relative;
}

.nav__timer-button {
	border: none;
	width: 65px;
	height: 65px;
	border-radius: 50%;
	background-color: var(--color-danger);
	cursor: pointer;
	position: relative;
	top: -15px;
	box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
	display: flex;
	justify-content: center;
	align-items: center;
	transition: var(--transition-hover);
}

.nav__timer-button:hover {
	background-color: var(--color-danger-hover);
}

.nav__timer-button .nav__timer__icon {
	font-size: 42px;
	color: #ffffff;
	display: none;
}

/* Timer Toggle BTN Animation */

.timer-toggle-btn--timing {
	box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(232, 76, 61, 0.7);

	animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse {
	to {
		box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3),
			0 0 0 15px rgba(232, 76, 61, 0);
	}
}

/*****************************************/
/***          Main Layout Ends         ***/
/*****************************************/

/*****************************************/
/***            7. Pages               ***/
/*****************************************/

/*****************************************/
/***          7.1 Login Page           ***/
/*****************************************/

.login__main {
	background: var(--color-blue-gradient);
	height: 100%;
	min-height: 100vh;
	width: 100%;
}

.login__container {
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	max-width: 400px;
}
.login__logo {
	margin: 50px auto;
	max-width: 260px;
	width: 100%;
	display: block;
}

.login__container p {
	color: white;
	text-align: center;
	margin-bottom: 50px;
}

.firebaseui-title {
	font-family: var(--font-family-body);
}

/*****************************************/
/***         7.2 Dashboard Page        ***/
/*****************************************/

/** CARD ROW **/
.card-row {
	padding-top: 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-gap: 15px;
	justify-content: space-between;
}

.card--half {
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	font-size: 14pt;
	padding: 20px 10px 40px;
	height: 200px;
	width: 100%;
	text-align: center;
}

.card--half span {
	color: var(--color-background-card);
	font-weight: 700;
}

.card--half i {
	font-size: 40pt;
	color: var(--color-background-card);
}

/* Media Queries for half card text */
@media only screen and (min-width: 380px) {
	.card--half {
		font-size: 16pt;
	}
}
@media only screen and (min-width: 500px) {
	.card--half {
		font-size: 18pt;
		padding: 20px 20px 40px;
	}
}

#study_streak {
	padding-bottom: 15px;
}

.card_primary {
	background: var(--color-green-gradient);
}

.card_success {
	background: var(--color-blue-gradient);
}

/** Dashboard Graph Card **/

.graph__card {
	margin-top: 30px;
	width: 100%;
	border-radius: var(--border-radius);
	padding: 30px 0 10px;
	box-shadow: var(--shadow-card);
	background-color: var(--color-background-card);
	overflow: hidden;
}

.graph__card--welcome {
	width: 100%;
	padding: 0 30px 30px;
}

/** Graph Headings **/
.graph__heading {
	text-align: center;
	font-size: 20pt;
	font-weight: 700;
	padding-top: 12px;
	margin-bottom: 30px;
}

/** Graph - Centers in card**/
.graph__card #chart {
	padding-right: 30px;
}

/*****************************************/
/***  7.3 Course Home/Archived Pages   ***/
/*****************************************/

/* Course List Parent Element */
.course__list {
	min-height: 50vh;
	display: flex;
	flex-direction: column;
	align-content: center;
	justify-content: center;
}

/* Individual Course Cards */
.course__container {
	display: flex;
	margin-top: 15px;
	width: 100%;
	border-radius: var(--border-radius);
	height: 80px;
	box-shadow: var(--shadow-card);
	background-color: var(--color-background-card);
	overflow: hidden;
}
.course-details__link {
	display: flex;
	width: 100%;
	transition: var(--transition-hover);
	overflow: hidden;
}

.course-settings__link {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 50px;
	height: 100%;
	border-left: 1px solid rgba(0, 0, 0, 0.05);
	transition: var(--transition-hover);
	cursor: pointer;
}

.course-details__link:hover,
.course-settings__link:hover {
	text-decoration: none;
	color: var(--color-secondary);
	background-color: var(--color-background-card-hover);
}

.course__color-div {
	width: 20px;
	height: 100%;
}

.course-details {
	width: 100%;
	padding: 10px 20px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	overflow: hidden;
}

.course-details .course__name {
	font-size: 24px;
}

.course-details .course__time {
	font-size: 18px;
	color: #777;
}

/* Add Course BTN */
.add-course-link {
	border-radius: var(--border-radius);
	padding: 18px;
	background: var(--color-primary);
	box-shadow: var(--shadow-card);
	width: 100%;
	font-size: 16px;
	font-family: var(--font-family-body);
	color: var(--color-background-card);
	transition: var(--transition-hover);
}

.add-course-link:hover {
	background: var(--color-primary-hover);
	color: var(--color-background-card);
}

hr {
	border-color: rgb(222, 226, 230);
	margin: 20px 0 20px;
}

/*** End Course Home Page ***/

/*****************************************/
/***      7.4 Course Details Pages     ***/
/*****************************************/

.course-details__card {
	margin-top: 30px;
	width: 100%;
	border-radius: var(--border-radius);
	padding: 30px;
	box-shadow: var(--shadow-card);
	background-color: var(--color-background-card);
	overflow: hidden;
	position: relative;
}

.course-details__color {
	top: 0;
	left: 0;
	right: 0;
	height: 12px;
	position: absolute;
}

.course-details__session-heading {
	font-size: 20px;
	margin-bottom: 20px;
}

.course-details__session-list {
	margin-bottom: 40px;
}

.course-details__session-list li {
	display: flex;
	flex-direction: column;
}
.session-list__time {
	font-size: 16px;
	padding-bottom: 10px;
}
.session-list__date {
	font-size: 12px;
	color: #777;
}

/*****************************************/
/***          7.5 About Page           ***/
/*****************************************/

.about__heading {
	text-align: center;
	font-size: 30px;
}

.about__logo {
	width: 80%;
	max-width: 350px;
	margin: 20px auto 40px;
	display: block;
}

.about__content {
	margin-bottom: 50px;
}

.about__content p,
.about__content li {
	line-height: 1.8;
}
