:root {
  --dblog-accent: #01bf71;
  --dblog-dark: #010606;
}

#dblog-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--dblog-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(1, 191, 113, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: transform 0.15s ease;
}

#dblog-chat-launcher:hover {
  transform: scale(1.06);
}

#dblog-chat-launcher svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

#dblog-chat-window {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

#dblog-chat-window.dblog-open {
  display: flex;
}

#dblog-chat-header {
  background: var(--dblog-dark);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#dblog-chat-header strong {
  font-size: 14px;
}

#dblog-chat-header span {
  display: block;
  font-size: 11px;
  color: var(--dblog-accent);
  margin-top: 2px;
}

#dblog-chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}

#dblog-chat-close:hover {
  opacity: 1;
}

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

.dblog-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
  word-wrap: break-word;
}

.dblog-msg p {
  margin: 0 0 6px;
}

.dblog-msg ul,
.dblog-msg ol {
  margin: 0 0 6px;
  padding-left: 18px;
}

.dblog-msg li {
  margin-bottom: 2px;
}

.dblog-msg p:last-child,
.dblog-msg ul:last-child,
.dblog-msg ol:last-child {
  margin-bottom: 0;
}

.dblog-msg strong {
  font-weight: 700;
}


.dblog-msg-user {
  align-self: flex-end;
  background: var(--dblog-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.dblog-msg-assistant {
  align-self: flex-start;
  background: #eee;
  color: #222;
  border-bottom-left-radius: 4px;
}

.dblog-msg-error {
  align-self: flex-start;
  background: #fdecea;
  color: #b3261e;
  border-bottom-left-radius: 4px;
}

#dblog-chat-form {
  display: flex;
  border-top: 1px solid #eee;
  padding: 10px;
  gap: 8px;
  background: #fff;
}

#dblog-chat-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13.5px;
  outline: none;
}

#dblog-chat-input:focus {
  border-color: var(--dblog-accent);
}

#dblog-chat-send {
  background: var(--dblog-accent);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#dblog-chat-send:disabled {
  opacity: 0.6;
  cursor: default;
}

.dblog-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  background: #eee;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}

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

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

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

@keyframes dblog-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
