body {
  font-family: Arial, sans-serif;
  margin: 0;
}

/* Chat Button */
.chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #19c37d;
  color: #fff;
  font-size: 24px;
  border: none;
  cursor: pointer;
  z-index: 1000;
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 500px;
  max-width: calc(100vw - 40px);
  height: 420px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 10px;
  display: none;
  flex-direction: column;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 999;
}

.chat-header {
  background: #19c37d;
  padding: 12px;
  font-weight: bold;
  color: white;
}

.chat-box {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #f9f9f9;
  color: #000;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  white-space: pre-wrap;
}

.message {
  padding: 8px 12px;
  margin: 5px 0;
  border-radius: 8px;
  max-width: 90%;
  font-size: 14px;
  word-wrap: break-word;
}

.user {
  background: #abf0c8;
  color: #000;
  margin-left: auto;
}

.bot {
  color: #000;
}

.chat-input {
  display: flex;
  padding: 8px;
  background: #19c37d;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 5px;
  min-width: 0;
}

.chat-input button {
  margin-left: 5px;
  padding: 10px 14px;
  background: #158f5d;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-widget {
    width: calc(100vw - 20px);
    height: 70vh;
    right: 10px;
    bottom: 80px;
    border-radius: 12px;
  }

  .chat-toggle {
    width: 55px;
    height: 55px;
    right: 15px;
    bottom: 15px;
    font-size: 22px;
  }

  .chat-header {
    padding: 10px;
    font-size: 16px;
  }

  .chat-box {
    padding: 8px;
    font-size: 14px;
  }

  .chat-input {
    padding: 6px;
  }

  .chat-input input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 10px;
  }

  .chat-input button {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* Small Phones */
@media (max-width: 480px) {
  .chat-widget {
    width: 100vw;
    height: 100vh;
    right: 0;
    bottom: 0;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .chat-toggle {
    width: 50px;
    height: 50px;
    right: 10px;
    bottom: 10px;
  }
}

.source-card{
  border-radius:3px;
  background:#f4f4f4;
  border-left:4px solid #4CAF50;
  font-size:0.9em;
}

.source-card small{
  color:#666;
}

.hidden {
  display: none;
}
        