/* ===== CHATBOT PAGE STYLES ===== */

/* Hero override */
.chatbot-hero { background: var(--dark); }

/* ===== CHAT PREVIEW SECTION ===== */
.chatbot-preview-section { background: var(--dark); overflow: hidden; }

.chatbot-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.chatbot-preview-text h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.8px;
  margin-bottom: 16px;
  line-height: 1.2;
}
.chatbot-preview-text > p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 32px;
}

.chatbot-feature-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.chatbot-feature-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.cfeat-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.chatbot-feature-list strong {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 3px;
}
.chatbot-feature-list p {
  color: var(--text-muted);
  font-size: 0.87rem;
  line-height: 1.65;
  margin: 0;
}

/* ===== CHAT MOCKUP ===== */
.chatbot-mockup {
  display: flex;
  justify-content: center;
}

.chat-window {
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(108,71,255,0.15);
  position: relative;
}
.chat-window::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.chat-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--white);
  flex-shrink: 0;
}
.chat-header strong {
  display: block;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
}
.chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--accent);
}
.chat-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: dotPulse 1.5s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.chat-body {
  padding: 20px 16px;
  min-height: 320px;
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

/* message bubbles */
.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.55;
  animation: msgIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.msg-bot {
  background: var(--dark-3);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg-user {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: flex-start;
  width: 82%;
}
.msg-btn {
  background: var(--surface-2);
  border: 1px solid rgba(108,71,255,0.3);
  color: var(--primary-light);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  animation: msgIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
.msg-btn:hover {
  background: rgba(108,71,255,0.15);
  border-color: var(--primary);
  transform: translateX(3px);
}

/* typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 14px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  width: fit-content;
}
.typing-dot {
  width: 6px; height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.chat-input-bar input {
  flex: 1;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: not-allowed;
}
.chat-send-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 10px;
  width: 38px; height: 38px;
  color: var(--white);
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}
.chat-send-btn:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(108,71,255,0.4); }

/* ===== FLOWS GRID ===== */
.flows-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.flow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.flow-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.flow-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.flow-card:hover::before { transform: scaleX(1); }

.flow-num {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 10px;
  transition: opacity var(--transition);
}
.flow-card:hover .flow-num { opacity: 1; }
.flow-icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.flow-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.flow-card p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }
.flow-trigger {
  font-size: 0.75rem;
  color: var(--primary-light);
  background: rgba(108,71,255,0.1);
  border: 1px solid rgba(108,71,255,0.2);
  padding: 4px 10px;
  border-radius: 100px;
  display: inline-block;
}

/* ===== CRM STRIP ===== */
.chatbot-crm-strip { overflow: hidden; }

.crm-strip-inner {
  background: var(--surface);
  border: 1px solid rgba(108,71,255,0.25);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.crm-strip-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}
.crm-strip-text .section-tag { margin-bottom: 12px; }
.crm-strip-text h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.6px;
  margin-bottom: 14px;
  line-height: 1.2;
}
.crm-strip-text p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.75; }

.crm-strip-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.crm-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  min-width: 90px;
  transition: border-color var(--transition), transform var(--transition);
}
.crm-flow-step:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.crm-flow-icon { font-size: 1.8rem; }
.crm-flow-step span { font-size: 0.75rem; color: var(--text-muted); text-align: center; font-weight: 500; }
.crm-flow-arrow {
  font-size: 1.2rem;
  color: var(--primary-light);
  opacity: 0.6;
  animation: arrowPulse 2s ease-in-out infinite;
}

/* ===== PIPELINE TRACK ===== */
.pipeline-track {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 32px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.pipeline-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 0 8px;
}
.ps-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  transition: all 0.3s;
  position: relative;
}
.ps-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s;
}
.pipeline-stage:hover .ps-dot { border-color: var(--primary); }
.pipeline-stage:hover .ps-dot::after { opacity: 1; }

.ps-new .ps-dot { border-color: #4A90D9; }
.ps-browsing .ps-dot { border-color: #7EC8E3; }
.ps-interested .ps-dot { border-color: #F5C842; }
.ps-price .ps-dot { border-color: #F5A623; }
.ps-hot .ps-dot { border-color: #E74C3C; background: rgba(231,76,60,0.15); }
.ps-hot .ps-dot::after { background: #E74C3C; opacity: 1; }
.ps-booked .ps-dot { border-color: #9B59B6; }
.ps-won .ps-dot { border-color: #27AE60; background: rgba(39,174,96,0.15); }
.ps-won .ps-dot::after { background: #27AE60; opacity: 1; }

.pipeline-stage span {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
  transition: color var(--transition);
}
.pipeline-stage:hover span { color: var(--white); }
.ps-hot span, .ps-won span { color: var(--text); font-weight: 600; }

.pipeline-line {
  flex: 1;
  min-width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--border), rgba(108,71,255,0.3));
  margin-bottom: 26px;
  flex-shrink: 0;
}

.pipeline-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 24px;
}
.pipeline-note strong { color: var(--text); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .flows-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .chatbot-preview-grid { grid-template-columns: 1fr; gap: 40px; }
  .chatbot-mockup { order: -1; }
  .crm-strip-inner { grid-template-columns: 1fr; gap: 32px; padding: 36px; }
}
@media (max-width: 640px) {
  .flows-grid { grid-template-columns: 1fr; }
  .chat-window { width: 100%; max-width: 340px; }
  .crm-strip-flow { gap: 8px; }
  .crm-flow-arrow { display: none; }
}
