.hidden {
  display: none;
}

.output {
  margin-top: 10px;
  color: green;
}

.error {
  color: red;
  border: 1px solid red;
  padding: 10px;
  margin-top: 10px;
}

.input {
  padding: 10px;
  border: 2px solid #aaa;
  border-radius: 6px;
  font-size: 16px;
  width: 250px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input:focus {
  border-color: #3366cc;
  box-shadow: 0 0 5px rgba(51, 102, 204, 0.5);
  outline: none;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
}



/* Inizio setup pagina personale */
.contenitore {
  max-width: 500px;
  margin: 0 auto;
  /* centra orizzontalmente */
  padding: 0.3rem 1.2rem;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.contenitore p {
  line-height: 0.8rem;
}

/* Bottone apri/chiudi carta cliente */
#toggle-carta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto 0px;
  background-color: var(--colore-secondario);
  color: white;
  border: none;
  padding: 10px 15px 10px 12px;
  border-radius: 6px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 1px;
}

/* Contenitore fisarmonica carta cliente */
#box-carta {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  background-color: #fafafa;
  border-radius: 12px;
}

#box-carta.carta-expanded {
  max-width: 500px;
  max-height: 500px;
  border: 2px solid var(--colore-secondario);
  padding: 0.8rem;
  margin: 0px auto;
  text-align: center;
}

#qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem auto;
  width: 100%;
}

.testo-carta {
  font-family: 'Inter Tight', sans-serif;
  font-size: 15px;
  margin-top: 2rem;
}

/* Bottone apri/chiudi preferiti */
#toggle-preferiti {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3rem auto 0px;
  background-color: var(--colore-primario);
  color: white;
  border: none;
  padding: 10px 15px 10px 12px;
  border-radius: 6px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
}

/* Contenitore fisarmonica preferiti */
#box-preferiti {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  margin-bottom: 1rem;
}

#box-preferiti.preferiti-expanded {
  max-width: 500px;
  max-height: 800px;
  /* abbastanza grande da contenere i textarea */
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding-top: 1.2rem;
  padding-bottom: 1.5rem;
  margin: 2.5rem auto;
}

/* Etichette e testi dentro la sezione */
#box-preferiti label {
  display: block;
  margin: 5px 0 5px;
}

#box-preferiti textarea {
  display: block;
  width: 100%;
  /* occupa tutta la larghezza */
  min-height: 80px;
  padding: 10px;
  border-radius: 6px;
  /* angoli arrotondati su entrambi i lati */
  border: 1px solid #ccc;
  resize: vertical;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  box-sizing: border-box;
  /* evita che il padding sfori */
}

#rispostaInformazioni {
  margin-bottom: 1rem;
  /* spazio sotto al messaggio */
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
}

/* Bottone apri/chiudi dati personali */
#toggle-profilo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0px auto 0px;
  background: none;
  color: var(--colore-primario);
  border: 2px solid var(--colore-primario);
  padding: 10px 15px 10px 12px;
  border-radius: 6px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
}

/* Contenitore fisarmonica profilo */
#box-profilo {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  margin-bottom: 1rem;
}

#box-profilo.profilo-expanded {
  max-width: 500px;
  max-height: 800px;
  /* abbastanza grande da contenere i textarea */
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding-top: 1.2rem;
  padding-bottom: 1.5rem;
  margin: 2.5rem auto;
}

/* Etichette */
#box-profilo label {
  display: block;
  margin: 5px 0 5px;
}

/* Input di testo */
#box-profilo input {
  display: block;
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  box-sizing: border-box;
}

#rispostaProfilo {
  margin-bottom: 1rem;
  /* spazio sotto al messaggio */
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
}

/*bottoni*/
.riga-bottoni {
  margin-top: 0.5rem;
}

.btn-area-personale {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--colore-primario);
  color: #fff;
  margin: 0.2rem;
  border: 2px solid var(--colore-primario);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-annulla {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: none;
  color: var(--colore-primario);
  margin: 0.2rem;
  border: 2px solid var(--colore-primario);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* Contenitore fisarmonica password */
#box-password {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  margin-bottom: 1rem;
}

#box-password.password-expanded {
  max-width: 500px;
  max-height: 600px;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding-top: 1.2rem;
  padding-bottom: 1.5rem;
  margin: 2.5rem auto;
}

/* Etichette */
#box-password label {
  display: block;
  margin: 5px 0;
}

/* Input */
#box-password input {
  display: block;
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  box-sizing: border-box;
}


/* BOttone apri/chiudi password */
#toggle-password {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0px auto 0px;
  background: none;
  color: var(--colore-primario);
  border: 2px solid var(--colore-primario);
  padding: 10px 15px 10px 12px;
  border-radius: 6px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.btn-cancella {
  display: block;
  padding: 0.5rem 1rem;
  background: none;
  color: var(--colore-secondario);
  margin: 0rem auto 4rem;
  border: 2px solid var(--colore-secondario);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* Logout Button */
#logout-button {
  position: absolute;
  top: 85px;
  right: 20px;
  /* Aligned with the right icons */
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 900;
  cursor: pointer;
}

#logout-button img {
  width: 40px;
  height: 40px;
}