@charset "UTF-8";
@import url(https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap);

/* RESET E STILI BASE */
body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #333;
  background-color: #fff;
  line-height: 1.5;
}

/* Rimuovi qualsiasi regola di opacità precedente dal body o container principale */
body, .container, .login-container {
    opacity: 1;
}

/* LAYOUT PRINCIPALE */
#login_page {
  display: flex;
  height: 100vh;
  background: #fff;
  padding-left: unset;
}

/* COLONNA IMMAGINE (75%) */
.login_image {
  width: 75%;
  background: url(../images/login-register.jpg) no-repeat center center/cover;
  position: relative;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover; /* Garantisce che l'immagine copra tutto lo spazio disponibile */
  background-position: left center; /* Centra verticalmente e allinea a sinistra */
}

/* Modifica l'overlay per rendere l'immagine più trasparente */
.login_image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4); /* Overlay bianco con 40% di opacità */
  z-index: 0;
}

.login_image-content {
  position: relative;
  z-index: 1;
  color: white;
  max-width: 80%;
  text-align: center;
}

/* COLONNA FORM (25%) */
.login_box {
  width: 25%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* CARD DEL FORM */
.card {
  width: 100%;
  max-width: 320px; /* Form più compatto */
  border: none;
  background-color: transparent;
  box-shadow: none;
}

.card-body {
  padding: 0;
}

/* LOGO */
.logo_ennova {
  max-height: 40px;
}

/* TITOLI */
.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  text-align: left;
}

.login-subtitle {
  font-size: 0.8125rem;
  color: #7f8c8d;
  font-weight: 400;
}

/* FORM ELEMENTI */
.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  display: block;
}

.input-group {
  position: relative;
  margin-bottom: 1rem;
}

.input-group-text {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: #95a5a6;
  background: none;
  border: none;
  padding: 0;
}

.form-control {
  height: 44px;
  border-radius: 8px;
  border: 1px solid #e0e6ed;
  padding: 0 15px 0 40px;
  font-size: 15px;
  transition: all 0.25s ease;
  background-color: #fff;
  width: 100%;
}

.form-control:focus {
  border-color: #d92550;
  box-shadow: 0 0 0 3px rgba(217, 37, 80, 0.15);
  outline: none;
}

.form-control::placeholder {
  color: #95a5a6;
  font-size: 14px;
}

/* PULSANTE */
.btn-primary {
  height: 44px;
  width: 100%;
  background-color: #d92550;
  border-color: #d92550;
  font-weight: 600;
  border-radius: 8px;
  font-size: 15px;
  margin-top: 0.5rem;
  transition: all 0.3s;
}

.modal-footer .btn-primary {
  width: auto;
  height: auto;
  margin-top: 5px;
}

.btn-primary:hover {
  background-color: #c01f46;
  border-color: #c01f46;
}

/* Aggiungi questa regola per lo stato :focus */
.btn-primary:focus {
  background-color: #c01f46 !important;
  /* Stesso colore di :hover per coerenza */
  border-color: #c01f46 !important;
  /* Stesso colore di :hover per coerenza */
  /* Applica un box-shadow per il focus con il colore del tema, simile a .form-control:focus */
  box-shadow: 0 0 0 3px rgba(217, 37, 80, 0.15) !important;
  outline: none !important;
  /* Rimuove l'outline di default del browser */
}

/* Modifica la regola esistente per :active */
.btn-primary:active {
  background-color: #c01f46 !important;
  /* Assicura che il colore di sfondo sia corretto (uguale a hover) */
  border-color: #c01f46 !important;
  /* Assicura che il colore del bordo sia corretto (uguale a hover) */
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(217, 37, 80, 0.3) !important;
  /* Mantiene l'ombra definita per lo stato attivo */
}

/* LINK PASSWORD */
.password-help {
  text-align: right;
  margin: -0.5rem 0 1rem;
}

.password-help a {
  font-size: 0.75rem;
  color: #d92550;
  text-decoration: none;
}

.password-help a:hover {
  text-decoration: underline;
}

/* ERRORI */
.form-error {
  color: #d92550;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.input-error {
  border-color: #d92550 !important;
  background-color: #fff9fa !important;
}

.input-group-text.error-icon {
  color: #d92550;
}

/* ANIMAZIONI */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
  20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.shake {
  animation: shake 0.6s ease;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  #login_page {
    flex-direction: column;
  }
  
  .login_image, .login_box {
    width: 100%;
    padding: 1.5rem;
  }
  
  .login_image {
    height: 200px;
    align-items: flex-end;
  }
  
  .login_image-content {
    max-width: 100%;
    text-align: left;
  }
  
  .card {
    max-width: 100%;
  }
}

/* STILI PER ALTRI FORM (IMPOSTA PASSWORD) */
#password_requirements {
  font-size: 0.8125rem;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

#password_requirements li {
  margin-bottom: 0.5rem;
  list-style-type: none;
  position: relative;
  padding-left: 1.5em;
}

#password_requirements li i {
  position: absolute;
  left: 0;
}

#password_requirements .text-success {
  color: #28a745;
}

#password_requirements .text-danger {
  color: #dc3545;
}

/* MODALE */
.modal-content {
  border-radius: 12px;
  border: none;
}

.modal-header {
  border-bottom: 1px solid #eaeaea;
  padding: 1rem 1.5rem;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #eaeaea;
  padding: 1rem 1.5rem;
}

/* PULSANTE DISABILITATO */
.btn:disabled {
  background-color: #e9ecef;
  border-color: #ced4da;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.65;
}

/* Crea un contenitore dedicato per lo sfondo */
.background-image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Posizionato dietro a tutti gli altri elementi */
    overflow: hidden; /* Previene il ritaglio dell'immagine */
}

/* Stile dell'immagine di sfondo */
.background-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Copre l'intera area senza distorsioni */
    object-position: center; /* Centra l'immagine */
}

/* Overlay semitrasparente sopra l'immagine */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4); /* Overlay bianco semitrasparente */
    z-index: -1; /* Posizionato sopra l'immagine ma sotto il contenuto */
}
