:root {
	--BODY-LINK-HOVER: #ff69b477;
	--BLOCK-HOVER: #d1cab4;
	--BODY-BG: url("https://static.igem.wiki/teams/5645/wiki-images/body/body-lightmode-bg.webp");
}

:root[data-theme="dark"] {
	--BLOCK-HOVER: #4f4440;
	--BODY-BG: url("https://static.igem.wiki/teams/5645/wiki-images/body/body-darkmode-bg.webp");
}

body {
	background-image: var(--BODY-BG);
	color: var(--BODY-COLOR);
	overflow-x: hidden;
}

.experiment-page-container {
	font-family: "Nunito", Calibri, sans-serif;
	justify-content: center;
	position: relative;
	background-color: var(--BODY-BGCOLOR);
	font-size: min(1.2rem, 5vw);
	justify-items: center;
	padding: 2rem;
	width: 80vw;
	margin: 1rem auto;
	border-radius: 1rem;
}

.experiment-tab {
	background-color: var(--BODY-BGCOLOR2);
	width: 70vw;
	display: flex;
	justify-content: space-between;
	padding: 1vw 3vw;
	align-items: center;
	cursor: pointer;
	margin: 1vh 0;
	transition: all 0.2s ease-in-out;
	border-radius: 4px;
}

.experiment-tab:hover {
	background-color: var(--BLOCK-HOVER);
}

.experiment-tab img {
	width: 60px;
}

.experiment-tab h2 {
	font-size: min(1.7rem, 4vw);
	display: flex;
	align-items: center;
	justify-content: space-around;
	font-family: "Nunito", Calibri, sans-serif;
	font-weight: 500;
}

.experiment-tab .learn-more {
	font-size: 3rem;
	padding: 0 0.5rem;
	font-family: "Times New Roman", Times, serif;
	font-weight: 900;
}

.experiment-tab img {
	margin-right: 30px;
}

.expt-bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.1);
	z-index: 5;
	display: none;
}

.experiment-details {
	position: fixed;
	top: 15%;
	left: 50%;
	transform: translateX(-50%);
	width: 65vw;
	max-height: 80vh;
	padding: 3vw;
	background-color: var(--BODY-BGCOLOR);
	border-radius: 8px;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
	z-index: 100;
	display: none;
	overflow-y: auto;
	scrollbar-width: none;
}

.experiment-details.active {
	display: block;
}

.close-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	font-size: 1.5rem;
	background: none;
	border: none;
	cursor: pointer;
	color: #555555;
}

figure {
	margin: 1vh 1vw;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

figure img {
	flex: 0 0 50%;
	max-width: max(45vw, 300px);
	box-sizing: border-box;
	padding: 5px;
	padding: 0;
	margin: 2rem auto 0 auto;
	border: 2px solid white;
	margin: 2px;
}

figcaption {
	width: 100%;
	text-align: center;
	margin-top: 8px;
}

figcaption {
	text-align: center;
	color: gray;
}

.page-intro {
	margin: 2rem;
	/* text-indent: 2rem; */
}

.intro-image {
	margin: 2rem;
}

.intro-image img {
	max-width: 60%;
}

.experiment-details h2 {
	font-size: min(2.4rem, 8vw);
	align-self: center;
	text-align: center;
	margin: 3vw auto 0 auto;
	border-bottom: 3px solid var(--ACCENT-COLOR);
	width: fit-content;
	padding: 5px 15px;
}

.expt-content {
	padding: 1vw 3vw;
	font-size: 1.2rem;
}

.expt-content h3 {
	font-family: "Nimbu";
	font-size: min(2.4rem, 8vw);
	margin: 2vh 0;
}

.expt-content h4 {
	font-size: 1.2rem;
	margin: 1vh 0;
	font-weight: bold;
}

.expt-content p {
	padding: 1vw;
}

.expt-content a {
	color: var(--BODY-COLOR);
	text-decoration: none;
	box-shadow: inset 0 -0.2rem 0 var(--ACCENT-COLOR);
	transition-property: box-shadow;
	transition-duration: 0.5s;
	padding: 0 0.2rem;
	border-radius: 0.2rem;
	overflow-wrap: break-word;
}

.expt-content a:hover {
	box-shadow: inset 0 -1.7rem 0 var(--BODY-LINK-HOVER);
	transition-property: box-shadow;
	transition-duration: 0.5s;
}

.expt-content ul,
.expt-content ol {
	padding: 1vw 1vw 1vw 5vw;
}

.expt-content li {
	margin: 3px 0;
}

.note {
	padding: 1.25rem;
	margin-top: 1.25rem;
	margin-bottom: 1.25rem;
	border: 1px solid gray;
	border-left-width: 0.25rem;
	border-radius: 0.25rem;
	border-left-color: var(--ACCENT-COLOR);
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

th,
td {
	border: 1px solid var(--BODY-COLOR);
	padding: 1vh 1vw;
	text-align: center;
}

th {
	background-color: var(--BODY-BGCOLOR2);
}

.formula {
	font-size: 1.1rem;
}
.fraction {
	display: inline-block;
	vertical-align: middle;
	text-align: center;
	margin: 0 0.4rem;
}
.fraction .num {
	display: block;
	padding: 0 0.5rem;
	border-bottom: 1px solid;
}
.fraction .den {
	display: block;
	padding: 0 0.5rem;
}

@media screen and (max-width: 850px) {
	body {
		background-position: left;
	}

	.experiment-tab {
		height: fit-content;
	}

	.experiment-tab img {
		width: 40px;
	}

	.experiment-details {
		width: 80vw;
	}

	.buttons-invisible-mobile {
		display: none;
	}

	.experiment-tab img {
		margin-right: 10px;
	}
}
