/* Floating button — fixed bottom right corner */
#chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #f59e0b;       /* Amber accent — change to match your site */
  color: #111;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 9999;              /* Always on top of everything */
  transition: transform 0.2s;
}
#chat-toggle:hover { transform: scale(1.1); }

/* Chat window — hidden by default */
#chat-window {
  display: none;              /* Toggled to flex when button clicked */
  flex-direction: column;
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 340px;
  height: 460px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  overflow: hidden;
  z-index: 9998;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* Header bar */
#chat-header {
  background: #222;
  padding: 12px 16px;
  font-weight: 600;
  color: #f59e0b;
  font-size: 14px;
  border-bottom: 1px solid #333;
}

/* Scrollable message area */
#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Individual message bubbles */
.msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}
.msg.user {
  background: #f59e0b;
  color: #111;
  align-self: flex-end;       /* Right aligned */
  border-bottom-right-radius: 2px;
}
.msg.bot {
  background: #2a2a2a;
  color: #e5e5e5;
  align-self: flex-start;     /* Left aligned */
  border-bottom-left-radius: 2px;
}
.msg.loading { color: #888; font-style: italic; }

/* Input row at the bottom */
#chat-input-row {
  display: flex;
  border-top: 1px solid #333;
  padding: 8px;
  gap: 6px;
}
#chat-input {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
}
#chat-send {
  background: #f59e0b;
  border: none;
  border-radius: 8px;
  color: #111;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}