/* BODY */
body {
	min-height: 38rem;
}


/* SCREEN & IMAGES*/
#screen {
	margin-left: var(--margin);
	margin-right: var(--margin);
	padding-left: 0;
	padding-right: 0;
	height: 21.5rem;
	overflow: scroll;
	transition: all 0.5s ease-in-out;
	

	img {
		mix-blend-mode: luminosity;
		display: block;
		object-fit: cover;
		overflow: clip;
		aspect-ratio: 1/1;
		border-radius: var(--border-radius);
	}
}

#screen::-webkit-scrollbar {
	display: none;
}


/* IMG GRID */
.screen-grid {
	display: grid;
	gap: 1rem;
	min-width: 20rem;
	/* grid-template-columns: 2fr 2fr; */
}

.grid-item {
	width: 18rem;
	height: 22rem;
	overflow: hidden;
	margin-left: auto;
	margin-right: auto;
}

/* IMG DESCRIPTION */
.title-flex {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.description {
	color: var(--dark-green);
	font-size: var(--font-size);
	text-align: center;
}


/* FILTER CATEGORY BUTTONS */
.show-buttons {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.show-buttons label {
	cursor: pointer;
	position: relative;
	width: 3rem;
	height: 3rem;
	display: flex;
	justify-content: center;
	align-items: center;
}

label input {
	appearance: none;
}

label .show-highlight {
	position: absolute;
	width: 100%;
	height: 100%;
	background: linear-gradient(var(--bright-green), var(--light-green), var(--dark-green));
	border: 2px solid var(--dark-green);
	border-top-width: 4px;
	border-radius: 6px;
	box-shadow: inset 0 5px 1px rgba(0, 0, 0, 0.23), 0 5px 5px rgba(0, 0, 0, 0.5), 0 15px 25px rgba(0, 0, 0, 0.35);
}

.show-buttons label .show-highlight::before {
	content: '';
	position: absolute;
	border-top: 1px solid #fff;
	inset: 5px 3px;
	filter: blur(5px);
}

.show-buttons label input:checked ~ .show-highlight {
	box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.35), inset 0 5px 5px rgba(0, 0, 0, 0.5), inset 0 15px 25px rgba(0, 0, 0, 0.35);
}

label .show-p {
	position: relative;
	z-index: 10;
	font-size: 1rem;
	color: var(--dark-green);
}

.show-buttons label input:checked ~ .show-p {
	color: #fff;
	text-shadow: 0 0 5px #219cf3, 0 0 8px #219cf3;
}

.show-flex {
	display: flex;
	flex-direction: row;
	width: 18rem;
	justify-content: space-between;
	gap: 1rem;
	margin: auto;
	margin-bottom: 1rem;
	justify-self: center;
}

/* GAMEBOY ELEMENTS */	/* derived from https://codepen.io/amyyf/pen/rJBypJ */
/* OVERALL BOX AROUND BUTTONS */
.button-box {

	display: flex;
	justify-content: space-evenly;
	gap: 5rem;
	align-items: center;
	height: 8.5rem;
	margin: auto;
	position: sticky;
	bottom: 0;
}

/* ARROWS */
.arrow-group {
	height: 5rem;
	width: 5rem;
	display: flex;
	flex-wrap: wrap;
	position: relative;
}

.up-box {
	background-color: var(--black);
	border-radius: 4px 4px 0 0;
	box-shadow: 2px 2px 4px black, inset 2px 2px 4px darkgray, -1px -1px 2px black;
	height: 33%;
	width: 33%;
	left: 33%;
	position: absolute;
	cursor: pointer;
}

.right-box {
	background-color: var(--black);
	border-radius: 0 4px 4px 0;
	box-shadow: 2px 2px 4px black, inset 0 4px 4px -2px darkgray, -1px -1px 2px black;
	height: 33%;
	width: 33%;
	right: 0%;
	top: 33%;
	position: absolute;
	cursor: pointer;
}

.down-box {
	background-color: var(--black);
	border-radius: 0 0 4px 4px;
	box-shadow: 2px 2px 4px black, inset 4px 0 4px -2px darkgray, -1px -1px 2px black;
	height: 34%;
	width: 33%;
	bottom: 0%;
	left: 33%;
	position: absolute;
	cursor: pointer;
}

.center-box {
	background-color: var(--black);
	height: 33%;
	width: 33%;
	left: 33%;
	top: 33%;
	position: absolute;
}

.left-box {
	background-color: var(--black);
	border-radius: 4px 0 0 4px;
	box-shadow: 0 4px 4px -2px black, inset 2px 2px 4px darkgray, -1px -1px 2px black;
	height: 33%;
	width: 33%;
	top: 33%;
	position: absolute;
	cursor: pointer;
}

.right {
	transform: rotate(90deg);
}

.down {
	transform: rotate(180deg);
}

.left {
	transform: rotate(270deg);
}

.dent {
	background-color: var(--black);
	border-radius: 50%;
	left: 6px;
	top: 6px;
	position: absolute;
	height: 17px;
	width: 17px;
}

.selected {
	border: solid 2px var(--bright-green);
	box-shadow: inset 0 0 10px var(--bright-green), 0 0 10px var(--bright-green);
}

/* A/B BUTTON */
.ab-button {
	background-color: var(--red);
	box-shadow: 0 4px 4px -2px rgb(132, 0, 0), inset 2px 2px 4px darkgray, -1px -1px 2px rgb(96, 1, 1);
	border-radius: 50%;
	font-family: var(--fira);
	color: var(--basegray);
	height: 2rem;
	width: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ab-flex {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 5rem;
}

.a {
	align-self: end;
	cursor: pointer;
}

.b {
	align-self: start;
}


/* FILTER */
.show-video li, .show-image li, .show-link li {
	display: none;
}

.show-video li.video-block, .show-image li.image-block, .show-link li.link-block {
	display: flex;
}


/* EXPANDED SCREEN VERSION */
.expanded-mode #screen {
	width: 100vw;
	height: 90vh;
	/* top: 0;
	left: 0; */
	background-color: var(--dark-md-bg);
	transition: all 0.5s ease-in-out;
	margin: auto;
	margin-top: 0;
	border-radius: 0;
}

.expanded-mode .button-box {
	display: none;
}

.expanded-mode header {
	margin-bottom: 0;
	transition: all 0.5s ease-in-out;
	background-color: var(--dark-green);
}

.dark-mode {
	--dark-green: rgb(96,109,13);
	--light-green: rgb(58,66,7);
	background-color: var(--light-green);
	color: var(--dark-green);
}


/* BLOCK DIALOG MODAL POP UP */
li > button {
	cursor: pointer;
}

dialog {
	color: var(--light-green);
	inset: 0;
	place-content: center;
	place-items: center;
	margin-left: calc(var(--margin)*2);
	margin-right: calc(var(--margin)*2);
	margin-top: calc(var(--margin)*3.8);
	margin-bottom: calc(var(--margin)*7);
	background-color: var(--dark-green);
	border: solid 1px var(--bright-green);
	border-radius: var(--border-radius);
	min-height: 25rem;
}

dialog[open] {
	display: grid;
	gap: 0.5rem;
	padding-top: var(--padding);
	padding-bottom: var(--padding);

	/* div {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	} */

	.block-title {
		font-weight: 600;
	} 

	p {
		font-family: var(--fira);
		font-size: calc(var(--font-size)/1.2);
		min-width: 10rem;
		text-align: center;
		margin-bottom: var(--margin);
		max-width: 15rem;
	}

	img {
		width: 70%;
		margin-bottom: var(--margin);
	}
}


::backdrop {
	background-color: rgb(0 0 0 / 75%);
	backdrop-filter: blur(8px);
}

/*WELCOME MODAL  */
#welcome-text {
	font-size: var(--font-size);
	padding-left: 1rem;
	padding-right: 1rem;
}

