/* Bottone di apertura */
.assistant-toggle {
  position: fixed;
  bottom: 25px; right: 25px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg,#00C6FF,#0093D1);
  color: #00131F;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(0,198,255,0.4);
  cursor: pointer; z-index: 998; transition: .25s;
}
.assistant-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(0,198,255,0.6);
}

/* Contenitore chat */
.assistant-container {
  position: fixed; bottom: 95px; right: 25px;
  width: 340px; max-height: 520px;
  background: rgba(4,16,28,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.4);
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 999;
  transform: scale(0); opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
}
.assistant-container.visible {
  transform: scale(1); opacity: 1;
  pointer-events: auto;
}

/* Header chat */
#assistantHeader {
  background: linear-gradient(90deg,#00C6FF,#0093D1);
  padding: 8px 12px;
  color: #00131F;
  font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
#assistantClose {
  background: transparent; border: none;
  color: #00131F; font-size: 18px; cursor: pointer;
}

/* Corpo chat */
#assistantOutput {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  color: #FFFFFF;
  font-size: 14px; line-height: 1.4;
}

/* Area input */
.assistant-input-area {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 8px; gap: 6px;
}
#assistantInput {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.08);
  color: #FFFFFF;
}
#assistantSend {
  background: linear-gradient(135deg,#00C6FF,#0093D1);
  color: #00131F;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .25s;
}
#assistantSend:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,198,255,0.35);
}

/* Messaggi */
.user-msg, .bot-msg {
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 10px;
  max-width: 90%;
}
.user-msg {
  align-self: flex-end;
  background: rgba(0,198,255,0.25);
  color: #00C6FF;
}
.bot-msg {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  color: #FFFFFF;
}

@media (max-width: 640px) {
  .assistant-container { right: 10px; left: 10px; width: auto; bottom: 80px; }
  .assistant-toggle   { right: 15px; bottom: 15px; }
}
