@import './_table.css';
@import './_nav.css';
@import './_login.css';
@import './_form.css';

/* Sources 
https://tailwindcss.com/docs/colors
https://stackoverflow.com/questions/14859322/css3-spin-animation
https://stackoverflow.com/questions/4411306/transition-of-background-color
*/

:root {
	--gray: oklch(87.2% 0.01 258.338);
	--lightgray: oklch(92.8% 0.006 264.531);
	--darkgray: oklch(37.3% 0.034 259.733);
	--spinner-color: oklch(59.6% 0.145 163.225);
	--offwhite: oklch(98.5% 0.001 106.423);
	--row-hover-offwhite: oklch(96.8% 0.007 247.896);
	--gradient-start:oklch(44.8% 0.119 151.328);
	--gradient-end: oklch(64.8% 0.2 131.684);
	--shadow-color: oklch(86.9% 0.022 252.894);
}

body {
    background: white;
}

h1, h2, h3, h4, h5, h6, p, th, td {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.page-content {
	margin-top: 5vh;
	position: relative;
    padding-bottom: 50px;
}

/* Default states */
.page-content, .toast, .login-content, .transaction-form {
	display: none;
}

/* Header */
.header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 40px;
	flex-wrap: wrap;
}

.header-left {
	display: flex;
	align-items: center;
}

.author {
	position: absolute;
	top: 10px;
	right: 10px;
	font-size: 0.6rem;
	color: var(--darkgray);
	font-weight: 400;
	margin: 0;
	padding: 0;
	text-align: right;
}

.header-left img {
	margin-right: 10px;
}

#createButton, #resync {
	display: block;
}

#resync {
	margin-right: 10px;
}

.button-container {
	z-index: 999;
	justify-content: end;
	display: flex;
	align-items: center;
}

#toast {
	position: fixed;
	top: 20px;
	left: 40px;
	z-index: 1001;
	background: var(--offwhite);
	padding: 10px;
	border-radius: 5px;
	box-shadow: 0 2px 10px var(--shadow-color);
	border: 1px solid var(--gradient-end);
}

@media (min-width: 768px) {
	#pageContent {
		max-width: 65vw;
		margin: 10vh auto 0px auto;
	}
	#bottomNav {
		max-width: 65vw;
		margin: 0 auto !important;
	}
	.stats-row { 
		flex-wrap: wrap;
	}
}
@media (max-width: 1200px) {
	.stats-container {
		flex-wrap: wrap;
	}
	.stat-item {
		min-width: 45% !important;
	}
}
@media (max-width: 480px) {
	.stat-item {
		min-width: 94% !important;
	}

}
@media (max-width: 780px) {
	#transactionCount {
		display: none;
	}
	.display-control {
		margin-left: 10px !important;
	}
}

/* Stats */
.stats-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.stat-item {
	min-width: 22%;
	padding: 10px;
	border-radius: 6px;
	background: var(--offwhite);
	box-shadow: 0 2px 10px var(--shadow-color);
	border: 1px solid var(--gradient-start);
	margin-bottom: 10px;
}

.stat-item h2 {
	font-size: 0.8rem;
	padding: 0;
	margin: 0;
	font-weight: 400;
	color: oklch(44.6% 0.043 257.281);
}

.stat-item p {
	font-size: 1rem;
	padding: 0;
	margin: 0;
	font-weight: 600;
}


/* Spinner  */
.spinner {
	display: none;
	position: fixed;
	top: 60%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1000;
}

.spinner-circle {
	width: 50px;
	height: 50px;
	border: 5px solid var(--offwhite);
	border-top: 5px solid var(--spinner-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto;
}

.spinner-text {
	font-size: 0.8rem;
	font-weight: bold;
	text-align: center;
	color: var(--spinner-color);
}

/* https://stackoverflow.com/questions/14859322/css3-spin-animation */
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}


