/* BigD Hosting web chat widget */
#bigd-chat-root {
  --bd-chat-bg: #0f2744;
  --bd-chat-panel: #f7f4ef;
  --bd-chat-accent: #c45c26;
  --bd-chat-ink: #1a1a1a;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99999;
  font-family: Georgia, "Times New Roman", serif;
}
#bigd-chat-root * { box-sizing: border-box; }
#bigd-chat-toggle {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--bd-chat-bg);
  color: #fff;
  padding: 0.85rem 1.15rem;
  font: 600 0.95rem/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 39, 68, 0.35);
}
#bigd-chat-panel {
  display: none;
  width: min(22rem, calc(100vw - 2rem));
  height: 26rem;
  background: var(--bd-chat-panel);
  color: var(--bd-chat-ink);
  border: 1px solid #d9d0c3;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.65rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  flex-direction: column;
}
#bigd-chat-root.is-open #bigd-chat-panel { display: flex; }
#bigd-chat-header {
  background: var(--bd-chat-bg);
  color: #fff;
  padding: 0.85rem 1rem;
  font: 600 0.95rem/1.2 system-ui, sans-serif;
}
#bigd-chat-header small {
  display: block;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 0.25rem;
}
#bigd-chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: linear-gradient(180deg, #fbf8f3, #f1ebe3);
}
.bigd-chat-bubble {
  max-width: 85%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  font: 0.92rem/1.35 system-ui, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}
.bigd-chat-bubble.visitor {
  align-self: flex-end;
  background: #0f2744;
  color: #fff;
}
.bigd-chat-bubble.agent {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #ddd3c6;
}
.bigd-chat-bubble.system {
  align-self: center;
  background: transparent;
  color: #666;
  font-size: 0.8rem;
}
#bigd-chat-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem;
  border-top: 1px solid #ddd3c6;
  background: #fff;
}
#bigd-chat-input {
  flex: 1;
  border: 1px solid #cdbba8;
  border-radius: 0.45rem;
  padding: 0.55rem 0.65rem;
  font: 0.92rem/1.3 system-ui, sans-serif;
}
#bigd-chat-send {
  appearance: none;
  border: 0;
  border-radius: 0.45rem;
  background: var(--bd-chat-accent);
  color: #fff;
  padding: 0 0.9rem;
  font: 600 0.9rem/1 system-ui, sans-serif;
  cursor: pointer;
}
