/* breakpoints */
/* --sm-mobile: 320px;
--lg-mobile: 576px;
--sm-tablet: 767px;
--lg-tablet: 992px;
--sm-desktop: 1200px;
--lg-desktop: 1400px; */

body {
  align-items: center;
  display: flex;
  font-family: "Reem Kufi Fun", "Lato", "Roboto", sans-serif;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
  position: relative;
  padding-left: 16px;
  padding-right: 16px;
}

.main-content {
  max-width: 400px;
  width: 100%;
  z-index: 1;
}

/* ---------- Hero ---------- */
/* ----- Text container ----- */
.hero-section {
  margin-bottom: 20px;
}

h1 {
  font-size: 64px;
  font-weight: bold;
  margin: 0;
  text-align: center;
}

.subheader {
  font-size: 28px;
  margin: 0;
  text-align: center;
}

.hero-section .text-container {
  margin-bottom: 0;
}

/* ---------- Pokemon display ---------- */
/* hide desktop version of pikachu */
.image-container-desktop {
  display: none;
}

.pokemon-display .image-container {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  margin-bottom: 20px;
  width: 100%;
}

/* ----- Pokemon sprite ----- */
.sprite-container {
  position: relative;
  width: 50%;
}

.image-container img {
  width: 50%;
}

.image-container .pokemon-sprite {
  cursor: pointer;
  width: 100%;
  margin-bottom: 16px;
}

/* ----- Normal vs. shiny text ----- */
.sprite-container p {
  bottom: 0;
  left: 50%;
  margin: 0;
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
}

/* ----- Name ----- */
.pokemon-name {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 20px;
  margin-top: 0;
  text-align: center;
}

/* ----- Click text ----- */
.click-text {
  font-size: 14px;
  margin: 0;
  text-align: center;
}

.desk-text {
  display: none;
}

/* ----- type ----- */
.pokemon-type {
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

/* ----- flavor text ----- */
.flavor-text {
  margin-bottom: 0;
  margin-top: 0;
}

.pokemon-display .text-container {
  margin-bottom: 28px;
}

/* ---------- Form ---------- */
#form {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  width: 100%;
}

label[for="searchInput"] {
  font-size: 12px;
  margin-bottom: 4px;
}

/* ----- Error ----- */
label.error {
  color: red;
}

#searchInput, button {
  font-family: "Reem Kufi Fun", "Lato", "Roboto", sans-serif;
}

/* ----- Input box ----- */
#searchInput {
  border: 2px solid #000;
  border-radius: 8px;
  height: 32px;
  margin-bottom: 20px;
  padding-left: 20px;
}

#searchInput::placeholder {
  color: #969696;
}

/* ----- Button ----- */
button[type="submit"] {
  background-color: #f04038;
  border: 2px solid #000;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  height: 40px;
  margin: 0 auto;
  max-width: 228px;
  transition: transform 0.2s;
  width: 75%;
}

/* Hover effect */
button[type="submit"]:hover {
  transform: scale(1.04);
}

/* Click effect */
button[type="submit"]:active {
  transform: scale(1.01);
}

/* Search another prompt */
.search-another {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 0;
  margin-top: 0;
  text-align: left;
}

/* ---------- Rectangles for type colors ---------- */
.type-color-1 {
  bottom: 100%;
  height: 500px;
  left: 65%;
  position: fixed;
  transform-origin: top left;
  width: calc(100vh * 2);
}

.type-color-2 {
  height: 500px;
  opacity: 0.5;
  position: fixed;
  right: 40%;
  top: 100%;
  transform-origin: top right;
  width: calc(100vh *2);
}

/* ---------- Media queries ---------- */
@media only screen and (min-width: 992px) {
  body {
    padding-left: 32px;
    padding-right: 32px;
  }

  .main-content {
    align-items: center;
    display: grid;
    grid-column-gap: 64px;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
  }

  .subheader {
    margin-bottom: 20px;
  }

  /* waving pikachu will stay and not be used for displaying results on larger screens*/
  .image-container-desktop {
    display: block;
    margin: 0 auto;
    width: 50%;
  }

  #pikachu-waving-desktop {
    width: 100%;
  }

  /* ---------- pokemon display ---------- */
  #pokemon-display {
    align-items: center;
    display: flex;
    flex-direction: column;
    grid-column-start: 2;
    grid-row-end: 3;
    grid-row-start: 1;
    height: 100%;
    justify-content: center;
  }

  #pokemon-display .text-container {
    margin-bottom: 0;
  }

  /* hide pikachu waving (for mobile versions) */
  #pikachu-waving {
    display: none;
  }

  /* ---------- form ---------- */
  #form {
    justify-content: end;
    min-height: 156px;
  }

  /* ---------- Rectangles for type colors ---------- */
  .type-color-1 {
    background-color: #f04038;
    bottom: 112%;
    opacity: 1;
    transform: rotate(38deg);
  }

  .type-color-2 {
    height: 68vw;
    right: 0;
    
  }
}

@media only screen and (min-width: 1200px) {
  h1, .subheader {
    text-align: left;
  }

  .main-content {
    grid-column-gap: 88px;
  }

  /* Hide mobile text, show desktop text for the click text */
  .mobile-text {
    display: none;
  }

  .desk-text {
    display: block;
  }

  /* ---------- Rectangles for type colors ---------- */
  .type-color-1 {
    bottom: 100%;
    left: 80%;
  }

  .type-color-2 {
    right: 15%;
  }
}

@media only screen and (min-width: 1700px) {
  /* ---------- Rectangles for type colors ---------- */
  .type-color-1 {
    height: 100%;
    left: 80%;
  }

  .type-color-2 {
    height: 100%;
    right: 28%;
  }
}
