/* ═════════════════════════════════════════════════════════════════════
   PRATEEK JEWELLERS - MINIMALIST CONCIERGE CHATBOT
   Ultra-Minimal Luxury Design • Polished Silver Metallic Frame
   Custom Vector Line Icons (No Generic System Emojis)
   ═════════════════════════════════════════════════════════════════════ */

/* 1. WIDGET CONTAINER */
.pj-chatbot-widget {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 100050 !important;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  pointer-events: none;
}

/* 2. SPEECH BUBBLE TOOLTIP */
.pj-chat-bubble {
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  margin-right: 8px;
  padding: 8.5px 16px;
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transform-origin: bottom right;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, box-shadow 0.25s ease;
  animation: pjBubbleEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  user-select: none;
}

.pj-chat-bubble:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
}

.pj-chat-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  transform: rotate(45deg);
  border-bottom-right-radius: 2px;
}

.pj-chat-bubble-text {
  color: #0F172A;
  line-height: 1.2;
}

.pj-chat-bubble-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  margin-left: 2px;
}

.pj-chat-bubble-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0F172A;
  transform: scale(1.15);
}

.pj-chat-bubble.is-dismissed {
  opacity: 0;
  transform: scale(0.8) translateY(10px);
  pointer-events: none;
  display: none !important;
}

