/*
	This file is part of Nevergreen.

	Nevergreen is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Nevergreen is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Nevergreen.  If not, see <https://www.gnu.org/licenses/>.
*/

:root {
	/* Colors */
	--track-shadow: rgba(0,0,0,0.5);
	--thumb-color: var(--emphasis-color);
	--thumb-shadow: var(--full-ever-green);
		/* Gradients */
	--bottom-fade: linear-gradient(to bottom, var(--transparent-ever-green) 0%, var(--full-ever-green) 100%);
	--top-fade: linear-gradient(to top, var(--transparent-ever-green) 0%, var(--full-ever-green) 100%);
	--glow-low: 0 0 .5rem .05rem var(--glow-hilite-color);
	--glow-full: 0 0 1.2rem .05rem var(--glow-hilite-color);
}

html.lightTheme {
	/* Colors */
	--full-ever-green: rgba(72, 103, 96, 1.0);
	--fade-ever-green: rgba(72, 103, 96, 0.5);
	--transparent-ever-green: rgba(72, 103, 96, 0.0);
	--emphasis-color: rgba(255,255,255,1.0);
	--text-color: rgba(255,255,255,0.9);
	--glow-hilite-color: rgba(94,8,90,1.0);
}
html.darkTheme {
	--full-ever-green: rgba(30,64,56,1.0);
	--fade-ever-green: rgba(30,64,56,0.5);
	--transparent-ever-green: rgba(30,64,56,0.0);
	--emphasis-color: rgba(255,142207,1.0);
	--text-color: rgba(241,215,255,1.0);
	--glow-hilite-color: rgba(255,0,157,0.8);
}

body {
	width: 100vw;
	height: 100vh;
	font-family: "Roboto", sans-serif !important;
	font-size: 14px !important;
 	background-color: #00ff00;
	user-select: none !important;
}

#container {
	height:100%;
	width:100%;
	margin:0;
	padding:0;
	display:block;
	overflow: hidden;
	position: relative;
}

#topright {
	top: 0;
	right: 0;
}
#topleft {
	top: 0;
	left: 0;	
}
#bottomleft {
	bottom: 0;
	left: 0;
}
#bottomright {
	bottom: 0;
	right: 0;
}
.cornerBtn {
	position: absolute;
	width: 3rem;
	height: 3rem;
	background-color: transparent;
	margin: 0;
	/* padding: .5rem; */
	display: flex;
	/* align-content: center; */
	align-items: center;
	justify-content: space-around;
}

#welcomeBoxContainer {
	width: 100%;
	height:  100%;
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
	align-items: center;
}
#welcomeBoxContainer > div {
	z-index: 2;
}

#welcomeBox {
	width: 92%;
  max-width: 45rem;
  max-height: 50%;
	background-color: var(--full-ever-green);
  transition: transform .3s cubic-bezier(0.2, 1.0, 0.85, 1.0);
	transform: scale(0);
}

#welcomeText {
	margin: 1rem ;
	column-gap: 1rem;
	height: calc(100% - 3rem);
	display: flex;
	flex-direction: column;
}

#welcomeHeader {
	background-image: url("./hello.png");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
	min-height: 32px;
	flex-grow: 1;
	flex-shrink: 1;
	flex-basis: 75px;
}

#welcomeBlurb {
	position: relative;
	color: var(--text-color);
  flex-grow: 1;
  flex-shrink: 1;
  line-height: 1.4;
	font-size: clamp(0.5rem, 0.7rem + 0.5vw, 1.2rem);
	overflow-y: auto;
	overflow-x: hidden;
	font-weight: 300;
}
#welcomeBlurb strong {
	color: var(--emphasis-color);
	font-weight: 400;
}

.scrollableContainer {
}

.fade {
  display: none;
}

.fadeTop {
  position: sticky;
  top: 0px;
  height: 1rem;
  background: var(--top-fade);
}

.fadeBottom {
  position: sticky;
  bottom: 0px;
  height: 1rem;
  background: red;
  background: var(--bottom-fade);
}

#scrollIndicator {
	display: none;
	position: absolute;
	bottom: 2rem;
	left: calc(50% - 1.5rem);
  width: 0;
  height: 0;
  border-left: 1.5rem solid transparent;
  border-right: 1.5rem solid transparent;
  border-top: 1rem solid var(--emphasis-color);
  opacity: 0;
  animation-name: bounce;
  animation-duration: .6s;
  animation-iteration-count: 3;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

::-webkit-scrollbar {
	box-sizing: border-box;
  width: 1.2rem;
  height: 120%;
}

/* Track */
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 .3rem var(--track-shadow);
  border-radius: .6rem;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--thumb-color);
  box-shadow: inset 0 0 .3rem var(--thumb-shadow);
  border-radius: .6rem;
}

#buttonRow {
  flex-grow: 1;
  flex-shrink: 1;
  max-height: 3rem;
  gap: 1rem;
	display: flex;
	flex-direction: row;
	width: 92%;
	max-width: 45rem;
	line-height: 1.2;
	justify-content: space-between;
  transition: transform .3s cubic-bezier(0.2, 1.0, 0.85, 1.0);
	transform: scale(0);
}

