/* ══════════════════════════════════════════
   WOXI CHAT — WOW STUDIO
   Gradient: cyan #29b8d4 → purple #a855f7 → magenta #cc2fbd
   ══════════════════════════════════════════ */

#woxi-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── FAB бутон ─────────────────────────────── */
#woxi-fab {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #29b8d4, #a855f7, #cc2fbd);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

#woxi-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(168, 85, 247, 0.6);
}

.woxi-fab-label,
.woxi-fab-close {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  user-select: none;
}

/* ── Чат прозорец ──────────────────────────── */
#woxi-window {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 330px;
  max-height: 500px;
  background: #1e1e2e;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: woxiSlideUp 0.25s ease;
}

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

/* ── Header ────────────────────────────────── */
#woxi-header {
  background: #252535;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

#woxi-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #29b8d4, #a855f7, #cc2fbd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

#woxi-header-info { flex: 1; }

#woxi-header-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

#woxi-header-sub {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  margin-top: 1px;
}

#woxi-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #29b8d4;
  box-shadow: 0 0 6px #29b8d4;
  flex-shrink: 0;
  animation: woxiPulse 2s infinite;
}

@keyframes woxiPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── Messages area ─────────────────────────── */
#woxi-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #181825;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

#woxi-messages::-webkit-scrollbar { width: 4px; }
#woxi-messages::-webkit-scrollbar-track { background: transparent; }
#woxi-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.woxi-msg { display: flex; }
.woxi-msg-bot  { justify-content: flex-start; }
.woxi-msg-user { justify-content: flex-end; }

.woxi-bubble {
  max-width: 85%;
  padding: 10px 13px;
  font-size: 13.5px;
  line-height: 1.55;
}

.woxi-bubble-bot {
  background: #252535;
  color: rgba(255, 255, 255, 0.88);
  border-radius: 4px 14px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.woxi-bubble-user {
  background: linear-gradient(135deg, #29b8d4, #a855f7, #cc2fbd);
  color: #fff;
  border-radius: 14px 4px 14px 14px;
}

/* ── Quick-reply chips ─────────────────────── */
.woxi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.woxi-chip {
  background: transparent;
  color: #29b8d4;
  border: 1px solid #29b8d4;
  border-radius: 20px;
  font-size: 12px;
  padding: 5px 11px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
  line-height: 1.3;
}

.woxi-chip:hover {
  background: rgba(41, 184, 212, 0.14);
}

/* ── Typing indicator ──────────────────────── */
.woxi-typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 3px 0;
}

.woxi-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #29b8d4;
  animation: woxiBounce 1.2s infinite;
}

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

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

/* ── Input footer ──────────────────────────── */
#woxi-footer {
  padding: 10px 12px;
  background: #1e1e2e;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

#woxi-input {
  flex: 1;
  background: #252535;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.85);
  outline: none;
  transition: border-color 0.15s;
}

#woxi-input::placeholder { color: rgba(255, 255, 255, 0.3); }
#woxi-input:focus { border-color: #29b8d4; }

#woxi-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #29b8d4, #a855f7, #cc2fbd);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

#woxi-send:hover { opacity: 0.85; }
#woxi-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Powered by ────────────────────────────── */
#woxi-powered {
  text-align: center;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
  padding: 5px 0 6px;
  background: #1e1e2e;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

/* ── Mobile responsive ─────────────────────── */
@media (max-width: 480px) {
  #woxi-widget {
    bottom: 16px;
    right: 16px;
  }
  #woxi-window {
    width: calc(100vw - 32px);
    right: 0;
    bottom: 64px;
  }
}
