/*Color variables*/
:root {
	--blue: hsla(220, 30%, 40%, 1);
	--darkBlue: hsla(220, 30%, 30%, 1);
	--lightBlue: hsla(220, 30%, 60%, 1);
	--gray: hsla(0, 0%, 70%, 0.5);
	--lightGray: hsla(0, 0%, 90%, 0.3);
	--darkGray: hsla(0, 0%, 50%, 0.5);
	--codeColor: hsla(0, 0%, 86%, 0.4);
	--baseWidth: 750px;
	--menuWidth: 140px;
}

* {
	box-sizing: border-box;
}

body {
	font-family: arial, helvetica, sans-serif;
	font-size: 100%;
	margin: 0;
}

h1 {text-align: center; padding: 30px 0px 20px 0px;}

h2 {text-align: center; padding: 30px 0px 0px 0px;}

h3 {text-align: center; padding-bottom: 50px; padding-top: 20px}

h4 {text-align: center;}

h5 {font-size: 1.2em; margin-bottom: 25px;}

p {font-size: 1em}

footer {text-align: center; color: rgba(100, 100, 100, 1); font-size: 1em; opacity: 0.8; margin-bottom: 20px;}

code, samp, .code {background-color: var(--codeColor); font-size: 1.1em; border-radius: 2.5px;}

ol.lectlist > li {margin-bottom: 40px}

li {margin-bottom: 15px}

i {margin-left: 25px}

hr {margin-top: 30px; margin-bottom: 15px;}

header.p p {text-align: center}

a {color: hsla(220, 30%, 20%, 1);}

.p {
	width: 750px;
	margin: 0 auto 25px;
}

footer p {margin-bottom: 7px;}

.ablock {margin-bottom: 50px;}

/*Exercise page iframe/menu division*/
.iframe {
	width: var(--baseWidth);
	height: 90vh;
	min-height: 649px;
	border: none;
	overflow: auto;
	display: inline-block;
}

.center {
	text-align: center;
}

/*lecture formatting*/
.lecture {overflow: auto;}

.lecture::-webkit-scrollbar {
	    width: 8px; 
	}

/* Hide scrollbar thumb initially */
.lecture::-webkit-scrollbar-thumb {
    width: 0; 
    transition: width 1s ease; 
}

/* Show scrollbar thumb on hover */
.lecture:hover::-webkit-scrollbar-thumb {
    width: 8px; 
    background-color: darkgray;
    border-radius: 4px;
}


.lecture::-webkit-scrollbar-corner {
	background: transparent;
}

.lect-title {
	margin-left: 22.2px
}

ol.lectlist h6 {
	font-size: 1.2em;
	font-weight: bold;
	margin: 20px 0 8px 0;
}

.lectlist {margin-right: 5px;}

.inner-list {
	padding-left: 22.8px;
	counter-reset: sub;
	list-style-type: none;
}

.inner-list li::before {
	counter-increment: sub;
	content: "1." counters(sub, ".") "	";
}

.inner-list div.inst {margin-left: 37.2px}

.instblock {margin:15px 0px 40px 20px;}

.sub-inst {margin: 15px 0 40px 37.2px;}

.inst {
	margin: 15px 0px 40px 60px;
}

.instcode, .in, .file, code.out, pre.out {
	padding: 10px 10px;
}

code.out, pre.out {
	border: 1px solid black;
	background-color: hsla(0, 0%, 10%, 0.9);
	color: white;
	display: inline-block;
	max-height: 150px;
	width: calc(100% - 95px);
	overflow-y: auto;
	border-radius: 0px;
}

.file {
	border: 1px solid black;
	border-radius: 0 0 5px 5px;
	background-color: hsla(0, 0%, 10%, 0.9);
	color: white;
	display: block;
	max-height: 150px;
	width: calc(100%);
	overflow-y: auto;
}

.file::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.file::-webkit-scrollbar-thumb {
	border: 1px solid darkgray;
	border-radius: 4px;
	background-color: darkgray;
}

.file::-webkit-scrollbar-corner {
	background: transparent;
}

.file-cont {
	width: calc(100% - 95px);
}