#welcome-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3rem;
}

#close-modal {
	cursor: pointer;
	border: solid 1px var(--light-green);
	padding: var(--padding);
	border-radius: var(--border-radius);
}

/* DIRECTIONS MODAL */
#dialog {
	grid-template-columns: none;
}

#dialog > p {
	padding-bottom: 0;
}

.ab-span {
	padding-left: calc(var(--padding)/1.2);
	padding-right: calc(var(--padding)/1.2);
	border: solid;
	border-radius: var(--border-radius);
}

.close {
	border: solid 1px;
	border-radius: var(--border-radius);
	padding: var(--padding);
	cursor: pointer;
}

.close:hover {
	background-color: var(--light-green);
	color: var(--dark-green);
}

/* TABLET BREAKPOINT */
@media (min-width: 800px) {
	
	/* GAMEBOY */
	.gameboy {
		display: grid;
		grid-template-columns: 1fr 5fr 1fr;
		align-items: center;
	}

	.arrow-group {
		grid-column: 1;
		grid-row: 1;
		margin-left: var(--margin);
		margin-top: var(--margin);
	}

	.middle {
		grid-column: 2;
		justify-self: center;
	}

	#screen {
		width: 34rem;
		align-items: center;
		margin-bottom: calc(var(--margin)*1.2);
	}

	.screen-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1rem;
		width: max-content;
		margin: auto;
		justify-content: center;
		align-items: center;
	}
	
	.grid-item {
		border-radius: var(--border-radius);
		width: 15rem;
		height: 19.5rem;
		overflow: hidden;
	}

	.grid-item:hover {
		border: solid 2px var(--bright-green);
		box-shadow: inset 0 0 10px var(--bright-green), 0 0 10px var(--bright-green);
	}

	.selected {
		border: solid 2px var(--bright-green);
		box-shadow: inset 0 0 10px var(--bright-green), 0 0 10px var(--bright-green);
	}

	.ab-flex {
		grid-column: 3;
		justify-self: end;
		margin-right: var(--margin);
	}

	.button-box {
		display: contents;
	}
	

	/* DIALOG MODAL */
	dialog[open] {
		display: grid;
		grid-template-columns: 1fr 1fr;
		
	
		/* div {
			display: flex;
			flex-direction: column;
			gap: 0.5rem;
		} */
	
		.block-title {
			font-weight: 600;
		} 
	
		p {
			font-size: calc(var(--font-size)*1);
			min-width: 10rem;
			text-align: center;
			padding: var(--padding);
			margin-left: var(--margin);
		}
	
		img {
			width: 70%;
		}
	}


	/*WELCOME MODAL  */

	#welcome-modal[open] {
		grid-template-columns: none;
		
		p {
			font-size: calc(var(--font-size)*1.2);
		}
	}

	#welcome-text {
		min-width: 40rem;
	}

	#close-modal:hover {
		background-color: var(--light-green);
		color: var(--dark-green);
	}

	/* directions modal */
	#dialog > p {
		min-width: 40rem;
	}


	/* EXPANDED SCREEN VERSION */
	.expanded-mode #screen {
		bottom: 0;
		justify-content: center;
		align-items: flex-start;
		
	}

	.expanded-mode .screen-grid {
		align-items: center;
		margin-left: auto;
		margin-right: auto;
	}

	.dark-mode {
		--dark-green: rgb(96,109,13);
		--light-green: rgb(58,66,7);
		background-color: var(--light-green);
		color: var(--dark-green);
	}
}


