/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  --modal-hue: 240;
  --modal-first-color: hsl(var(--modal-hue), 16%, 18%);
  --modal-first-color-alt: hsl(var(--modal-hue), 16%, 12%);
  --modal-title-color: hsl(var(--modal-hue), 8%, 15%);
  --modal-text-color: hsl(var(--modal-hue), 8%, 35%);
  --modal-body-color: hsl(var(--modal-hue), 100%, 99%);
  --modal-container-color: #FFF;

  /*========== Font and typography ==========*/
  --modal-body-font: 'Poppins', sans-serif;
  --modal-big-font-size: 1.5rem;
  --modal-normal-font-size: .938rem;

  /*========== z index ==========*/
  --modal-z-modal: 1000;
}

@media screen and (min-width: 968px) {
  :root {
    --modal-big-font-size: 1.75rem;
    --modal-normal-font-size: 1rem;
  }
}

/*=============== BASE ===============*/
.modal__wrapper *{
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.modal__wrapper,
.modal__wrapper button{
  font-family: var(--modal-body-font);
  font-size: var(--modal-normal-font-size);
}

.modal__wrapper{
  background-color: var(--modal-body-color);
  color: var(--modal-text-color);
  position: relative;
}

.modal__wrapper button{
  cursor: pointer;
  border: none;
  outline: none;
}

.modal__wrapper img{
  max-width: 100%;
  height: auto;
}

/*=============== MODAL ===============*/
.modal__wrapper .container{
  margin-left: 1rem;
  margin-right: 1rem;
}

.modal__wrapper .modal{
  display: grid;
  place-items: center;
}

.modal__wrapper .modal__button{
  display: inline-block;
  background-color: var(--modal-first-color);
  color: #FFF;
  padding: 1rem 1.25rem;
  border-radius: .5rem;
  transition: .3s;
}

.modal__wrapper .modal__button:hover{
  background-color: var(--modal-first-color-alt);
}

.modal__wrapper .modal__container{
  position: fixed;
  top: 0;
  left: 0;
  background-color: hsla(var(--modal-hue), 18%, 75%, .8);
  width: 100%;
  height: 100%;
  display: grid;
  align-items: flex-end;
  overflow: hidden;
  transition: all .3s;
  z-index: var(--modal-z-modal);
  visibility: hidden;
  opacity: 0;

  /*=== Effect 3 ===*/
  /* perspective: 1000px; */
}

.modal__wrapper .modal__content{
  position: relative;
  background-color: var(--modal-container-color);
  text-align: center;
  padding: 3rem 2rem 2rem;
  border-radius: 1rem 1rem 0 0;
  transition: all .3s;

  /*=== Effect 1 ===*/
  transform: translateY(10%);

  /*=== Effect 2 ===*/
  /* transform: scale(.5) translateY(10%); */

  /*=== Effect 3 ===*/
  /* transform: rotateX(65deg) scale(.75) translateY(10%);
  transform-origin: 50% 100%; */
}

.modal__wrapper .modal__img{
  width: 150px;
  margin-bottom: .75rem;
}

.modal__wrapper .modal__close{
  display: inline-flex;
  background-color: var(--modal-first-color);
  border-radius: .25rem;
  color: #FFF;
  font-size: 1.5rem;
  position: absolute;
  top: 2rem;
  right: 2rem;
  cursor: pointer;
}

.modal__wrapper .modal__title{
  font-size: var(--modal-big-font-size);
  color: var(--modal-title-color);
  font-weight: 500;
}

.modal__wrapper .modal__description{
  margin-bottom: 1.5rem;
}

.modal__wrapper .modal__button-width{
  width: 90%;
}

.modal__wrapper .modal__button-link{
  display: block;
  margin: 1rem auto 0;
  background-color: transparent;
  color: var(--modal-first-color);
  font-weight: 500;
}

/* Show modal */
.modal__wrapper .show-modal{
  visibility: visible;
  opacity: 1;
}

.modal__wrapper .show-modal .modal__content{
  /*=== Effect 1 ===*/
  transform: translateY(0);

  /*=== Effect 2 ===*/
  /* transform: scale(1) translateY(0); */

  /*=== Effect 3 ===*/
  /* transform: rotateX(0) scale(1) translateY(0); */
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (min-width: 576px){
  .modal__wrapper .modal__content{
    margin: auto;
    width: 380px;
    border-radius: 1.25rem;
  }

  .modal__wrapper .modal__img{
    width: 170px;
  }
}