/* ============================================================
   HIZIX CV — CHATBOT STYLES (v7)
   ============================================================
   Floating bubble + slide-up panel.
   Mobile: full-screen overlay. Desktop: 380px panel.
   ============================================================ */

:root {
  --hzx-chat-z: 9999;
  --hzx-chat-bg: #ffffff;
  --hzx-chat-fg: #0a0e0c;
  --hzx-chat-muted: #6b7280;
  --hzx-chat-accent: #635bff;
  --hzx-chat-accent-2: #ec4899;
  --hzx-chat-bubble-bg: linear-gradient(135deg, #635bff 0%, #ec4899 100%);
  --hzx-chat-border: #e5e7eb;
  --hzx-chat-msg-bot: #f3f4f6;
  --hzx-chat-msg-user: linear-gradient(135deg, #635bff 0%, #8b5cf6 100%);
  --hzx-chat-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ─── BUBBLE ─────────────────────────────────────────────── */
.hzx-chat-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--hzx-chat-z);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 12px 14px;
  border: none;
  border-radius: 999px;
  background: var(--hzx-chat-bubble-bg);
  color: white;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(99, 91, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hzx-chat-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 91, 255, 0.5);
}
.hzx-chat-bubble:active { transform: translateY(0); }
.hzx-chat-bubble-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

/* attention pulse */
.hzx-chat-bubble-pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  opacity: 0.5;
  animation: hzxPulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes hzxPulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* nudge animation when first-time visitor stays a while */
.hzx-chat-bubble-nudge {
  animation: hzxNudge 0.6s ease 0s 3;
}
@keyframes hzxNudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.hzx-chat-bubble-text {
  position: relative;
  z-index: 1;
}

/* ─── PANEL ──────────────────────────────────────────────── */
.hzx-chat-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--hzx-chat-z);
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 580px;
  max-height: calc(100vh - 40px);
  background: var(--hzx-chat-bg);
  border-radius: 16px;
  box-shadow: var(--hzx-chat-shadow);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--hzx-chat-fg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.hzx-chat-panel-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ─── HEAD ───────────────────────────────────────────────── */
.hzx-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #635bff 0%, #ec4899 100%);
  color: white;
}
.hzx-chat-head-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hzx-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.hzx-chat-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.hzx-chat-status {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hzx-chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.3);
}
.hzx-chat-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.hzx-chat-close:hover { background: rgba(255, 255, 255, 0.25); }

/* ─── MESSAGES ───────────────────────────────────────────── */
.hzx-chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
  scroll-behavior: smooth;
}
.hzx-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: hzxMsgIn 0.25s ease;
}
@keyframes hzxMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.hzx-msg-bot {
  align-self: flex-start;
  background: var(--hzx-chat-msg-bot);
  color: var(--hzx-chat-fg);
  border-bottom-left-radius: 4px;
}
.hzx-msg-user {
  align-self: flex-end;
  background: var(--hzx-chat-msg-user);
  color: white;
  border-bottom-right-radius: 4px;
}

.hzx-chat-link {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: white;
  color: var(--hzx-chat-accent);
  border: 1px solid var(--hzx-chat-accent);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.hzx-chat-link:hover {
  background: var(--hzx-chat-accent);
  color: white;
}

/* typing indicator */
.hzx-msg-typing {
  display: inline-flex;
  gap: 4px;
  padding: 14px 16px;
}
.hzx-msg-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  animation: hzxTyping 1.2s infinite ease-in-out;
}
.hzx-msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.hzx-msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes hzxTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ─── QUICK CHIPS ────────────────────────────────────────── */
.hzx-chat-quick {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  border-top: 1px solid var(--hzx-chat-border);
  background: white;
  scrollbar-width: none;
}
.hzx-chat-quick::-webkit-scrollbar { display: none; }
.hzx-chat-quick button {
  flex-shrink: 0;
  background: #f3f4f6;
  border: 1px solid transparent;
  color: #374151;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.hzx-chat-quick button:hover {
  background: white;
  border-color: var(--hzx-chat-accent);
  color: var(--hzx-chat-accent);
}

/* ─── INPUT ──────────────────────────────────────────────── */
.hzx-chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid var(--hzx-chat-border);
}
.hzx-chat-input {
  flex: 1;
  border: 1px solid var(--hzx-chat-border);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease;
}
.hzx-chat-input:focus {
  border-color: var(--hzx-chat-accent);
}
.hzx-chat-send {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--hzx-chat-bubble-bg);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.hzx-chat-send:hover { transform: scale(1.05); }
.hzx-chat-send:active { transform: scale(0.95); }

/* ─── FOOT ───────────────────────────────────────────────── */
.hzx-chat-foot {
  padding: 6px 12px 10px;
  text-align: center;
  font-size: 10.5px;
  color: var(--hzx-chat-muted);
  background: white;
  border-top: 1px solid var(--hzx-chat-border);
}

/* ─── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hzx-chat-bubble {
    bottom: 16px;
    right: 16px;
    padding: 11px 16px 11px 12px;
    font-size: 13px;
  }
  .hzx-chat-bubble-text {
    display: none; /* just icon on mobile */
  }
  .hzx-chat-bubble {
    width: 50px;
    height: 50px;
    padding: 0;
    justify-content: center;
  }
  .hzx-chat-panel {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .hzx-chat-msgs {
    padding-bottom: 24px;
  }
}
