/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

* {
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	font-family: 'Roboto', sans-serif;
}
html {
	width: 100%;
	height: 100%;
}
body {
	min-width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-ms-flex-direction: column;
	flex-direction: column;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	border: 2px splid #0ed629;
	font-size: 18px;
}
header {
	width: 100%;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-ms-flex-line-pack: center;
	align-content: center;
	background-color: rgb(147 172 207);
	padding: 20px 25px 13px 1px;
}
.logo-container {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	place-content: space-between;
	margin: 0 8px;
	gap: 10px;
}
.appName {
	font-size: 2.5em;
	margin: 0.1em 0;
}

.logo {
	height: 64px;
}
#searchInput {
	background-image: url('/img/icons8-search-50.svg');
	background-position: 1px 0px;
	border-radius: 30px;
	background-repeat: no-repeat;
	width: 300px;
	font-size: 16px;
	padding: 16px 4px 12px 47px;
	border: 1px solid #ddd;
	margin: 2px 25px 0 0;
}
main,
.main-container {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	width: 80%;
	max-height: 80%;
	margin: 2px auto;
	padding: 1px;
	gap: 20px;
	text-align: center;
}

.pokemon-list-container {
	background-color: rgb(178, 184, 192);
	padding: 40px 20px;
	overflow: auto;
	margin: 5px auto;
}

.pokemon-list {
	text-decoration: none;
	list-style: none;
	margin: 0;
	padding: 0;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	gap: 10px;
}

.pokemon-list > li {
	display: block;
	text-decoration: none;
	color: rgb(0, 0, 0);
	width: 168px;
	margin: 5px;
	padding: 1px 5px;
	text-align: center;
	line-height: 30px;
}
.pokemon-list ul li:hover {
	background-color: #eee;
}

/* Modal css style */
#modal-container {
	display: none;
}

#modal-container.is-visible {
	position: fixed;
	top: 0;
	left: 0;
	padding: 30px 20px;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999;
	overflow: auto;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	text-align: center;
}

.modal-wrapper {
	width: 360px;
	position: absolute;
	top: 50%;
	left: 50%;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-ms-flex-direction: column;
	flex-direction: column;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
	background-color: #ccdfce;
}

.modal-close {
	float: right;
	display: block;
	border: 0;
	border-radius: 5px;
	background-color: #041e49;
	color: #fcfcfc;
	text-decoration: underline;
	padding: 1px;
	-ms-flex-item-align: end;
	align-self: flex-end;
	font-size: 1.2em;
	margin: 3px 2px;
}

.modal {
	width: 350px;
}
.modal img {
	display: block;
	width: 180px;
	max-height: 200px;
	position: relative;
	margin: 5px auto;
	padding: 0;
	border: 2px solid rgb(12, 164, 40);
	border-radius: 50%;
}

.pokemon-name {
	text-align: center;
	font-weight: 600;
	margin: 0.1em auto 0.4em;
	padding: 0.1em;
}

.pokemon-types {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-pack: distribute;
	justify-content: space-around;
	margin: 20px 0 40px 0;
}

.pokemon-types span {
	padding: 5px 20px;
	border-radius: 20px;
	color: #fff;
	letter-spacing: 0.4px;
	background-color: #404060;
}

.pokemon-stats {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	text-align: center;
	font-weight: 600;
}
.pokemon-stats p,
h3 {
	color: #404060;
	padding: 0.1em;
	margin: 0.5rem 1.5em;
}
.pokemon-stats h3 {
	padding: 0.1em;
	margin: 0.1em;
}

footer {
	margin-top: auto;
	width: 100%;
	padding: 25px;
	background-color: rgb(3, 33, 62);
	color: rgb(231, 231, 231);
	border: 2px solid rgb(0, 0, 0);
	margin: 2px auto;
	padding: 10px;
	text-align: center;
}

.button-class {
	background-color: #e7e7e7;
	width: 100%;
	border: 1px solid rgb(182, 178, 178);
	border-radius: 20px;
	color: black;
	padding: 12px 5px;
	text-decoration: none;
	display: block;
	font-size: 18px;
	cursor: pointer;
}

.button-class:hover {
	background-color: rgb(146, 149, 150);
	color: rgb(255, 255, 255);
}

/* media queries */
@media (max-width: 600px) {
	header {
		font-size: 0.6em;
	}
	header .appName {
		display: none;
	}
	#searchInput {
		width: 250px;
		margin: 2px 6px 0 0;
	}

	main.main-container {
		-webkit-box-orient: vertical;
		-webkit-box-direction: reverse;
		-ms-flex-direction: column-reverse;
		flex-direction: column-reverse;
		margin: 0;
		padding: 2px 2px;
	}
	.pokemon-list-container {
		overflow: auto;
		padding: 2px;
		margin: 5px;
		height: 80dvh;
	}
	.pokemon-list > li {
		width: 100%;
	}
	.pokemon-modal {
		padding: 5px;
		margin: 5px auto;
		max-width: 100%;
	}
	#modal-container.is-visible {
		padding: 3px;
		margin: 0px;
	}
	.modal-wrapper {
		width: 310px;
	}
	.modal {
		width: 300px;
	}
}
