/* ============================================================
   JK TECH — CHATBOT STYLES
   Enterprise concierge widget — dark, minimal, premium
   ============================================================ */

/* ── Trigger Button ──────────────────────────────────────────── */
#jk-chatbot {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9000;
  font-family: 'Inter', sans-serif;
}

#jk-chat-trigger {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1f2e, #0d1520);
  border: 1.5px solid rgba(201, 162, 39, 0.4);
  color: #C9A227;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(201, 162, 39, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: chatbot-pulse-ring 3s ease-in-out infinite;
}

#jk-chat-trigger:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: rgba(201, 162, 39, 0.8);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(201, 162, 39, 0.25);
}

@keyframes chatbot-pulse-ring {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 0 rgba(201,162,39,0.2); }
  50%       { box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 8px rgba(201,162,39,0); }
}

/* Notification dot */
#jk-chat-notif {
  display: none;
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: #1EE8AA;
  border-radius: 50%;
  border: 2px solid #020812;
  animation: notif-blink 2s ease-in-out infinite;
}

@keyframes notif-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(0.85); }
}

/* ── Chat Window ─────────────────────────────────────────────── */
#jk-chat-window {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  max-height: 560px;
  background: #060e1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(201, 162, 39, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;

  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#jk-chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ── Header ──────────────────────────────────────────────────── */
#jk-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.07) 0%, rgba(0, 196, 255, 0.03) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

#jk-chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

#jk-chat-avatar {
  width: 38px;
  height: 38px;
  background: rgba(201, 162, 39, 0.12);
  border: 1.5px solid rgba(201, 162, 39, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C9A227;
  font-size: 0.95rem;
  position: relative;
  flex-shrink: 0;
}

#jk-chat-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: #1EE8AA;
  border-radius: 50%;
  border: 2px solid #060e1c;
}

#jk-chat-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #F0F4FF;
  letter-spacing: 0.01em;
}

#jk-chat-subtitle {
  font-size: 0.7rem;
  color: rgba(136, 153, 187, 0.8);
  margin-top: 1px;
  letter-spacing: 0.02em;
}

#jk-chat-close-btn {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: rgba(136, 153, 187, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#jk-chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #F0F4FF;
}

/* ── Messages ────────────────────────────────────────────────── */
#jk-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

#jk-chat-messages::-webkit-scrollbar { width: 3px; }
#jk-chat-messages::-webkit-scrollbar-track { background: transparent; }
#jk-chat-messages::-webkit-scrollbar-thumb { background: rgba(201, 162, 39, 0.3); border-radius: 2px; }

.jk-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.jk-msg.jk-msg-visible {
  opacity: 1;
  transform: none;
}

.jk-msg-bot {
  flex-direction: row;
}

.jk-msg-user {
  flex-direction: row-reverse;
}

.jk-msg-avatar {
  width: 28px;
  height: 28px;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C9A227;
  font-size: 0.65rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.jk-msg-bubble {
  max-width: 82%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.65;
}

.jk-msg-bot .jk-msg-bubble {
  background: rgba(10, 22, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #C8D8F0;
  border-radius: 4px 14px 14px 14px;
}

.jk-msg-user .jk-msg-bubble {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.18), rgba(201, 162, 39, 0.08));
  border: 1px solid rgba(201, 162, 39, 0.2);
  color: #F0F4FF;
  border-radius: 14px 4px 14px 14px;
}

/* Typing animation */
.jk-typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
}

.jk-typing-dots span {
  width: 6px;
  height: 6px;
  background: rgba(201, 162, 39, 0.5);
  border-radius: 50%;
  animation: typing-bounce 1.2s ease-in-out infinite;
}

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

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ── Suggestions ─────────────────────────────────────────────── */
#jk-chat-suggestions {
  padding: 0 16px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  flex-shrink: 0;
}

.jk-suggestion {
  padding: 6px 12px;
  background: rgba(10, 22, 40, 0.7);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 500;
  color: #C9A227;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
  font-family: 'Inter', sans-serif;
}

.jk-suggestion:hover {
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(201, 162, 39, 0.4);
  transform: translateY(-1px);
}

/* ── Footer / Input ──────────────────────────────────────────── */
#jk-chat-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(5, 13, 26, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

#jk-chat-input {
  flex: 1;
  background: rgba(15, 30, 53, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #F0F4FF;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s ease;
}

#jk-chat-input::placeholder {
  color: rgba(74, 88, 112, 0.8);
}

#jk-chat-input:focus {
  border-color: rgba(201, 162, 39, 0.35);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.06);
}

#jk-chat-send {
  width: 36px;
  height: 36px;
  background: rgba(201, 162, 39, 0.15);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 50%;
  color: #C9A227;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#jk-chat-send:hover {
  background: rgba(201, 162, 39, 0.25);
  border-color: rgba(201, 162, 39, 0.5);
  transform: scale(1.05);
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  #jk-chatbot {
    bottom: 20px;
    right: 16px;
  }

  #jk-chat-window {
    width: calc(100vw - 32px);
    right: 0;
    bottom: 68px;
    max-height: 480px;
  }
}

