/* Container & visibility */
.ocw-chat-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #0073aa;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;
}

.ocw-chat-button:hover {
  background: #005177;
}

.ocw-chat-button svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* Typing indicator */
.ocw-typing {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 16px;
  background: #f1f1f1;
  color: #333;
  font-size: 14px;
}

.ocw-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  background: #999;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}

.ocw-typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.ocw-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% { opacity: .2; }
  20% { opacity: 1; }
  100% { opacity: .2; }
}

.ocw-chat-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 300px;
  max-height: 400px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 9999;
}
.ocw-chat-window.hidden {
  display: none;
}

/* Header */
.ocw-header {
  background: #0073aa;
  color: #fff;
  padding: 8px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-weight: bold;
  text-align: center;
}

/* Messages */
.ocw-messages {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  font-size: 14px;
}
.ocw-msg {
  margin-bottom: 8px;
  clear: both;
}
.ocw-msg.user {
  text-align: right;
}
.ocw-msg.bot {
  text-align: left;
}
.ocw-msg .text {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 16px;
  max-width: 80%;
}
.ocw-msg.user .text {
  background: #0073aa;
  color: #fff;
}
.ocw-msg.bot .text {
  background: #f1f1f1;
  color: #333;
}

/* Input Area */
.ocw-input-area {
  display: flex;
  border-top: 1px solid #ddd;
}
#ocw-input {
  flex: 1;
  padding: 8px;
  border: none;
  outline: none;
}
#ocw-send-btn {
  padding: 0 16px;
  background: #0073aa;
  border: none;
  color: #fff;
  cursor: pointer;
}
#ocw-send-btn:disabled {
  background: #aaa;
  cursor: default;
}