/* ============================================
   AI Chatbots service page — hero section
   ============================================ */

.ai-chat-hero {
  background: #02050a;
  overflow: hidden;
}

.ai-chat-hero .page-header-content { padding: 0; }

/* Background shapes */
.ai-chat-hero .ws-shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.ai-chat-hero .ws-shapes img { position: absolute; }
.ai-chat-hero .ws-shapes .ws-shape-1 { top: 0; right: 0; opacity: 0.5; }
.ai-chat-hero .ws-shapes .ws-shape-2 { bottom: 0; left: 0; opacity: 0.4; }
.ai-chat-hero .ws-shapes .ws-shape-3 { top: 0; left: 0; opacity: 0.18; }

/* ── Two-column layout ── */
.ai-chat-hero .ws-hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 140px 0 80px;
  position: relative;
  z-index: 1;
}

/* ── LEFT: text ── */
.ai-chat-hero .ws-hero-text { flex: 1; min-width: 0; }
.ai-chat-hero .ws-hero-text .title {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #fff;
}

/* ── RIGHT: chat window ── */
.cv-wrap {
  flex: 0.9;
  min-width: 0;
  max-width: 500px;
}

/* macOS-style panel */
.cv-panel {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  height: 400px;
}

.cv-panel-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.cv-dot { width: 11px; height: 11px; border-radius: 50%; }
.cv-dot-red    { background: #ff5f57; }
.cv-dot-yellow { background: #ffbd2e; }
.cv-dot-green  { background: #27c93f; }
.cv-panel-title {
  margin-left: 8px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

/* Chat body */
.cv-chat-wrap {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 14px 14px;
  gap: 8px;
}

/* Messages */
.cv-msg {
  max-width: 88%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0;
  animation: cvMsgIn 0.4s ease forwards;
}
@keyframes cvMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cv-msg.cv-msg-out {
  animation: cvMsgOut 0.35s ease forwards;
}
@keyframes cvMsgOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}

.cv-msg-user {
  align-self: flex-end;
  background: rgba(96,165,250,0.15);
  border: 1px solid rgba(96,165,250,0.25);
  color: #bfdbfe;
  border-bottom-right-radius: 3px;
}
.cv-msg-bot {
  align-self: flex-start;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.2);
  color: #a7f3d0;
  border-bottom-left-radius: 3px;
}
.cv-msg-bot::before { content: "🤖 "; font-size: 10px; }

/* Typing indicator */
.cv-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  align-self: flex-start;
  opacity: 0;
  transition: opacity 0.3s;
}
.cv-typing.cv-visible { opacity: 1; }
.cv-typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #34d399;
  animation: cvTypingDot 1s ease-in-out infinite;
}
.cv-typing span:nth-child(2) { animation-delay: 0.15s; }
.cv-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cvTypingDot {
  0%, 100% { transform: translateY(0);    opacity: 0.4; }
  50%       { transform: translateY(-4px); opacity: 1; }
}

/* ── Light mode ── */
[data-theme="light"] .ai-chat-hero { background: white; }
[data-theme="light"] .ai-chat-hero .ws-shapes .ws-shape-1 { opacity: 0.18; }
[data-theme="light"] .ai-chat-hero .ws-shapes .ws-shape-2 { opacity: 0.12; }
[data-theme="light"] .ai-chat-hero .ws-shapes .ws-shape-3 { opacity: 0.07; }
[data-theme="light"] .ai-chat-hero .ws-hero-text .title { color: var(--rr-color-heading-primary); }

/* ── Responsive ── */
@media (max-width: 992px) {
  .ai-chat-hero .ws-hero-inner {
    flex-direction: column;
    padding: 120px 0 60px;
    gap: 40px;
    min-height: unset;
  }
  .ai-chat-hero .ws-hero-text { text-align: center; }
  .cv-wrap { width: 100%; }
}
@media (max-width: 600px) {
  .cv-wrap { display: none; }
}