.buttonContainer {
	color: var(--text-color);
	background-color: var(--full-ever-green);
	text-align: center;
	flex-grow: 1;
	flex-shrink: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.toggle {
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	max-width: 96%;
	font-size: clamp(0.6rem, 2vw + 0.5rem, 1.5rem);
	font-variant: all-petite-caps;
	font-weight: 300;
}

#popupMessage {
	display: none;
	position: fixed;
	top: 25%;
	left: 25%;
	width: 50%;
	height: 50%;
	z-index: 9999;
	padding: 10px;
	border-radius: 3px;
	box-shadow: 0 0 5px black;
	color: white;
	background: rgba(0,0,0,0.9);
}
#popupMessage .title {
	font-size: clamp(1.5rem, 1rem + 0.8vw, 3rem);
	line-height: 2em;
	height: 2em;
	width: 100%;
	background-color: black;
	color: white;
	text-align: center;
}
#popupMessage .message {
	font-size: clamp(0.5rem, 0.5rem + 0.8vw, 2rem);
	margin: 1em;
	width: calc(100% - 2em);
	height: calc(100% - 2em);
	position: relative;
}
#close {
    box-sizing: border-box;
    position: absolute;
    top: calc(100% - 3em);
    left: calc(50% - 1.1em);
    font-size: 1.1em;
    line-height: 2;
    width: 2.2em;
    height: 2.2em;
    margin: 0.1em;
    text-align: center;
    border-radius: 1.1em;
    border-style: solid;
    border-width: 0.1em;
    border-color: white;
    box-shadow: inset 0 0 0.3em white;
    background-color: black;
    color: white;
}
#close:active {
	border-style: inset !important;
}

.tracking {
	/* margin: 1rem; */
	display: none;
	z-index: 1;
	width: 0;
	height: 0;
	border-width: 1rem;
	border-style: solid;
	border-radius: 1rem;
	border-top-color: black;
	border-bottom-color: black;
	border-left-color: white;
	border-right-color: white;
	box-shadow: 0 0 0 .05rem black;
	transform-origin: center;
	transform: scale(0.0);
	opacity: 0;
}

.trackingStartAnim {
  animation-name: trackingStartAnim;
  animation-duration: 1s;
  animation-iteration-count: 1;
  animation-timing-function: ease-int;
  animation-fill-mode: forwards;
}
.trackingStartAnim:nth-of-type(1) {
	animation-delay: 0.1s;
}
.trackingStartAnim:nth-of-type(2) {
	animation-delay: 0.2s;	
}
.trackingStartAnim:nth-of-type(3) {
	animation-delay: 0.3s;
}
.trackingStartAnim:nth-of-type(4) {
	animation-delay: 0.4s;
}

.mobile {
	display: none;
}
.notMobile {
	display: unset;
}

@media (hover: none) and (pointer: coarse) {
	:root {
		--device-type:touch;
	}
	.mobile {
		display: unset;
	}
	.notMobile {
		display: none;
	}
}

@media only screen and (min-width: 768px) {
	:root {
		--device-type:click;
	}
	.cornerBtn {
		width: 5rem;
		height: 5rem;
	}
	.tracking {
	  border-width: 2rem;
	  border-radius: 2rem;
	}
	body {
		font-size: 16px;
	}	
}

input {
	margin: 0;
	padding: 0;
	text-align: center;
	width: max-content;
	background-color: transparent !important;
	color: var(--text-color);
	font-variant: all-petite-caps;
}

input,
input:active,
input:hover {
	border: none !important;
}

.buttonContainer {
	position: relative;
	cursor: pointer;
}

.borderSpin {
	animation-delay: 0s;
	animation-name: borderSpin;
	animation-duration: 2s;
	animation-timing-function: ease-in-out;
	animation-iteration-count: 1;
}

.pulse {
	animation-name: pulse;
	animation-duration: .6s;
	animation-timing-function: ease-in;
	animation-iteration-count: 1;
	animation-fill-mode: forwards;
}

.pulse:nth-of-type(1) {
	animation-delay: 0s;
}

.pulse:nth-of-type(2) {
	animation-delay: 0.2s;
}

#welcomeBox.pulse {
	animation-delay: 0.4s;
}

@keyframes pulse {
	0% {
		box-shadow: none;
	}
	60% {
		box-shadow: var(--glow-full);
	}
	100% {
		box-shadow: var(--glow-low);
	}
}

@keyframes trackingStartAnim {
	10% {
		opacity: 0;
		box-shadow: 0 0 0 .05rem black, var(--glow);
		transform: scale(0);
	}
	50% {
		opacity: 0.5;
		box-shadow: 0 0 0 .05rem black, var(--glow);
		transform: scale(1);
	}
	75% {
		opacity: 1;
		box-shadow: 0 0 0 .05rem black, var(--glow);
		transform: scale(1);
	}
	100% {
		opacity: 1;
		box-shadow: 0 0 0 .05rem black;
		transform: scale(1.0);
	}
}

@keyframes bounce {
	0% {
		opacity: 0;
		transform: translateY(0.1rem);
	}
	5% {
		opacity: 0.2;
		transform: translateY(0.1rem);
	}
	10% {
		opacity: 0.2;
		transform: translateY(0.2rem);
	}
	50% {
		opacity: 1.0;
		transform: translateY(0.7rem);
	}
	90% {
		opacity: 0.2;
		transform: translateY(0.2rem);
	}
	100% {
		opacity: 0;
		transform: translateY(0rem);
	}
}

@keyframes trackingStartAnim {
	10% {
		opacity: 0;
		box-shadow: 0 0 0 .05rem black, var(--glow);
		transform: scale(0);
	}
	50% {
		opacity: 0.5;
		box-shadow: 0 0 0 .05rem black, var(--glow);
		transform: scale(1);
	}
	75% {
		opacity: 1;
		box-shadow: 0 0 0 .05rem black, var(--glow);
		transform: scale(1);
	}
	100% {
		opacity: 1;
		box-shadow: 0 0 0 .05rem black;
		transform: scale(1.0);
	}
}