/* Chatbot widget styles.
   Uses these CSS variables if already defined in your site's stylesheet:
   --gradient, --navy, --bg-light. Otherwise define fallbacks below or replace with your palette. */

#chatbot-widget { position: fixed; bottom: 24px; right: 24px; z-index: 1000; }
#chatbot-toggle {
  background: var(--gradient, #6a4cff);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(27, 37, 71, 0.25);
  font-size: 1rem;
  display: flex;
  align-items: center;
}
.chatbot-avatar-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
#chatbot-toggle .chatbot-avatar-icon { width: 28px; height: 28px; }
.chatbot-header .chatbot-avatar-icon { width: 24px; height: 24px; margin-right: 8px; }
.chatbot-msg-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
#chatbot-panel {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(27, 37, 71, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#chatbot-panel.hidden { display: none; }
.hidden { display: none !important; }
.chatbot-header {
  background: var(--navy, #1b2547);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  font-weight: 700;
}
.chatbot-header-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.chatbot-freshness { font-weight: 400; font-size: 0.72rem; opacity: 0.8; margin-top: 2px; }
.chatbot-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
#chatbot-messages {
  padding: 12px;
  height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chatbot-msg {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  max-width: 85%;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.chatbot-msg-user {
  background: var(--bg-light, #f4f6fb);
  align-self: flex-end;
  color: var(--navy, #1b2547);
}
.chatbot-msg-bot {
  background: rgba(106, 76, 255, 0.1);
  align-self: flex-start;
  color: var(--navy, #1b2547);
}
#chatbot-form {
  display: flex;
  border-top: 1px solid #e5e8f0;
}
#chatbot-input {
  flex: 1;
  border: none;
  padding: 12px;
  font-family: inherit;
  font-size: 0.9rem;
}
#chatbot-input:focus { outline: none; }
#chatbot-form button[type="submit"] {
  border: none;
  border-radius: 0;
  cursor: pointer;
  padding: 12px 18px;
  background: var(--gradient, #6a4cff);
  color: #fff;
  font-weight: 700;
}
#chatbot-endpanel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chatbot-endpanel-block { text-align: center; }
.chatbot-endpanel-block p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--navy, #1b2547);
}
.chatbot-feedback-buttons { display: flex; justify-content: center; gap: 12px; }
.chatbot-feedback-btn {
  border: 1px solid #e5e8f0;
  background: var(--bg-light, #f4f6fb);
  border-radius: 8px;
  font-size: 1.3rem;
  padding: 6px 14px;
  cursor: pointer;
}
.chatbot-feedback-btn:hover { background: #e5e8f0; }
#chatbot-feedback-thanks { font-size: 0.9rem; color: var(--navy, #1b2547); margin: 0; }
.chatbot-donation-btn {
  display: inline-block;
  background: var(--gradient, #6a4cff);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
}
