#oswchatbot-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#oswchatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: #1e5fa8;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

#oswchatbot-toggle:hover {
  transform: scale(1.06);
}

#oswchatbot-toggle.oswchatbot-hidden {
  display: none;
}

#oswchatbot-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 100px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#oswchatbot-header {
  background: #1e5fa8;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
}

#oswchatbot-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

#oswchatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f5f7fa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oswchatbot-msg {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.oswchatbot-msg a {
  color: inherit;
  text-decoration: underline;
}

.oswchatbot-msg-user {
  align-self: flex-end;
  background: #1e5fa8;
  color: #fff;
  border-bottom-right-radius: 3px;
}

.oswchatbot-msg-assistant {
  align-self: flex-start;
  background: #fff;
  color: #222;
  border: 1px solid #e2e6ea;
  border-bottom-left-radius: 3px;
}

.oswchatbot-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
}

.oswchatbot-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aa5b1;
  animation: oswchatbot-bounce 1.2s infinite ease-in-out;
}

.oswchatbot-typing span:nth-child(2) { animation-delay: 0.15s; }
.oswchatbot-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes oswchatbot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

#oswchatbot-form {
  display: flex;
  border-top: 1px solid #e2e6ea;
  background: #fff;
}

#oswchatbot-input {
  flex: 1;
  border: none;
  padding: 13px 14px;
  font-size: 14px;
  outline: none;
}

#oswchatbot-send {
  border: none;
  background: #fff;
  color: #1e5fa8;
  font-size: 18px;
  width: 48px;
  cursor: pointer;
}

#oswchatbot-send:disabled,
#oswchatbot-input:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 420px) {
  #oswchatbot-panel {
    right: 16px;
    left: 16px;
    width: auto;
  }
}