@keyframes pjBubbleEntrance {
  0% { opacity: 0; transform: scale(0.8) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 3. POLISHED SILVER METALLIC LAUNCHER BUTTON */
.pj-chat-launcher {
  pointer-events: auto;
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(226, 232, 240, 0.28);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.pj-chat-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 32px rgba(255, 255, 255, 0.45);
}

.pj-chat-launcher:active {
  transform: scale(0.96);
}

/* Silver Metallic Outer Ring */
.pj-chat-avatar-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 3.5px;
  background: conic-gradient(from 135deg, #FFFFFF 0%, #CBD5E1 25%, #64748B 50%, #F1F5F9 75%, #FFFFFF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.7);
}

.pj-chat-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0F172A;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Online pulsing indicator on the avatar */
.pj-chat-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #10B981;
  border: 2.5px solid #0B0E14;
  box-shadow: 0 0 8px #10B981;
  animation: pjOnlinePulse 2s infinite ease-in-out;
  z-index: 5;
}

@keyframes pjOnlinePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px #10B981; }
  50% { transform: scale(1.15); box-shadow: 0 0 12px #34D399, 0 0 18px rgba(16, 185, 129, 0.7); }
}

/* Close 'X' icon inside launcher when open */
.pj-chat-close-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0B0E14;
  border: 2px solid #E2E8F0;
  color: #FFFFFF;
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 6;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

.pj-chatbot-widget.is-open .pj-chat-avatar-ring {
  opacity: 0;
  transform: scale(0.5);
}

.pj-chatbot-widget.is-open .pj-chat-online-dot {
  opacity: 0;
}

.pj-chatbot-widget.is-open .pj-chat-close-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* 4. MINIMALIST LUXURY CHAT WINDOW */
.pj-chat-window {
  pointer-events: auto;
  position: fixed;
  bottom: 92px;
  right: 22px;
  width: 350px;
  max-width: calc(100vw - 32px);
  height: 440px;
  max-height: min(440px, calc(100dvh - 210px));
  min-height: 320px;
  background: rgba(10, 13, 18, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 25px rgba(226, 232, 240, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100060 !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.94);
  transform-origin: bottom right;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.28s;
}

.pj-chat-window.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* 5. MINIMALIST HEADER */
.pj-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: rgba(16, 20, 28, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pj-chat-header-agent {
  display: flex;
  align-items: center;
  gap: 11px;
}

.pj-chat-header-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 135deg, #FFFFFF 0%, #CBD5E1 30%, #64748B 60%, #E2E8F0 85%, #FFFFFF 100%);
  box-sizing: border-box;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

.pj-chat-header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.pj-chat-header-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10B981;
  border: 1.5px solid #0B0E14;
  box-shadow: 0 0 6px #10B981;
}

.pj-chat-header-meta {
  display: flex;
  flex-direction: column;
}

.pj-chat-header-name {
  font-family: 'Syne', var(--font-body, 'Plus Jakarta Sans'), sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.03em;
}

.pj-chat-header-subtitle {
  font-size: 10.5px;
  color: #94A3B8;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

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

.pj-chat-header-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.pj-chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  transform: scale(1.05);
}

/* 6. CHAT MESSAGES BODY */
.pj-chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.pj-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.pj-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.pj-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

/* Message Bubble */
.pj-msg-bubble {
  display: flex;
  gap: 9px;
  max-width: 88%;
  animation: pjMsgFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pj-msg-bubble--bot {
  align-self: flex-start;
}

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

.pj-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  margin-top: 2px;
  border: 1px solid rgba(226, 232, 240, 0.3);
}

.pj-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pj-msg-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.pj-msg-bubble--bot .pj-msg-content {
  background: rgba(20, 25, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  border-top-left-radius: 3px;
}

/* User Message: Polished Silver Metallic Pill */
.pj-msg-bubble--user .pj-msg-content {
  background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 60%, #CBD5E1 100%);
  color: #0F172A;
  font-weight: 600;
  border-top-right-radius: 3px;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.pj-msg-content p {
  margin: 0;
}

.pj-msg-time {
  font-size: 9.5px;
  opacity: 0.55;
  margin-top: 2px;
  align-self: flex-end;
}

.pj-msg-bubble--user .pj-msg-time {
  opacity: 0.7;
  color: #0F172A;
}

/* Custom Vector Icon Style inside Message */
.pj-custom-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
  stroke: #94A3B8;
}

.pj-msg-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6.5px 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.22);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pj-msg-action-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
  color: #FFFFFF;
}

.pj-msg-action-btn--silver {
  background: linear-gradient(135deg, #FFFFFF 0%, #CBD5E1 100%);
  color: #0A0D14;
  border: none;
}

.pj-msg-action-btn--silver:hover {
  background: #FFFFFF;
  color: #000000;
}

@keyframes pjMsgFadeIn {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 7. QUICK SUGGESTION CHIPS (With Custom SVGs, No Emojis) */
.pj-chat-suggestions {
  margin-top: 6px;
  animation: pjMsgFadeIn 0.3s ease forwards;
}

.pj-suggestion-title {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  color: #94A3B8;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 8px;
  padding-left: 2px;
  text-transform: uppercase;
}

.pj-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pj-chat-chip {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.18);
  color: #CBD5E1;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
}

.pj-chat-chip svg {
  width: 12px;
  height: 12px;
  stroke: #94A3B8;
  transition: stroke 0.2s ease;
}

.pj-chat-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.pj-chat-chip:hover svg {
  stroke: #FFFFFF;
}

/* 8. TYPING INDICATOR */
.pj-chat-typing {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(20, 25, 34, 0.7);
  border-radius: 10px;
  width: fit-content;
  margin-left: 35px;
  margin-bottom: 6px;
  font-size: 10.5px;
  color: #94A3B8;
}

.pj-typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #CBD5E1;
  animation: pjTypingDot 1.4s infinite ease-in-out;
}

.pj-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.pj-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pjTypingDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
  40% { transform: scale(1.15); opacity: 1; }
}

/* 9. CHAT FOOTER & INPUT BAR */
.pj-chat-footer {
  padding: 11px 13px;
  background: rgba(14, 18, 25, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pj-chat-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 999px;
  padding: 4px 5px 4px 13px;
  transition: all 0.22s ease;
}

.pj-chat-input-form:focus-within {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.pj-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 12px;
  font-family: inherit;
}

.pj-chat-input::placeholder {
  color: #64748B;
}

.pj-chat-send-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #FFFFFF 0%, #CBD5E1 100%);
  color: #0A0D14;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pj-chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.pj-chat-send-btn:active {
  transform: scale(0.95);
}

.pj-chat-footer-note {
  margin-top: 5px;
  font-size: 9px;
  color: #64748B;
  text-align: center;
  letter-spacing: 0.02em;
}

/* 10. RESPONSIVENESS */
@media (max-width: 480px) {
  .pj-chatbot-widget {
    bottom: 18px;
    right: 18px;
  }

  .pj-chat-window {
    bottom: 86px;
    right: 14px;
    left: 14px;
    width: auto;
    height: 72vh;
  }

  .pj-chat-launcher {
    width: 62px;
    height: 62px;
  }

  .pj-chat-bubble {
    font-size: 12px;
    padding: 7px 13px;
  }
}
