@import "./../lte3/../lte3/dist/css/variables.css";

/**BODY**/
.login-page {
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

/*Tarjeta grande donde está todo*/
#card-login {
  display: flex;
  flex-direction: row;
  border-radius: 20px;
  background-color: #ffffff;
  box-shadow: 0px 2px 2px 1px rgba(0, 0, 0, 0.2);
  width: 100%;
  height: auto;
  min-height: 500px;
  max-width: 45rem;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
}

/*Contenedor de la tarjeta del login*/
.login-box {
  width: 100%;
  max-width: 45rem;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-box-msg {
  color: var(--second-title);
}

.login-target {
  flex: 1;
  min-width: 300px;
  text-align: center;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-target h3 {
  margin-top: 0;
  margin-bottom: 2rem;
  color: var(--second-title);
  font-size: clamp(1.25rem, 4vw, 1.5rem);
}

/*Contenedor imagen*/
.login-image {
  flex: 0 0 45%;
  overflow: hidden;
  position: relative;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  background-color: lightgray;
}

/*Imágenes*/
.login-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: none;
  display: block;
  height: auto;
}

/*Imagen de fondo*/
.second-image {
  pointer-events: none;
  z-index: 2;
  width: 72%;
  color: white;
}

.main-image {
  width: 300%;
  z-index: 1;
}

form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.principal-form-container {
  padding-top: 0px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

/*Inputs del formulario*/
.container-for-input {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--border-grey);
  width: 100%;
  max-width: 300px;
  height: 39px;
  border-radius: 24px;
  font-size: 18px;
  transition: all 0.2s ease-in-out;
}

.container-for-input:focus-within {
  border: 2px solid var(--orange-color);
}

.container-for-input:focus-within .bx {
  color: var(--orange-color);
}

.input {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.input-form {
  color: var(--primary-text);
  margin-right: -10px;
  border-radius: 24px;
  width: 80%;
  height: 34px;
  border: none;
  background-color: transparent;
  font-size: 20px;
}

.input-form:focus,
.input-form:active {
  border: none !important;
  outline: 0 none;
}

.separador {
  margin-top: -8px;
}

/**Estos son los iconos**/
.principal-form-container span {
  font-size: 22px;
  margin-right: 3px;
  color: #808080;
  margin-top: -3px;
}

/**Contenedor del botón enviar**/
.contenedor-enviar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

#button-enviar {
  background-color: var(--orange-marwen);
  color: white;
  border-radius: 24px;
  margin-top: 10px;
  width: 100%;
  max-width: 200px;
  height: 40px;
  transition: all 0.2s ease-in-out 0s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#button-enviar:hover {
  background-color: var(--orange-hover);
}

#button-enviar:active {
  background-color: var(--orange-active);
}

#button-enviar span {
  color: white;
  font-size: 22px;
}

/*Contenedor Imagen del logo*/
.login-logo {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4rem;
}

/* Logo agrowen a color */
.login-logo a img {
  width: clamp(150px, 40%, 300px);
  max-width: 300px;
  height: auto;
}

/**Texto ha olvidado su password**/
#recovery-password a {
  color: grey;
  transition: all 0.2s ease-in-out 0s;
  font-size: clamp(12px, 2vw, 14px);
}

#recovery-password a:hover {
  color: var(--second-title-hover);
}

#recovery-password {
  padding-bottom: 10px;
  text-align: center;
}

body {
  background-color: white !important;
}

.card-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/*Mensajes de error*/
.alert {
  background-color: var(--red-color) !important;
  position: absolute;
  z-index: 20;
  border-radius: 9px;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
}

.close {
  color: white !important;
}

.alert-text div {
  font-size: 14px;
  width: 100%;
}

/* Responsive Design */

/* Tablets en orientación vertical y pantallas pequeñas */
@media (max-width: 768px) {
  .login-page {
    padding: 0.5rem;
  }

  #card-login {
    flex-direction: column;
    max-width: 100%;
    min-height: auto;
  }

  .login-box {
    min-height: 100vh;
    padding: 0.5rem;
  }

  .login-target {
    padding: 1.5rem 1rem;
    order: 1;
  }

  .login-image {
    flex: 0 0 200px;
    order: 2;
    border-radius: 0 0 20px 20px;
    border-top-right-radius: 0;
  }

  .login-target h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
  }

  .login-logo {
    margin-bottom: 1rem;
  }

  .container-for-input {
    height: 45px;
    font-size: 16px;
  }

  .principal-form-container span {
    font-size: 20px;
  }

  #button-enviar {
    height: 45px;
    max-width: 250px;
  }
}

/* Móviles */
@media (max-width: 480px) {
  .login-page {
    padding: 0.25rem;
  }

  #card-login {
    border-radius: 15px;
    margin: 0.25rem;
  }

  .login-box {
    padding: 0.25rem;
  }

  .login-target {
    padding: 1rem 0.75rem;
  }

  .login-image {
    flex: 0 0 150px;
    border-radius: 0 0 15px 15px;
  }

  .login-target h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .login-logo {
    margin-bottom: 2rem;
  }

  .login-logo a img {
    width: 60%;
    min-width: 120px;
  }

  .container-for-input {
    height: 42px;
    font-size: 16px;
    max-width: 280px;
  }

  .input-form {
    font-size: 20px;
  }

  .principal-form-container span {
    font-size: 18px;
  }

  #button-enviar {
    height: 42px;
    max-width: 200px;
  }

  #button-enviar span {
    font-size: 22px;
  }

  #recovery-password a {
    font-size: 14px;
  }

  .principal-form-container {
    gap: 0.75rem;
  }
}

/* Pantallas muy pequeñas */
@media (max-width: 320px) {
  .login-target {
    padding: 0.75rem 0.5rem;
  }

  .login-image {
    flex: 0 0 120px;
  }

  .container-for-input {
    max-width: 260px;
    height: 40px;
  }

  #button-enviar {
    max-width: 180px;
    height: 40px;
  }

  .login-logo a img {
    width: 70%;
    min-width: 100px;
  }
}

/* Tablets horizontales y pantallas medianas */
@media (min-width: 769px) and (max-width: 1024px) {
  .login-box {
    max-width: 600px;
  }

  #card-login {
    max-width: 600px;
  }

  .login-target {
    padding: 2rem;
  }

  .container-for-input {
    max-width: 320px;
  }

  #button-enviar {
    max-width: 220px;
  }
}

/* Pantallas grandes */
@media (min-width: 1025px) {
  .login-box {
    max-width: 45rem;
  }

  .login-target {
    padding: 3rem 2rem;
  }

  .container-for-input {
    max-width: 300px;
  }
}

/* Orientación landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  .login-page {
    min-height: 100vh;
    align-items: flex-start;
    padding-top: 1rem;
  }

  #card-login {
    flex-direction: row;
    min-height: auto;
    max-height: 90vh;
  }

  .login-target {
    padding: 1rem;
    order: 1;
  }

  .login-image {
    flex: 0 0 40%;
    order: 2;
    border-radius: 0 20px 20px 0;
    min-height: 300px;
  }

  .login-target h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
  }

  .login-logo {
    margin-bottom: 2rem;
  }

  .principal-form-container {
    gap: 0.5rem;
  }

  .container-for-input {
    height: 35px;
  }

  #button-enviar {
    height: 35px;
  }
}
