/* chatbot demo window styles */
.chatbot-window {
  background: var(--color-bg-elevated);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 540px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow:
    0 1px 0 0 #ffffff08 inset,
    0 24px 60px -20px #00000080,
    0 0 0 1px #ffffff04;
}

.cb-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--color-border);
  background: linear-gradient(to bottom, #16161680, transparent);
}
.cb-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--color-accent);
  color: var(--color-bg);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.cb-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cb-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.cb-controls {
  display: flex;
  gap: 5px;
}
.cb-controls span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-border-strong);
}

.cb-body {
  flex: 1;
  padding: 20px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(1200px 200px at 50% 0%, #ffffff04, transparent),
    var(--color-bg-elevated);
}

.cb-row { display: flex; }
.cb-row-bot { justify-content: flex-start; }
.cb-row-user { justify-content: flex-end; }
.cb-row-system { justify-content: center; padding-top: 4px; }

.cb-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.cb-bubble-bot {
  background: #1d1d1d;
  color: var(--color-text);
  border: 0.5px solid var(--color-border);
  border-bottom-left-radius: 6px;
}
.cb-bubble-user {
  background: var(--color-accent);
  color: var(--color-bg);
  border-bottom-right-radius: 6px;
  font-weight: 500;
}

.cb-tag {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 0.5px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
  color: var(--color-accent);
  text-transform: lowercase;
}

.cb-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 14px;
}
.cb-typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: cb-bounce 1.2s infinite;
}
.cb-typing span:nth-child(2) { animation-delay: 150ms; }
.cb-typing span:nth-child(3) { animation-delay: 300ms; }
@keyframes cb-bounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

.cb-system {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-mono);
  color: var(--color-text-muted);
  text-align: center;
  padding: 6px 12px;
}

.cb-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 0.5px solid var(--color-border);
}
.cb-input {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  background: #0a0a0a;
  border: 0.5px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
}
.cb-send {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 0;
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 14px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.cb-send:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Live mode input (real text input) */
input.cb-input-live {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  background: #0a0a0a;
  border: 0.5px solid var(--color-border);
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--color-text);
  outline: none;
  transition: border-color 160ms ease;
}
input.cb-input-live::placeholder {
  color: var(--color-text-muted);
}
input.cb-input-live:focus {
  border-color: var(--color-accent);
}