/* DESKTOP BREAKPOINT */
@media (min-width: 1290px) {
	/* BODY */
	body {
		min-height: 68rem;
	}
	
	/* HEADER */
	header {
		height: 6rem;
	}

	h1 {
		font-size: calc(var(--font-size)*1.8);
	}

	.line {
		height: 6rem;
	}

	.header-container {
		gap: 20rem;
	}


	/* GAMEBOY */
	.gameboy {
		grid-template-columns: 2fr 8fr 2fr;
	}

	.arrow-group {
		margin-left: calc(var(--margin)*2.2);
		height: 8rem;
		width: 8rem;
	}

	.ab-flex {
		margin-right: calc(var(--margin)*1.5);
		width: 10rem;
	}

	.ab-button {
		width: 4rem;
		height: 4rem;
	}

	.a, .b {
		font-size: calc(var(--font-size)*1.6);
	}

	#screen {
		min-height: 40rem;
		min-width: 50rem;
		margin-top: calc(var(--margin)*1.5);
	}

	/* CONTENTS */
	.screen-grid {
		grid-template-columns: 1fr 1fr 1fr;
	}


	/* DIALOG MODAL */
	dialog {
		margin-bottom: 5rem;
	}

	dialog[open] {
		padding-top: calc(var(--padding)*2);
		padding-bottom: calc(var(--padding)*2);

		p {
			min-width: 25rem;
			font-size: calc(var(--font-size)*1.3);
		}
	}
}