/* /css/auth/auth.css */

/* Importar partials */
@import url("_variables.css");
@import url("_layout.css");

/* Contenedor principal del formulario */
.auth-box {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  position: fixed;
  top: 50%;
  left: 58.3333vw;
  transform: translate(-50%, -50%);
  background: var(--auth-primary-dark);
  color: var(--auth-text-light);
  padding: var(--space-3);
  padding-top: var(--space-4);
  border-radius: 10px;
  min-width: 338px;
  max-width: 400px;
  height: auto;
  text-align: center;
  z-index: 10;
}

/* Estilos para los inputs de Bootstrap adaptados a nuestro tema */
.auth-box .form-control {
  background-color: var(--auth-primary-dark);
  color: var(--common-white);
  border: 2px solid var(--auth-text-light);
  border-radius: var(--border-radius);
  transition: border-color 0.2s, background-color 0.2s;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}

.auth-box .form-control:focus {
  border-color: var(--auth-accent);
  box-shadow: none;
}

.auth-box .form-control::placeholder {
  font-style: italic;
  color: var(--common-white);
}

.auth-box select {
  height: 42px;
  border-radius: var(--border-radius);
  color: var(--common-white);
}

.auth-box select:invalid {
  font-style: italic;
}

.auth-box select:focus {
  border-color: var(--auth-accent);
  box-shadow: none;
}

.auth-box select option {
  background-color: var(--auth-primary-dark);
  color: var(--common-white);
  font-style: normal;
}

.auth-box select option[disabled] {
  opacity: 0.5;
}

/* Botón principal */
.btn-auth,
.btn-auth-lg {
  display: flex;
  place-items: center;
  justify-content: center;
  height: auto;
  font-weight: bold;
  border-radius: var(--border-radius);
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
  transition: background-color 0.2s, transform 0.2s;
  margin: var(--space-2) auto;
}

.btn-auth-lg {
  min-width: 107px;
}

.btn-auth:hover {
  background-color: var(--auth-primary);
}

.btn-auth:focus,
.btn-auth:active {
  filter: none;
  background-color: var(--java-500) !important;
}

.btn-auth:disabled {
  opacity: 0.5;
  background-color: var(--java-500);
  cursor: not-allowed;
}

.btn-auth--no-underline:hover {
  text-decoration: none !important;
}

/* Modificador para el botón primario */
.btn-auth-primary {
  background-color: var(--auth-primary);
  color: var(--auth-text-light);
  border: none;
}

.btn-auth-primary:hover {
  background-color: var(--java-500);
}

.btn-auth-primary:disabled {
  background-color: var(--auth-bg-disabled);
}

/* Enlaces */
.auth-box a {
  color: var(--auth-text-light);
  text-decoration: none;
}

.auth-box a:hover {
  text-decoration: underline;
}

/* Estilos específicos para el toggle de contraseña */
.password-input-row {
  position: relative;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  color: var(--common-white);
  cursor: pointer;
  width: 42px;
  height: 42px;
}

.password-toggle i {
  font-size: 1.2rem;
}

/* Checkbox */
.auth-checkbox__input {
  height: 20px;
  width: 20px;
  background-color: var(--common-white);
}

.auth-checkbox__input:hover {
  border-color: var(--auth-primary);
}

.auth-checkbox__input:checked {
  background-color: var(--common-white);
  border-color: var(--auth-primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%231DADAA' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

/* Checkbox */

/* Mensajes de error (usando las clases de alerta de Bootstrap) */
.alert-auth {
  width: 100%;
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid #dc3545;
  border-radius: 5px;
  padding: 12px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--auth-text-light);
}

/* ============================================= */
/* Estilos de Validación de Parsley.js           */
/* ============================================= */

/* Estilo para el input cuando tiene un error */
.parsley-error {
  border-color: var(--error) !important;
}

/* Contenedor de la lista de mensajes de error */
.parsley-errors-list {
  list-style: none;
  margin: 5px 0 0 2px;
  text-align: left;
}

/* Cada mensaje de error individual */
.parsley-errors-list li {
  color: var(--error);
}

/* Contenedor para los errores de Parsley para prevenir saltos de layout */
.error-wrapper {
  height: auto;
  display: flex;
  align-items: center;
  margin-top: var(--space-1);
}

/* ============================================= */
/* Responsive Styles                           */
/* ============================================= */

/* ============================================= */
/* LAPTOPS Y TABLETS GRANDES (1199px-)          */
/* ============================================= */
@media (max-width: 1199px) {
}

/* ============================================= */
/* TABLETS (991px-)                             */
/* ============================================= */
@media (max-width: 991px) {
  .auth-box {
    left: 50%;
    width: 90%;
    max-width: 350px;
    min-width: 0;
  }
  .btn-auth {
    max-width: 285px;
    margin: auto;
  }
}

/* ============================================= */
/* TABLETS PEQUEÑAS (767px-)                    */
/* ============================================= */
@media (max-width: 768px) {
}

/* ============================================= */
/* MÓVILES (575px-)                             */
/* ============================================= */
@media (max-width: 575px) {
}
