/* ===== MEMO Chatbot Pro — stili schermata chat ===== */

.chat-lista {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}

.bolla {
  max-width: 82%; padding: 12px 16px; border-radius: 18px;
  font-size: 16px; line-height: 1.5; white-space: pre-wrap;
}
.bolla-utente {
  align-self: flex-end; background: #004AAD; color: white; border-bottom-right-radius: 4px;
}
.bolla-memo {
  align-self: flex-start; background: white; color: #0d1f3c;
  border: 1.5px solid #e2e8f0; border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bolla-benvenuto {
  align-self: center; background: #eff6ff; border: 1.5px solid #bfdbfe;
  border-radius: 14px; padding: 14px 18px; font-size: 15px;
  color: #1e40af; text-align: center; max-width: 90%;
}

.bolla-typing {
  align-self: flex-start; background: white; border: 1.5px solid #e2e8f0;
  border-radius: 18px; border-bottom-left-radius: 4px; padding: 14px 18px;
}
.typing-dot {
  display: inline-block; width: 8px; height: 8px; background: #94A3B8;
  border-radius: 50%; margin: 0 2px; animation: typing 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%,60%,100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chat-input-area {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: white; border-top: 1.5px solid #e2e8f0; flex-shrink: 0;
}
.chat-input {
  flex: 1; border: 1.5px solid #cbd5e1; border-radius: 14px;
  padding: 10px 14px; font-size: 16px; resize: none; outline: none;
  font-family: inherit; max-height: 120px; line-height: 1.4;
}
.chat-input:focus { border-color: #2563d9; }
.chat-btn-invia {
  background: #004AAD; color: white; border: none; border-radius: 12px;
  width: 44px; height: 44px; font-size: 18px; cursor: pointer; flex-shrink: 0;
}
.chat-btn-invia:disabled { background: #94A3B8; cursor: default; }
.chat-btn-foto {
  background: none; border: 1.5px solid #cbd5e1; border-radius: 12px;
  width: 44px; height: 44px; font-size: 20px; cursor: pointer; flex-shrink: 0;
}

.chat-anteprima {
  padding: 8px 16px; background: white; display: flex;
  align-items: center; gap: 8px; font-size: 14px; color: #2563d9;
  border-top: 1px solid #f1f5f9; flex-shrink: 0;
}
.chat-anteprima img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.chat-rimuovi-foto { color: #ef4444; cursor: pointer; font-size: 18px; margin-left: auto; }