.in {
	border: 1px solid hsl(0, 0%, 70%);
	width: calc(100% - 95px);
	display: block;
	border-radius: 5px;
	overflow-x: auto;
	white-space: nowrap;
	background-color: var(--codeColor);
	max-width: 100%;
	max-height: 150px;
}

.in::-webkit-scrollbar {
	height: 8px;
}

.in::-webkit-scrollbar-thumb {
	border: 1px solid darkgray;
	border-radius: 4px;
	background-color: darkgray;
}

.in code {
	background-color: transparent;
}

ul.instblock {
	display: block;
}

.out code {
       background-color: transparent;
}       

.pinst, i {
	width: calc(100% - 115px);
}

.b {
}

p.codehead {
	background-color: hsla(0, 0%, 50%, 0.8);
	width: calc(100% - 95px);
	color: black;
	display: inline-block;
	margin: 0;
	padding: 0 10px;
	border: 1px solid black;
	font-size: 1.1em;
	font-family: monospace;
}

.file-cont p.codehead {
	width: 100%;
}

.instcode {
	border: 1px dashed gray;
	background-color: hsla(0, 0%, 85%, 0.3);
	width: calc(100% - 45px);
	margin-left: 10px;
}

pre {margin: 0;}

pre.out code {white-space: pre;}

.copy {
	background-color: var(--lightGray);
	padding: 5px 10px;
	border: 1px solid gray;
	border-radius: 3px;
	bottom: 6.6px;
	cursor: pointer;
	margin-left: 10px;
	align-self: flex-end;
	margin-bottom: 5px;
	opacity: 0;
	visibility: hidden;
	transition: transform 0.2s ease;
}

.copy:hover {
	background-color: ; 
    transform: translateY(-2px);
}

.copy:active {
	background-color: var(--gray);
    transform: translateY(0); 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.display {
	opacity: 1;
	visibility: visible;
	transition: opacity: 0.9s ease;
}

.code-container {
	display: flex;
	align-items: flex-start;
	margin: 5px 0 15px;
}

/*Next and previous button for lectures*/
.navBtn img {
	margin-bottom: 25px;
	width: 30px;
	height: 30px;
	cursor: pointer;
}

#prevBtn {
	float: left;
	margin-left: 100px;
	transform: rotate(180deg);
}

#nextBtn {
	float: right;
	margin-right: 100px;
}

.tooltip {
	position: relative;
	display: inline-block;
}

.tooltip .tooltipText {
	visibility: hidden;
	width: 130px;
	border-radius: 5px;
	text-align: center;
	padding: 5px 0;
	position: absolute;
	z-index: 1;
	bottom: 120%;
	right: -50px;
	background-color: hsla(0, 0%, 5%, 0.9);
	color: white;
}

.tooltip.right .tooltipText {
	right: calc(65px - 15px);
}

.tooltip:hover .tooltipText {
	visibility: visible;
}

.right {float: right;}

.tooltip .tooltipText::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: hsla(0, 0%, 5%, 0.9) transparent transparent transparent;
}

/*Media querry responsivness for main pages*/
@media only screen and (max-width: calc(750px + (120px + 25px) * 2 + 15px + 41px)) and (min-width: 500px) {
       .p {
       		margin: 0 auto; 
		width: calc(100% - 50px);
		max-width: 750px;
	}

			.iframe {
       		width: calc(100% - 50px); 
		max-width: var(--baseWidth);
		float: none;
	       	box-sizing: border-box;
	       	resize: none;
		margin: auto;
	}


}       

@media (max-width: 500px) {

	.lect-title {
		margin-left: 7.7px
	}

	.inst {
		margin-left: calc( 10vw);
	}

	.instblock {
		margin-left: calc(10vw - 40px);
	}

	.lectlist {
		padding-left: calc(25.5px);
	}

	code.in, div.in code, div.in, .file-cont {width: calc(100% - 65px)
	}

	code.out, p.codehead, pre.out {
		width: calc(100% - 8.675px)
	}

	.pinst {
		width: calc(100% - 8.675px)
	}

	.iframe {
		width: 100%;
		margin: auto;
	}

		.p {
		margin: 0 auto;
		width: calc(100% - 30px);
	}

	.instcode {
		overflow: auto;
	}

	hr {
		width: 80%;
	}

	body {
		width: 100%;
		margin: auto;
	}

	.copy {display: inline-block;}
}

