/* ===============================
   EO Chat Styles
   =============================== */

#eo-chatbox {
  font-family: "Segoe UI", Roboto, sans-serif;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 600px;
  height: 600px;
  display: flex;
  flex-direction: column;
  margin: 40px auto;
}

#eo-chatbox h2 {
  margin: 0;
  padding: 16px;
  background: #0073aa;
  color: #fff;
  font-size: 1.2rem;
  border-radius: 12px 12px 0 0;
}

#eo-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ===============================
   Input e controlli
   =============================== */

#eo-controls {
  display: flex;
  padding: 16px;
  border-top: 1px solid #ddd;
  background: #fff;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}

#eo-chat-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  margin-right: 0;
}

#eo-chat-send {
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 8px;
  margin: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 4px; /* distacco visivo dal bordo inferiore */
}

#eo-chat-send:hover {
  background: #005d87;
}

#eo-status {
  padding: 8px 12px;
  font-size: 0.9em;
  color: #666;
}

/* ===============================
   Messaggi
   =============================== */

.msg {
  max-width: 75%;
  padding: 10px 14px;
  margin: 8px 0;
  border-radius: 12px;
  line-height: 1.4;
  word-wrap: break-word;
}

.msg-user {
  background: #d1f5d3;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.msg-assistant {
  background: #e1ebff;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

/* ===============================
   Responsive (mobile < 600px)
   =============================== */

@media (max-width: 600px) {

  #eo-chatbox {
    height: 90vh;
    margin: 0 auto;
    border-radius: 0;
  }

  #eo-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px;
  }

  #eo-chat-input {
    width: 100%;
    font-size: 1rem;
  }

  #eo-chat-send {
    width: 100%;
    margin: 10px;
    font-size: 1.1rem;
    margin-bottom: 6px;
  }
}