﻿#widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  background: #2f3837;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  max-height: 800px; /* Altezza aumentata */
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease-in-out; /* Transizione per apertura/chiusura */
}


#widget.hidden {
  transform: translateX(100%); /* Nasconde il widget fuori dallo schermo */
}


#header {
  background: #fe5433;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
}

#botName {
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

#controls button {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  margin-left: 8px;
  cursor: pointer;
}

#controls button.active {
  color: #ff5252;
}

#chat {
  flex-grow: 1; /* Permette a #chat di occupare lo spazio rimanente */
  max-height: 500px;
  overflow-y: auto;
  padding: 10px;
  font-size: 14px;
  background: #f0f2f1;
}

.message {
  margin-bottom: 10px;
  line-height: 1.6;  /* Distanza tra le righe */
}

.message.user {
  text-align: right;
  color: #35c2f8;
}

.message.bot {
  text-align: left;
  color: #fe5433;
}

#chatForm {
  display: flex;
  border-top: 1px solid #333;
  background: #2f3837;
}

#chatForm input {
  flex: 1;
  padding: 10px;
  border: none;
  background: #3a4341;
  color: white;
}

#chatForm button {
  padding: 10px;
  background: #fe5433;
  border: none;
  color: white;
  cursor: pointer;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0px;
}

.button {
  padding: 12px 20px;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
  margin: 0; /* Rimuove margini extra tra i bottoni */
}

.button:hover {
  background-color: #0056b3;
}

.message.bot {
  margin-top: 20px; /* Aggiunge margine sopra il messaggio del bot per distanziarlo dai bottoni */
}

.message.bot.bold {
  font-weight: bold; /* Grassetto per i messaggi importanti */
  font-size: 16px;
}

.message.bot.category-info {
  background-color: #e7f4f9;
  padding: 10px;
  border-radius: 5px;
  font-size: 14px;
  color: #2c3e50;
  margin-top: 15px;
}

.message.bot.preventivo {
  background-color: #ffd700;
  padding: 10px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-top: 15px;
}

/* Grassetto per messaggi importanti */
.message.bot.bold {
  font-weight: 700; /* Più forte per garantirne la visibilità */
  font-size: 16px;
  color: #fe5433; /* Cambia il colore se necessario */
  margin-top: 15px;
}




.message {
  white-space: pre-line;
}


/* Aggiungi questo al tuo CSS per il grassetto */
strong {
  font-weight: bold;
}



/* Aggiungi questo per garantire che i ritorni a capo vengano visualizzati correttamente */
.message.bot {
  white-space: pre-wrap; /* Mantiene i ritorni a capo \n */
  word-wrap: break-word; /* Evita che le parole vadano fuori dal contenitore */
}



