/* ==========================================================================
   VIOKA ESTUDIO CREATIVO — AI CHATBOT WIDGET STYLES
   ========================================================================== */

#vioka-chat-widget {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  z-index: 9999;
}

/* Floating Launcher Button */
.vioka-chat-launcher {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #5B0A76 0%, #49227F 60%, #EF773C 100%);
  color: #ffffff;
  box-shadow: 0 10px 25px -3px rgba(91, 10, 118, 0.4), 0 4px 10px -2px rgba(239, 119, 60, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.vioka-chat-launcher:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 28px -3px rgba(91, 10, 118, 0.5), 0 6px 14px -2px rgba(239, 119, 60, 0.4);
}

.vioka-chat-launcher:active {
  transform: translateY(0) scale(0.98);
}

.vioka-chat-launcher .launcher-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vioka-chat-launcher .launcher-text {
  font-size: 0.825rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.vioka-chat-launcher .launcher-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background-color: #22C55E;
  box-shadow: 0 0 0 2px #ffffff;
}

/* Chat Window Box */
.vioka-chat-box {
  position: fixed;
  bottom: 5.5rem;
  left: 1.5rem;
  width: 390px;
  max-width: calc(100vw - 3rem);
  height: 560px;
  max-height: calc(100vh - 7rem);
  background: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9995;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom left;
}

.vioka-chat-box.hidden {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  pointer-events: none;
}

/* Header */
.vioka-chat-header {
  background: linear-gradient(135deg, #5B0A76 0%, #49227F 100%);
  color: #ffffff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid #EF773C;
}

.vioka-chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.vioka-chat-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: #ffffff;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #EF773C;
}

.vioka-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vioka-chat-title h3 {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.vioka-chat-title p {
  font-size: 0.72rem;
  color: #F9BA9C;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background: #22C55E;
}

.vioka-chat-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.vioka-chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Messages Container */
.vioka-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: #FDFCFE;
  scroll-behavior: smooth;
}

/* Message Bubble */
.chat-msg {
  max-width: 86%;
  padding: 0.75rem 0.95rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  line-height: 1.45;
  animation: fadeInMsg 0.25s ease-out;
}

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

.chat-msg.bot {
  align-self: flex-start;
  background: #FFFFFF;
  color: #262626;
  border: 1px solid #ECE7F2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  border-bottom-left-radius: 0.25rem;
}

.chat-msg.user {
  align-self: flex-end;
  background: #5B0A76;
  color: #ffffff;
  border-bottom-right-radius: 0.25rem;
}

.chat-msg p {
  margin-bottom: 0.4rem;
}
.chat-msg p:last-child {
  margin-bottom: 0;
}

.chat-msg ul {
  margin: 0.4rem 0 0.4rem 1.1rem;
  list-style-type: disc;
}

.chat-msg li {
  margin-bottom: 0.2rem;
}

/* Product Card inside bot response */
.chat-card {
  margin-top: 0.6rem;
  padding: 0.65rem;
  background: #F5F4F9;
  border-radius: 0.65rem;
  border-left: 3px solid #EF773C;
}

.chat-card-title {
  font-weight: 800;
  color: #5B0A76;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

.chat-card-meta {
  font-size: 0.72rem;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* Action button inside message */
.chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  padding: 0.45rem 0.8rem;
  background: #25D366;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.chat-action-btn:hover {
  opacity: 0.9;
}

/* Quick Suggestion Chips */
.vioka-quick-chips {
  padding: 0.5rem 0.85rem;
  background: #F5F4F9;
  border-top: 1px solid #ECE7F2;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.vioka-quick-chips::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  background: #FFFFFF;
  border: 1px solid #DFD9E8;
  color: #5B0A76;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.quick-chip:hover {
  background: #5B0A76;
  color: #FFFFFF;
  border-color: #5B0A76;
}

/* Input Area */
.vioka-chat-input-bar {
  padding: 0.75rem;
  background: #ffffff;
  border-top: 1px solid #ECE7F2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vioka-chat-input-bar input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  border: 1.5px solid #E2DCE8;
  border-radius: 9999px;
  outline: none;
  transition: border-color 0.2s;
  background: #FDFCFE;
}

.vioka-chat-input-bar input:focus {
  border-color: #5B0A76;
  background: #ffffff;
}

.vioka-chat-send-btn {
  background: #EF773C;
  color: #ffffff;
  border: none;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

.vioka-chat-send-btn:hover {
  background: #D8632B;
  transform: scale(1.05);
}

.vioka-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
}

.typing-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: #A098AB;
  border-radius: 9999px;
  animation: typingBounce 1.2s infinite ease-in-out;
}

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

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .vioka-chat-launcher {
    left: 1rem;
    bottom: 1rem;
    padding: 0.65rem 0.9rem;
  }
  .vioka-chat-box {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 4.8rem;
    width: auto;
    max-width: none;
    height: 70vh;
  }
}
