.woppy-chat-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c6fce 0%, #5a4ba0 100%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 32px rgba(124,111,206,0.32), 0 4px 12px rgba(0,0,0,0.4);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 9998;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}
.woppy-chat-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 40px rgba(124,111,206,0.45), 0 6px 16px rgba(0,0,0,0.5);
}
.woppy-chat-fab:focus-visible {
  outline: 2px solid #9b8cf0;
  outline-offset: 3px;
}
.woppy-chat-fab img { width: 28px; height: 28px; pointer-events: none; }
.woppy-chat-fab.hidden { display: none; }
.woppy-chat-fab .pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #7c6fce;
  opacity: 0.5;
  animation: woppy-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes woppy-pulse {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0;   }
}

.woppy-chat-panel {
  position: fixed; bottom: 24px; right: 24px;
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 48px);
  background: #16161a;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 8px 24px rgba(124,111,206,0.15);
  display: flex; flex-direction: column;
  z-index: 9999;
  overflow: hidden;
  font-family: 'Geist', system-ui, sans-serif;
  color: #e8e8ed;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.woppy-chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.woppy-chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, #1c1c22 0%, #16161a 100%);
}
.woppy-chat-header-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #6a3290;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
}
.woppy-chat-header-avatar img { width: 22px; height: 22px; }
.woppy-chat-header-text { flex: 1; min-width: 0; }
.woppy-chat-header-title {
  font-size: 14px; font-weight: 600; color: #e8e8ed;
  letter-spacing: -0.01em;
}
.woppy-chat-header-sub {
  font-size: 11px; color: #8a8a96;
  display: flex; align-items: center; gap: 5px;
  margin-top: 2px;
}
.woppy-chat-header-sub::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #3aa985; box-shadow: 0 0 0 2px rgba(58,169,133,0.2);
}
.woppy-chat-close {
  background: transparent; border: none;
  color: #8a8a96; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
}
.woppy-chat-close:hover { background: rgba(255,255,255,0.06); color: #e8e8ed; }
.woppy-chat-close svg { width: 16px; height: 16px; }

.woppy-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.woppy-chat-body::-webkit-scrollbar { width: 6px; }
.woppy-chat-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12); border-radius: 3px;
}

.woppy-msg {
  display: flex; gap: 8px; max-width: 86%;
  animation: woppy-msg-in 0.22s ease;
}
@keyframes woppy-msg-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.woppy-msg.bot { align-self: flex-start; }
.woppy-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.woppy-msg-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #6a3290;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
}
.woppy-msg-avatar img { width: 16px; height: 16px; }
.woppy-msg.user .woppy-msg-avatar {
  background: #2a2a32;
  color: #b5acf5;
}
.woppy-msg.user .woppy-msg-avatar svg { width: 14px; height: 14px; }

.woppy-msg-bubble {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13.5px; line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.woppy-msg.bot .woppy-msg-bubble {
  background: #1c1c22;
  border: 1px solid rgba(255,255,255,0.06);
  border-top-left-radius: 4px;
  color: #e8e8ed;
}
.woppy-msg.user .woppy-msg-bubble {
  background: linear-gradient(135deg, #5a4ba0 0%, #7c6fce 100%);
  border-top-right-radius: 4px;
  color: #ffffff;
}

.woppy-typing {
  display: inline-flex; gap: 3px; padding: 4px 0;
}
.woppy-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: #8a8a96;
  animation: woppy-typing 1.2s ease-in-out infinite;
}
.woppy-typing span:nth-child(2) { animation-delay: 0.15s; }
.woppy-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes woppy-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

.woppy-chat-meta {
  padding: 8px 16px;
  font-size: 11px; color: #5a5a65;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex; justify-content: space-between; align-items: center;
}
.woppy-chat-meta-count strong { color: #b5acf5; font-weight: 600; }

.woppy-chat-input-wrap {
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #0f0f12;
}
.woppy-chat-input-row {
  display: flex; gap: 8px; align-items: flex-end;
  background: #1c1c22;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 6px 6px 6px 12px;
  transition: border-color 0.15s ease;
}
.woppy-chat-input-row:focus-within {
  border-color: rgba(155,140,240,0.5);
}
.woppy-chat-input {
  flex: 1;
  background: transparent; border: none; outline: none;
  color: #e8e8ed;
  font-family: inherit;
  font-size: 13.5px; line-height: 1.5;
  resize: none;
  padding: 6px 0;
  max-height: 96px;
}
.woppy-chat-input::placeholder { color: #5a5a65; }
.woppy-chat-input:disabled { opacity: 0.5; cursor: not-allowed; }
.woppy-chat-send {
  background: #7c6fce;
  border: none; border-radius: 8px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #ffffff;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.1s ease;
  padding: 0;
}
.woppy-chat-send:hover:not(:disabled) { background: #9b8cf0; }
.woppy-chat-send:active:not(:disabled) { transform: scale(0.94); }
.woppy-chat-send:disabled { background: #2a2a32; color: #5a5a65; cursor: not-allowed; }
.woppy-chat-send svg { width: 16px; height: 16px; }

.woppy-chat-cta {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: rgba(124,111,206,0.08);
  border: 1px solid rgba(124,111,206,0.24);
  border-radius: 10px;
  font-size: 12px; color: #d4cdfb;
  text-align: center;
}
.woppy-chat-cta a {
  display: inline-block;
  margin-top: 6px;
  padding: 7px 14px;
  background: #7c6fce;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 12px;
  transition: background 0.15s ease;
}
.woppy-chat-cta a:hover { background: #9b8cf0; }

@media (max-width: 640px) {
  .woppy-chat-panel {
    bottom: 0; right: 0;
    width: 100%; max-width: 100%;
    height: 100%; max-height: 100%;
    border-radius: 0;
    border: none;
  }
  .woppy-chat-fab {
    bottom: 16px; right: 16px;
    width: 54px; height: 54px;
  }
}
