@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Source+Code+Pro:wght@500&display=swap');
@import url('../font/IBM-Plex-Mono/IBM-Plex-Mono.css');

:root{
	--default-transition: all 300ms cubic-bezier(0.2, 0, 0, 1);
	--primary-color: #04aa6d;
	--primary-active-color: #059862;
	--code-highlight-line: #04aa6d;
	--main-font: 'Montserrat', 'Helvetica Nueue', 'Roboto', sans-serif;
	--mono-font: 'IBM Plex Mono', 'Source Code Pro', 'Consolas', monospace;
}

::selection {
	background-color: var(--selection);
}

/* scrollbar */
::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  box-shadow: inset 0 0 14px 14px transparent;
  border: solid 4px transparent;
}

::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 14px 14px #666;
  border: solid 3px transparent;
  border-radius: 14px;
}

::-webkit-scrollbar-thumb:hover {
  box-shadow: inset 0 0 14px 14px #909090;
}

::-webkit-scrollbar-button {
  display: none;
}

body, html{
	padding: 0;
	margin: 0;
	font-family: var(--main-font);
	margin: 0 auto;
    max-width: calc(1920px + 44px); /* + padding L/R */
	background-color: var(--bg);
	color: var(--text);
	padding-left: max(22px,env(safe-area-inset-left));
    padding-right: max(22px,env(safe-area-inset-right));
	transition: all 200ms cubic-bezier(0.2, 0, 0, 1);
	scroll-behavior: smooth;
}

a{
	color: var(--text);
	text-decoration: none;
	cursor: pointer;
}
a:hover {
	text-decoration: underline;
}

small{
	font-size: 0.8em;
}

.dashed-hr {
	border: none;
	height: 1px;
	background: repeating-linear-gradient(90deg,var(--text),var(--text) 6px,transparent 6px,transparent 12px);
}

.p-img{
	width: 100%;
	height: auto;
	margin: 10px 0;
}


.timed-alert{
	/*
	position: fixed;
	bottom: calc(5vh - 15px);
	right: calc(10vw - 15px);
	*/
	z-index: 100;
	font-size: 12px;
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	/*animation: timed-alert-hide 0.1s 5s forwards;*/
}
.timed-alert .bar{
	width: calc(100% - 30px);
	margin: 0 15px;
	height: 1px;
	background-color: var(--text);
	animation: alert-progress 5s linear forwards;
}

.localStorage-alert{
	border: 1px solid var(--text);
	border-radius: 25px;
	background: rgba(var(--bg-rgb), 0.9);
	padding: 10px 15px;
}

.localStorage-alert-accept-btn{
	margin-right: 10px;
}

.alert-btn{
	width: 100%;
	display: flex;
	justify-content: space-between;
}

.alert-btn a{
	cursor: pointer;
}

@keyframes alert-progress {
	0% { width: calc(100% - 30px); }
	100% { width: 0; }
}
@keyframes timed-alert-hide {
	99% { visibility: visible; }
	100% { visibility: hidden; }
}


.out{
	display: flex;
	height: 100%;
	position: relative;
}


.nav{
	height: 100vh;
	font-size: min(1.2em, 2.2vw);
	font-weight: 600;
	width: 15%;/*max(20vh, 15%);*/
	position: fixed;
}

.nav-btn{
	display: grid;
	grid-template-columns: repeat(1fr);
	place-items: center;
	height: 90%;
	width: 100%;
}

.nav-btn a{
	border-radius: 25px;
	border: 1px solid var(--text);
	height: 10vw;
	max-height: 100px;
	width: 14vw;
	max-width: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: var(--default-transition);
	font-size: 16px;
	text-decoration: none;
}
.nav-btn a:active, .nav-btn a:focus{
	border-radius: 15px;
}
.nav-btn a:hover{
	background: var(--hover-btn);
}

.nav-btn-active{
	border-radius: 15px !important;
	background-color: var(--primary-color) !important;
	color: var(--inverted-text) !important;
	border-color: var(--inverted-text) !important;
}
.nav-btn-active:hover{
	background: var(--primary-active-color) !important;
}

.nav-footer-container{
	width: 100%;
	display: flex;
	justify-content: center;
}

.nav-footer{
	display: grid;
	grid-template-rows: 1fr 1fr;
	place-items: center;
	height: 60px;
	width: 10vw;
	max-width: 100px;
	bottom: -25px; /* show: 0 */
	font-size: 15px;
	position: absolute;
	transition: var(--default-transition);
}
#theme-btn{
	font-size: 20px;
	padding-top: 3.5px; /* Google's Material Icon isn't centered */
}

