
aside#image-gallery {
	background-color: rgba(0, 0, 0, 0.85);
	position: fixed;
	top: 0px;
	left: 0px;
	width: 100vw;
	height: 100vh;
	z-index: 8;
	
	--max-image-width: 1480px;
	--image-margin-x: calc((100vw - var(--max-image-width)) / 2.0);
}

aside#image-gallery > ul#image-list {
	display: grid;
	width: 100%;
	height: 100%;
	grid-auto-flow: column;
	grid-auto-columns: 100vw;
	grid-template-rows: 100vh;
	overflow: hidden;
}

aside#image-gallery > ul#image-list > li {
	width: 100%;
	height: 100%;
}

aside#image-gallery > ul#image-list figure {
	display: grid;
	grid-template-columns: var(--image-margin-x) var(--max-image-width) var(--image-margin-x);
	grid-template-rows: 1fr 75vh 1fr;
	width: 100%;
	height: 100%;
}

aside#image-gallery figure img {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
	align-self: center;
	justify-self: center;
	display: block;
	max-height: 100%;
	max-width: 100%;
	object-fit: scale-down;
}

aside#image-gallery figure footer {
	grid-column: 2 / 3;
	grid-row: 3 / 4;
	align-self: start;
	display: flex;
	justify-content: space-between;
	padding: 25px 0;
	color: white;
	font-family: 'Circular-Bold';
	font-size: 24px;
}

/*  Navigation overlay */

aside#image-gallery > nav#gallery {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	z-index: 10;

	display: grid;
	grid-template-columns: var(--image-margin-x) repeat(2, calc(var(--max-image-width) / 2.0)) var(--image-margin-x);
	grid-template-rows: 1fr 75vh 1fr;
	grid-template-areas:"x . . ."
						"l l r r"
						". . . .";
}

nav#gallery button:focus {
	outline: none;
}

/*  Icons */

nav#gallery button.icon {
	width: 100px;
	height: 100px;
	margin: 20px;
	z-index: 15;	
}

nav#gallery button.icon#left {
	grid-column: 1 / 2;
	grid-row: 2 / 3;
	justify-self: end;
	align-self: center;
	background: center / contain no-repeat url("/static/img/arrow_left.c979e0a89c71.png");
}

nav#gallery button.icon#right {
	grid-column: 4 / 5;
	grid-row: 2 / 3;
	justify-self: start;
	align-self: center;
	background: center / contain no-repeat url("/static/img/arrow_right.eccd21bba0ef.png");
}

nav#gallery button.icon#close {
	grid-area: x;
	justify-self: end;
	align-self: end;
	background: center / contain no-repeat url("/static/img/close_button.2b9efd9b1d87.png");
}

button.area#left:hover ~ button.icon#left {
	background: center / contain no-repeat url("/static/img/arrow_left_active.2595c6928b30.png");
}

button.area#right:hover ~ button.icon#right {
	background: center / contain no-repeat url("/static/img/arrow_right_active.2d696e1e7ce7.png");
}

button.area#close:hover ~ button.icon#close {
	background: center / contain no-repeat url("/static/img/close_button_active.bb38972e7279.png");
}

/* Area */

nav#gallery button.area {
	background-color: rgba(0, 0, 0, 0.0);
	padding: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	z-index: 20;
}

nav#gallery button.area#close {
	grid-area: x;
}

nav#gallery button.area#left {
	grid-area: l;
}

nav#gallery button.area#right {
	grid-area: r;
}

/* Vue Transitions */

.fade-enter, .fade-leave-to {
	opacity: 0;
}

.fade-enter-active, .fade-leave-active {
	transition: opacity 0.5s;
}

/* Responsive */

@media (min-width: 1440px) and (max-width: 1880px) {
	aside#image-gallery {
		--max-image-width: calc(100vw - 400px);
	}
}

@media (min-width: 1340px) and (max-width: 1439px) {
	aside#image-gallery {
		--max-image-width: 1040px;
	}
}

@media (min-width: 1024px) and (max-width: 1339px) {
	aside#image-gallery {
		--max-image-width: calc(100vw - 300px);
	}
}

@media (min-width: 924px) and (max-width: 1023px) {
	aside#image-gallery {
		--max-image-width: 724px;
	}	
}

@media (max-width: 1023px) {
	
	nav#gallery button.icon {
		width: 80px;
		height: 80px;
		margin: 10px;
	}
}

@media (min-width: 768px) and (max-width: 923px) {
	aside#image-gallery {
		--max-image-width: calc(100vw - 200px);
	}
}
