:root {
  --color-primario: #39b54a;
  --color-secundario: #004c8c;
  --color-blanco: #ffffff;
  --color-negro: #000000;
}

@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/onest:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html {
  font-family: 'Onest Variable', sans-serif;
}

*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* login */
.main {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to bottom, rgb(0 0 0 / 0.7) 100%, transparent), url('/assets/images/app.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.login {
  --tamaño-logo: 300px;
  max-width: 400px;
  padding: clamp(10px, 5vw, 20px);
  border-radius: 5px;
  color: var(--color-blanco);

  &:has(.login__select) {
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
  }
}

.login__logo {
  display: block;
  width: 100%;
  max-width: var(--tamaño-logo);
  filter: drop-shadow(1px 1px 1px rgb(0 0 0));
  margin: 0 auto;
}

.login__titulo {
  font-size: clamp(16px, 5vw, 18px);
  color: var(--color-blanco);
  text-shadow: 1px 1px 1px var(--color-negro);
  margin-block: 20px;
  text-align: center;
}

.contenedor__outlined {
  width: 100%;
  --outline-color: #807d7d;
  --color: #bebebe;
  position: relative;

  &:has(select) .label__outlined {
    position: static;
  }

  &:has(.input__outlined:is(:focus, :valid)) + .formulario__error {
    display: none;
  }
}

.contenedor__outlined .icono {
  position: absolute;
  right: 2%;
  top: 70%;
  transform: translateY(-50%);
  color: var(--color-negro);
}

.input__outlined {
  width: 100%;
  padding: 15px 10px 10px;
  border-radius: 5px;
  border: none;
  background-color: var(--color-blanco);
  outline: 1px solid var(--outline-color);
  transition: width 0.3s, padding 0.3s, outline 0.3s;

  &:is(:focus, :valid) {
    --outline-color: var(--outline-color) !important;
  }

  &.input-validation-error {
    --outline-color: #ff0000;
  }
}

.formulario__contenedor {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.formulario__items:has(.login__select) {
  max-width: calc(var(--tamaño-logo) - 70px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.formulario__error {
  color: #ff0000;
  font-size: clamp(14px, 3vw, 12px);
  text-shadow: 1px 1px 1px rgb(0 0 0 / 0.2);
}

.formulario__submit {
  --padding-submit: 10px;
  width: 100%;
  padding: var(--padding-submit);
  border-radius: 5px;
  border: none;
  background-color: var(--color-secundario);
  color: var(--color-blanco);
  transition: filter 0.3s;

  &:hover {
    cursor: pointer;
    filter: brightness(0.9);
  }
}

.formulario__link {
  text-decoration: none;
  display: block;
  text-align: center;
  margin-block: 15px;
  color: var(--color-blanco);
  text-shadow: 1px 1px 1px rgb(from var(--color-negro) r g b);

  &:hover {
    color: var(--color-blanco);
    text-decoration: underline;
  }
}

.login__select {
  width: 100%;
  padding: 5px;
  border-radius: 5px;
  border: 2px solid var(--color-secundario);
}

/*#region Idioma  */
.idioma {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 1rem;
  list-style: none;
  border-radius: 5px;
  background-color: rgb(0 0 0/ 0.2);
  padding: 5px;
  border: 1px solid #b3b3b34f;
}

.idioma::before {
  content: '';
  position: absolute;
  height: 100%;
  width: 0.5px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
}

.idioma__link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}

.idioma__icono {
  width: 15px;
}

.idioma__btn {
  transition: transform 0.3s ease-in-out;
}

.idioma__btn:hover {
  transform: scale(1.04);
}

.idioma__link.selected {
  color: #007bff;
  text-shadow: 0 0 5px #007bff;
}
/*#endregion Idioma */
