/* =====================
   CHATBOT PAGE
   ===================== */
.cb-body {
  background: var(--bg);
  min-height: 100vh;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--navy); }

.nav-link-active {
  font-weight: 600;
  color: var(--navy);
}

/* Header */
.cb-header {
  background: var(--navy);
  color: #fff;
  padding: 48px 40px 40px;
}

.cb-header-inner {
  max-width: 900px;
  margin: 0 auto;
}

.cb-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid rgba(217, 119, 6, 0.4);
  border-radius: 100px;
  padding: 5px 12px;
  margin-bottom: 20px;
}

.cb-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.cb-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 12px;
}

.cb-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  max-width: 580px;
  line-height: 1.65;
}

/* Layout */
.cb-container {
  padding: 48px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.cb-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

/* Chat window */
.cb-window {
  background: var(--navy-mid);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cb-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cb-avatar {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.cb-firm-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.cb-firm-tagline {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 1px;
}

/* Chat area */
.cb-chat {
  padding: 24px;
  min-height: 420px;
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.cb-chat::-webkit-scrollbar { width: 6px; }
.cb-chat::-webkit-scrollbar-track { background: transparent; }
.cb-chat::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.cb-msg {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
}

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

.cb-bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px;
  color: rgba(255,255,255,0.88);
}

.cb-msg-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 7px;
}

.cb-label-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.cb-msg-text { white-space: pre-wrap; }

/* Typing dots */
.cb-typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 4px;
}

.cb-typing-dots span {
  display: block;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.cb-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.cb-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* Input area */
.cb-input-area {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
}

.cb-quick-prompts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cb-quick-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: var(--font-body);
}

.cb-quick-btn:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.cb-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cb-input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 0.88rem;
  padding: 11px 16px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
}

.cb-input::placeholder { color: rgba(255,255,255,0.3); }
.cb-input:focus { border-color: rgba(217, 119, 6, 0.5); }

.cb-send-btn {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.cb-send-btn:hover { background: #c26805; }
.cb-send-btn:active { transform: scale(0.95); }
.cb-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Sidebar */
.cb-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cb-sidebar-card {
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.cb-sidebar-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.cb-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.cb-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cb-feature-icon {
  color: #16a34a;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.cb-sidebar-card--calendly .cb-sidebar-title { color: #fff; }
.cb-sidebar-card--calendly {
  background: var(--navy);
  border-color: rgba(255,255,255,0.08);
}

.cb-calendly-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.55;
  margin-bottom: 14px;
}

.cb-calendly-embed {
  border-radius: 10px;
  overflow: hidden;
}

.cb-calendly-embed iframe {
  display: block;
}

.cb-sidebar-card--stats {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cb-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cb-stat-row:last-child { border-bottom: none; }

.cb-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cb-stat-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

/* Responsive */
@media (max-width: 900px) {
  .cb-layout { grid-template-columns: 1fr; }
  .cb-sidebar { display: none; }
  .cb-chat { max-height: 380px; }
}

@media (max-width: 600px) {
  .cb-header { padding: 36px 20px 28px; }
  .cb-container { padding: 28px 20px; }
  .cb-msg { max-width: 92%; }
  .nav-links { display: none; }
}