/* CHATBOT — widget styles. Delete file to remove. */
#petnet-chat-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99990;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #222;
}
#petnet-chat-launcher {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #2d8f2d;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
#petnet-chat-launcher:hover { background: #236d23; }
#petnet-chat-panel {
  position: fixed;
  right: 20px; bottom: 90px;
  width: 360px;
  max-width: calc(100vw - 40px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#petnet-chat-panel.open { display: flex; }
.petnet-chat-header {
  background: #2d8f2d;
  color: white;
  padding: 12px 16px;
  font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
.petnet-chat-header button {
  background: transparent; border: none; color: white;
  font-size: 20px; cursor: pointer;
}
.petnet-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f7f7f7;
  display: flex; flex-direction: column; gap: 8px;
}
.petnet-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.petnet-msg.user {
  align-self: flex-end;
  background: #2d8f2d;
  color: white;
  border-bottom-right-radius: 2px;
}
.petnet-msg.assistant {
  align-self: flex-start;
  background: white;
  border: 1px solid #e0e0e0;
  border-bottom-left-radius: 2px;
}
.petnet-msg.system {
  align-self: center;
  background: #eee;
  color: #777;
  font-size: 12px;
  font-style: italic;
}
.petnet-refs {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 6px;
}
.petnet-ref {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  color: #222;
  transition: background .12s, border-color .12s;
}
.petnet-ref:hover { background: #f0f0f0; border-color: #2d8f2d; }
.petnet-ref.product { cursor: pointer; }
.petnet-ref-thumb {
  width: 56px; height: 56px;
  flex: 0 0 56px;
  object-fit: contain;
  background: white;
  border-radius: 4px;
  border: 1px solid #eee;
}
.petnet-ref-body { flex: 1; min-width: 0; }
.petnet-ref-title {
  font-weight: 600; font-size: 13px;
  line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.petnet-ref-sub { font-size: 12px; color: #2d8f2d; font-weight: 600; margin-top: 2px; }
.petnet-chat-footer {
  border-top: 1px solid #e0e0e0;
  padding: 10px;
  background: white;
  display: flex; gap: 6px;
}
.petnet-chat-footer input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.petnet-chat-footer button {
  background: #2d8f2d;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.petnet-chat-footer button:disabled { background: #999; cursor: wait; }
.petnet-typing {
  align-self: flex-start;
  color: #888;
  font-size: 12px;
  font-style: italic;
  padding: 4px 8px;
}
