/* Arti Chat Widget - isolated styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Root wrapper: make it independent of theme layout */
#arti-chat{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999999; /* over Elementor overlays */
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Prevent theme button styles from leaking */
#arti-chat button{
  font-family: inherit;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
}

/* Chat window */
#arti-chat .chat-window-container{
  position: absolute;
  right: 0;
  bottom: 92px; /* sits above bubble */
  width: 380px;
  height: 540px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(0,0,0,.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(3,24,57,.12);
}

/* Responsive */
@media (max-width: 480px){
  #arti-chat{
    right: 12px;
    bottom: 12px;
  }
  #arti-chat .chat-window-container{
    width: calc(100vw - 24px);
    height: min(70vh, 560px);
    bottom: 84px;
  }
}

/* Header */
#arti-chat .chat-header{
  background: #031839;
  color: #fff;
  height: 64px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#arti-chat .header-content{
  display: flex;
  align-items: center;
  gap: 10px;
}

#arti-chat .logo{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

#arti-chat .header-text h2{
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  line-height: 1.1;
}

#arti-chat .online-status{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  opacity: .9;
}

#arti-chat .online-status::before{
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ececf;
  display: inline-block;
}

#arti-chat .close-button{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  background: rgba(255,255,255,.08);
}
#arti-chat .close-button:hover{ background: rgba(255,255,255,.14); }

/* Messages */
#arti-chat .chat-messages{
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
  background: #ffffff;
}

#arti-chat .message-wrapper{
  display: flex;
  margin: 10px 0 4px;
}

#arti-chat .message-wrapper.user{ justify-content: flex-end; }
#arti-chat .message-wrapper.bot{ justify-content: flex-start; }

#arti-chat .message{
  max-width: 85%;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.35;
  border-radius: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

#arti-chat .bot-message{
  background: #eef2f6;
  color: #1f2937;
  border-top-left-radius: 6px;
  border: 1px solid #d1d7e0;
}

#arti-chat .user-message{
  background: #031839;
  color: #fff;
  border-top-right-radius: 6px;
}

#arti-chat .message-time{
  font-size: 11px;
  color: #6b7280;
  margin: 0 4px;
}

/* Input area */
#arti-chat .chat-input-area{
  padding: 12px;
  background: #f7f9fc;
  border-top: 1px solid #d1d7e0;
}

#arti-chat .input-container{
  display: flex;
  gap: 8px;
  align-items: center;
}

#arti-chat .chat-input{
  flex: 1;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #d1d7e0;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
}
#arti-chat .chat-input:focus{ border-color: #2ececf; box-shadow: 0 0 0 3px rgba(46,206,207,.18); }

#arti-chat .send-button{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #2ececf;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#arti-chat .send-button:hover{ filter: brightness(.95); }

#arti-chat .powered-by{
  margin-top: 8px;
  font-size: 11px;
  color: #6b7280;
}

/* Bubble */
#arti-chat .chat-bubble{
  position: absolute;
  right: 0;
  bottom: 0;
  width: 64px;
  height: 64px;
  border-radius: 20px 20px 0 20px;
  background: #031839;
  box-shadow: 0 16px 42px rgba(0,0,0,.18);
  border: 1px solid rgba(173,224,249,.6);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#arti-chat .chat-bubble:hover{ transform: scale(1.03); }
#arti-chat .chat-bubble svg{ pointer-events: none; }

/* Scrollbar */
#arti-chat .chat-messages::-webkit-scrollbar{ width: 6px; }
#arti-chat .chat-messages::-webkit-scrollbar-thumb{ background: #d1d7e0; border-radius: 3px; }

/*Animacion espera*/
.arti-dots{
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 2px 0;
}

.arti-dots span{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
  opacity: 0.25;
  animation: artiDotPulse 1s infinite ease-in-out;
}

.arti-dots span:nth-child(2){ animation-delay: 0.15s; }
.arti-dots span:nth-child(3){ animation-delay: 0.30s; }

@keyframes artiDotPulse{
  0%, 80%, 100% { transform: translateY(0); opacity: 0.25; }
  40% { transform: translateY(-4px); opacity: 0.9; }
}