/* ==========================================================================
   BLAZEBYTE STUDIO — INTERACTIVE AI CHATBOT SYSTEM (EMBEDDED & FLOATING)
   ========================================================================== */

/* Floating Launcher */
.chatbot-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-active);
  background: rgba(7, 12, 30, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px var(--cyan-glow);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.chatbot-launcher:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 245, 255, 0.5);
  border-color: var(--cyan);
}

.chatbot-launcher.launcher-hidden-embedded {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(20px) scale(0.9) !important;
  visibility: hidden !important;
}

.launcher-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: grid;
  place-items: center;
  font-size: 18px;
  position: relative;
  box-shadow: 0 0 12px var(--cyan-glow);
}

.launcher-avatar::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid #030612;
  box-shadow: 0 0 8px var(--emerald);
}

.launcher-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.launcher-text span {
  display: block;
  font-size: 11px;
  color: var(--cyan);
  font-family: var(--font-mono);
}

/* Chatbot Window (Floating or Embedded) */
.chatbot-box {
  border-radius: 20px;
  border: 1px solid var(--border-active);
  background: linear-gradient(165deg, rgba(12, 19, 44, 0.98), rgba(4, 7, 20, 0.98));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 245, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-body);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Floating Modal variant */
.chatbot-floating-window {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: min(420px, calc(100vw - 32px));
  height: 600px;
  max-height: calc(100vh - 120px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: all var(--transition-smooth);
}

.chatbot-floating-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Embedded variant */
.chatbot-embedded-box {
  width: 100%;
  max-width: 100%;
  height: 600px;
  margin-top: 0;
  box-sizing: border-box;
}

/* Chat Header */
.chat-header {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}

.chat-header-title strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 16px;
  color: #fff;
  letter-spacing: 0.05em;
}

.chat-header-title span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--emerald);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-header-title span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: all var(--transition-fast);
}

.chat-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 88%;
  animation: fadeInMsg 0.25s ease-out;
}

.chat-msg.bot {
  align-self: flex-start;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Small Anime Chibi Bot Character Inside Conversation */
.mini-bot-chibi {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 4px;
}

.chibi-bot-head {
  width: 28px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e1140, #0a0418);
  border: 1.5px solid var(--cyan);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.45);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chibi-bot-antenna {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: var(--cyan);
}

.chibi-bot-antenna::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c084fc;
  box-shadow: 0 0 8px #c084fc;
  animation: anime-pulse 1.8s infinite;
}

.chibi-bot-face {
  display: flex;
  gap: 5px;
  align-items: center;
}

.chibi-bot-eye {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: chibi-blink 3.5s infinite ease-in-out;
}

@keyframes chibi-blink {
  0%, 94%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}

.chibi-bot-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat-bubble {
  position: relative;
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-bubble {
  padding: 13px 17px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-msg.bot .chat-bubble {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  border-bottom-left-radius: 3px;
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, #0284c7, #00f5ff);
  color: #030612;
  font-weight: 500;
  border-bottom-right-radius: 3px;
}

/* Suggestion Quick Chips */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chat-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 255, 0.3);
  background: rgba(0, 245, 255, 0.06);
  color: var(--cyan);
  font-size: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chat-chip:hover {
  background: var(--cyan);
  color: #030612;
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.chat-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 11px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  font-family: var(--font-body);
  box-sizing: border-box;
}

.chat-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cyan);
  color: #030612;
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chat-send-btn:hover {
  background: #38bdf8;
  box-shadow: 0 0 16px var(--cyan-glow);
}

/* AI Assistant Disclosure */
.chat-disclosure {
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  font-family: var(--font-mono);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CHATBOT SHOWCASE SECTION & RESPONSIVE BREAKPOINTS
   ========================================================================== */
.chatbot-showcase-section {
  background: rgba(7, 12, 30, 0.85);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.chatbot-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}

.chatbot-showcase-content {
  display: flex;
  flex-direction: column;
}

.chatbot-showcase-content .title {
  font-size: clamp(28px, 3.6vw, 50px);
  margin-bottom: 18px;
  line-height: 1.2;
}

.chatbot-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.chatbot-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #cbd5e1;
}

.chatbot-feature-item .feature-check {
  color: var(--cyan);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 245, 255, 0.1);
  font-size: 12px;
  flex-shrink: 0;
}

.chatbot-action-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.chatbot-widget-column {
  width: 100%;
  min-width: 0;
}

/* Tablet & Mobile Workflow Optimization */
@media (max-width: 1024px) {
  .chatbot-showcase-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .chatbot-showcase-content {
    text-align: center;
    align-items: center;
  }

  .chatbot-showcase-content .subtitle {
    text-align: center !important;
    max-width: 620px;
  }

  .chatbot-feature-list {
    align-items: flex-start;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
  }

  .chatbot-action-buttons {
    justify-content: center;
    width: 100%;
  }

  .chatbot-embedded-box {
    height: 540px;
  }
}

@media (max-width: 640px) {
  .chatbot-showcase-section {
    padding: 50px 0;
  }

  .chatbot-showcase-grid {
    gap: 28px;
  }

  .chatbot-showcase-content .title {
    font-size: clamp(24px, 6.5vw, 32px);
    margin-bottom: 14px;
  }

  .chatbot-action-buttons .btn {
    width: 100% !important;
  }

  .chatbot-embedded-box {
    height: 510px;
    border-radius: 16px;
  }

  .chat-header {
    padding: 12px 14px;
  }

  .chat-header-title strong {
    font-size: 14px;
  }

  .chat-messages {
    padding: 14px;
    gap: 12px;
  }

  .chat-msg {
    max-width: 96%;
  }

  .chat-bubble {
    padding: 11px 14px;
    font-size: 13px;
  }

  .chat-suggestions {
    gap: 6px;
  }

  .chat-chip {
    padding: 6px 11px;
    font-size: 11px;
  }

  .chat-input-bar {
    padding: 10px 12px;
    gap: 8px;
  }

  .chat-input {
    padding: 9px 12px;
    font-size: 13px;
  }

  .chat-send-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .chat-disclosure {
    font-size: 10px;
    padding: 6px 10px;
  }

  /* Floating Launcher on Mobile */
  .chatbot-launcher {
    bottom: 18px;
    right: 18px;
    padding: 8px 14px;
    gap: 8px;
  }

  .launcher-avatar {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .launcher-text strong {
    font-size: 13px;
  }

  .launcher-text span {
    font-size: 10px;
  }

  .chatbot-floating-window {
    left: 12px;
    right: 12px;
    bottom: 74px;
    width: auto;
    max-width: calc(100vw - 24px);
    height: 500px;
    max-height: calc(100dvh - 90px);
  }
}
