/*
# Creator: Arreaum
# GitHub: https://github.com/arriaoedu123/
# Creation date: 21/08/2021
# Update date: 27/08/2021
# Version: 1.6
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

:root {
  --background: #000;
}

* { /* general preset */
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  color: #000;
  font-size: 22px;
}

body { /* giving body a background */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #d1dae3;
}

.title-container { /* container title div */
  display: grid; 
  grid-auto-columns: 1fr; 
  grid-template-columns: 2fr 1fr; 
  grid-template-rows: 1fr 1fr;
  grid-gap: 20px 0;
  padding: 20px;
}

.img-container { /* pokemon image container */
  width: 100%;
  display: flex;
  position: relative;
}

.stats-container { /* pokemon stats container */
  display: grid; 
  grid-template-columns: 0.5fr 1fr; 
  grid-template-rows: auto 1fr;
}

.get-pokemon { /* search pokemon form */
  width: 60%;
  margin-top: 10px;
  position: relative;
  height: 45px;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.get-pokemon input { /* giving url field input a basic style */
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: #f1f1f7;
  font-size: 14px;
  font-family: 'Noto Sans', sans-serif;
  padding: 0 20px;
  border-radius: 5px;
}

.get-pokemon button { /* search pokemon button */
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  border: none;
  outline: none;
  width: 50px;
  height: 100%;
  z-index: 1;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0 5px 5px 0;
}

.get-pokemon button i { /* search pokemon button icon */
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  height: 100%;
  width: 100%;
  color: #fff;
  font-size: 18px;
  transition: transform 0.1s linear;
}

.get-pokemon button i:active { /* decreasing icon size when button click */
  transform: scale(0.6);
}

.container { /* container div */
  width: 60%;
  margin-top: 35px;
  margin-bottom: 10px;
  border-radius: 25px;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
  transition: background 0.5s ease-in-out;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.data-poke-name { /* pokemon name */
  grid-column: 1/3;
  text-transform: capitalize;
  -webkit-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

.data-poke-id { /* pokemon id */
  grid-column: 3/4;
  text-align: right;
  -webkit-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

.data-poke-types { /* pokemon types */
  grid-column: 1/4;
}

.data-poke-types label { /* pokemon types cards */
  margin-right: 10px;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.img-container { /* pokemon image container */
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.img-container img { /* pokemon image */
  width: 50%;
}

.img-container span i { /* pokemon prev and next button */
  font-size: 28px;
}

.poke-prev { /* pokemon prev button */
  position: absolute;
  left: 0;
  top: 25%;
  margin-left: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s linear;
  cursor: pointer;
}

.poke-next { /* pokemon next button */
  position: absolute;
  right: 0;
  top: 25%;
  margin-right: 20px;
  transition: all 0.2s linear;
  cursor: pointer;
}

.poke-prev:active,
.poke-next:active { /* decreasing pokemon prev and next button when click */
  transform: scale(0.8);
}

.stats-container { /* all pokemon stats container */
  background: #fff;
  margin-top: -85px;
  border-radius: 25px;
  padding: 100px 20px 0 20px;
}

.stats-container label { /* all pokemon stats cards */
  padding: 10px 15px;
  border-radius: 5px;
}

.stats-title,
.abilities-title,
.strong-title,
.weak-title,
.info-title { /* all pokemon stats title */
  grid-column: 1/3;
  margin-top: 5px;
}

.data-poke-stats div { /* pokemon stats divs */
  display: flex;
  justify-content: space-between;
  align-content: space-between;
}

.abilities-title { /* pokemon abilities title */
  margin-top: 10px;
}

.data-poke-abilities label { /* all pokemon abilities cards */
  background: #ccc;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
  -webkit-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

.data-poke-stats { /* pokemon stats */
  grid-column: 1/2;
  border-right: 2px solid #000;
}

.data-poke-bar { /* pokemon stats bar */
  grid-column: 2/3;
  display: grid;
  align-items: center;
  padding-left: 15px;
}

.bar0,
.bar1,
.bar2,
.bar3,
.bar4,
.bar5 { /* all pokemon stats bar */
  width: 0px;
  height: 6px;
  background: var(--background);
  grid-column: 1/4;
  transition: width 0.5s ease-in-out;
}

.data-poke-abilities,
.data-poke-strong,
.data-poke-weak { /* pokemon abilities, strong agains and weak against container */
  grid-column: 1/3;
  margin: 15px 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.data-poke-abilities label,
.data-poke-strong label,
.data-poke-weak label { /* pokemon abilities, strong agains and weak against cards */
  width: 200px;
  text-align: center;
  margin-top: 5px;
  margin-right: 5px;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.separator { /* giving separator div a style */
  width: 100%;
  height: 1px;
  border: 1px solid #000;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.separator span { /* centering separator div label and giving a color */
  color: #000;
  background: #fff;
  text-transform: uppercase;
  padding: 0 10px;
}

.data-poke-extra { /* pokemon extra info */
  grid-column: 1/3;
  margin: 30px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.data-poke-extra label { /* all pokemon extra info cards */
  background: #d1dae3;
  width: 200px;
  margin: 5px 5px 0 0;
  text-align: center;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

/* responsive css */
@media only screen and (max-width: 800px) {
  .get-pokemon,
  .container {
    width: 80%;
  }
}

@media only screen and (max-width: 615px) {
  .get-pokemon,
  .container {
    width: 98%;
  }
}

@media only screen and (max-width: 500px) {
  .img-container img {
    width: 60%;
  }

  .stats-container {
    margin-top: -75px;
  }
}