.nav-footer-links{
	border-top-right-radius: 15px; /* 15px to 25px */
	border-top-left-radius: 15px; /* 15px to 25px */
	border: 1px solid var(--text);
	border-bottom: none;
	display: flex;
	justify-content: space-around;
	align-items: center;
	width: 100%;
	padding: 11.5px 0 15px 0; /* Google's Material Icon isn't centered */
	transition: var(--default-transition);
}
.nav-footer-links div{
	cursor: pointer;
}
.nav-footer-links a{
	margin-right: 2px; /* Google's Material Icon isn't centered */
}

.nav-footer-settings-icon{
	margin-bottom: 10px;
	cursor: pointer;
}

.nav-footer:hover{
	bottom: 0px;
}
.nav-footer:hover .nav-footer-links{
	border-top-right-radius: 25px;
	border-top-left-radius: 25px;
}
.nav-footer:hover .nav-footer-settings-icon{
	margin-bottom: 0;
}

.content{
	width: 100%;
	display: flex;
	align-items: center;
	padding: 50px 25px 0 25px;
	margin-left: max(20vh, 15%);
	flex-direction: column;;
	min-height: calc(100vh - 50px);
}

h1{
	font-size: 36px;
	/*margin: 32px 0;*/
	margin-top: 32px;
	margin-bottom: 0;
}
h2{
	font-size: 24px;
	/*margin-top: 24px;*/
	margin-bottom: 16px;
	margin-top: 0;
}
h3, h4{
	font-size: 18px;
	margin-top: 16px;
	margin-bottom: 8px;
}
p{
	margin: 16px 0;
}

.mono{
	font-family: var(--mono-font);
}

.paragraph{
	width: 100%;
	padding: 15px 0;
}
.list-paragraph{
	margin: 16px 0;
}
.list-paragraph p{
	margin: 0;
}
p.nota{
	font-size: 12px;
	margin: 0;
	margin-top: 5px;
	line-height: 150%;
}

.content-text{
	line-height: 150%;
	text-align: justify;
	font-size: 16px;
}

.content-text-container{
	max-width: 700px;
	width: 100%;
	flex-grow: 1;
}

.simulation{
	display: grid;
	grid-template-columns: 1fr 1fr;
	place-items: center;
}

.simulation-container{
	background-color: var(--code-container-bg);
	padding: 25px;
	border-radius: 25px;
}
.simulation-container h2{
	margin-top: 0;
}

.code{
	font-family: 'Consolas', monospace;
	font-size: 16px;
	line-height: 150%;
	margin: 0;
	padding: 15px;
	border-radius: 15px;
	background-color: var(--bg);
}
.codeLine{
	white-space: pre;
	margin: 0;
}
.codeLine-active{
	background-color: var(--code-highlight-line);
}

.codePanel-container{
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	height: 100%;
	width: 100%;
}

.codePanel-container h3{
	margin-top: 0;
}
.codePanel{
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}
.codePanel-note{
	position: absolute;
	bottom: 0;
}
.codePanel-memory{
	text-align: center;
	width: 100%;
}

.codeBlock{
	border: 1px solid var(--text);
}

#stackFrame{
	width: 100%;
	font-family: var(--mono-font);
	position: relative;
	text-align: right;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-direction: column;
}

#stackFrame hr{
	width: 100%;
}

.stackFrame-block{
	width: 100%;
	display: flex;
	justify-content: space-between;
}

#stackFrame .codeLine{
	padding: 0 5px;
	font-size: max(0.8em, 16px);
}

.stackFrame-lineContainer{
	display: flex;
	flex-direction: column;
	width: 100%;
}

.stackFrame-name{
	padding: 0 5px;
	font-weight: 600;
	font-family: var(--main-font);
	margin: 0;
	color: var(--primary-color);
}

.heapFrame-block{
	width: 100%;
}

.codePanel-btn{
	margin-top: 10px;
}
.codePanel-btn .btn-bg:hover{
	background-color: var(--primary-active-color);
}
.codePanel-btn .btn-bg{
    font-weight: 600;
    cursor: pointer;
    border-radius: 48px;
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: #fff;
    width:fit-content;
    border: none;
    text-decoration: none;
    transition: all 200ms cubic-bezier(0.2, 0, 0, 1);
}


/***** Examples *****/
.example-stackStructure{
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0 30%;
}
.example-stackStructure .example-stackStructure-element{
	border: 1px solid var(--text);
	width: 100%;
	padding: 10px;
	text-align: center;
}


/***** Footer *****/
.footer-container{
	max-width: 700px;
	width: 100%;
	padding: 50px 0 25px 0;
	font-size: 14px;
}
.footer{
	display: flex;
	justify-content: flex-end;
	width: 100%;
}