/* Modal login promos */
.modal_login__promos,
.modal_login__loader {
  position: fixed;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
  display: none;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;

  &.active {
    display: flex;
  }

  & .modal_login__promos_form,
  & .modal_loader_body {
    width: 100%;
    padding: 20px;
    position: relative;
    max-width: 750px;
    background: white;
    border-radius: 15px;
    animation: modalPromo ease-in 0.3s;

    & h2 {
      font-size: 1.5em !important;
      color: var(--naranja);
    }

    & .modal_login__promos_close {
      position: absolute;
      width: 30px;
      display: flex;
      cursor: pointer;
      justify-content: center;
      align-items: center;
      height: 30px;
      top: 20px;
      right: 20px;
      background: #f4f4f4;
      border-radius: 50%;

      & img {
        width: 15px;
      }
    }

    & form {
      width: 100%;
      padding: 40px 0;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      font-family: "Montserrat", sans-serif;
      gap: 10px;

      &.form__search_promo {
        grid-template-columns: repeat(4, 1fr) !important;
      }

      & input {
        padding: 12px;
        border-radius: 10px;
        height: auto !important;
        width: auto !important;
        text-align: center;
        background: #f4f4f4;
        text-transform: uppercase;
        font-size: 0.7em;
        border: none;
        outline: none;
      }
      & button {
        background: var(--naranja);
        border: none;
        border-radius: 10px;
        color: white;
        font-family: "Montserrat", sans-serif;
        font-size: 0.7em;
        text-transform: uppercase;
        cursor: pointer;
      }
    }
  }
}
.modal_loader_body div {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 40px;
}

/* Modal */
.modal_promociones {
  position: fixed;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
  display: none;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;

  &.active {
    display: flex;
  }
}
.modal_promociones__body {
  width: 100%;
  padding: 20px;
  position: relative;
  max-width: 750px;
  background: white;
  border-radius: 15px;
  animation: modalPromo ease-in 0.3s;

  & .modal_promociones__close {
    position: absolute;
    width: 30px;
    display: flex;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    height: 30px;
    top: 20px;
    right: 20px;
    background: #f4f4f4;
    border-radius: 50%;

    & img {
      width: 15px;
    }
  }
  & h1 {
    font-size: 1.2em;
    color: var(--naranja);
    text-align: center;
    margin-bottom: 20px;
  }

  & h3 {
    color: var(--gris);
    font-size: 1em;
    margin-bottom: 10px;
  }
  & p {
    font-size: 0.8em;
    color: var(--gris);
  }
}
/* Loader */
#loaderPromos {
  top: 0;
  left: 0;
  z-index: 1;
  position: absolute;
  width: 100%;
  height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
}
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #c4c4c4;
  border-bottom-color: var(--naranja);
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes modalPromo {
  0% {
    transform: translateY(100px);
  }
  100% {
    transform: translateY(0);
  }
}

/* MODAL LOADER LOGIN-SEARCH */

.loader__promos {
  width: 60px;
  height: 60px;
  padding: 20px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.loader__promos:before,
.loader__promos:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--naranja);
  transform: translate(-50%, 100%) scale(0);
  animation: push 2s infinite ease-in;
}
.loader__promos:after {
  animation-delay: 1s;
}
@keyframes push {
  0% {
    transform: translate(-50%, 100%) scale(1);
  }
  15%,
  25% {
    transform: translate(-50%, 50%) scale(1);
  }
  50%,
  75% {
    transform: translate(-50%, -30%) scale(0.5);
  }
  80%,
  100% {
    transform: translate(-50%, -50%) scale(0);
  }
}

.loader__promos_search {
  width: 48px;
  height: 48px;
  display: block;
  margin: 20px auto;
  box-sizing: border-box;
  position: relative;
}
.loader__promos_search::after {
  content: "";
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  left: 0;
  bottom: 0;
  position: absolute;
  border-radius: 50% 50% 0;
  border: 15px solid var(--naranja);
  transform: rotate(45deg) translate(0, 0);
  box-sizing: border-box;
  animation: animMarker 0.4s ease-in-out infinite alternate;
}
.loader__promos_search::before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  top: 150%;
  width: 24px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  animation: animShadow 0.4s ease-in-out infinite alternate;
}

@keyframes animMarker {
  0% {
    transform: rotate(45deg) translate(5px, 5px);
  }
  100% {
    transform: rotate(45deg) translate(-5px, -5px);
  }
}

@keyframes animShadow {
  0% {
    transform: scale(0.5);
  }
  100% {
    transform: scale(1);
  }
}
@media screen and (max-width: 700px) {
  .modal_login__promos,
  .modal_login__loader {
    & .modal_login__promos_form,
    & .modal_loader_body {
      width: 97%;
    }
  }
  .modal_promociones__body {
    width: 97%;
  }
}
@media screen and (max-width: 640px) {
  .modal_login__promos,
  .modal_login__loader {
    & .modal_login__promos_form,
    & .modal_loader_body {
      & form {
        grid-template-columns: repeat(1, 1fr) !important;
        &.form__search_promo {
          grid-template-columns: repeat(1, 1fr) !important;
        }

        & button {
          padding: 10px 0;
        }
      }
    }
  }
}

/* Sin promos */
#sinPromo {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50vh;
}
#sinPromo h1 {
  text-align: center;
  color: var(--naranja);
}
