.chatboyia-window {
  display: flex;
  flex-direction: column;
  height: 400px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  font-family: Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  z-index: 1000; /* Asegurar visibilidad sobre otros elementos */
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.chat-input-area {
  display: flex;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #ddd;
}

.chat-integrations {
  display: flex;
  margin-right: 10px;
}

.chat-btn {
  margin-right: 5px;
  padding: 5px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  z-index: 1001; /* Asegurar que los botones estén sobre otros elementos */
}

.chat-btn span.dashicons {
  margin: 0;
  font-size: 20px;
  line-height: 1;
  color: #000;
  display: inline-block;
}

.chat-btn:hover::after, .chat-btn:focus::after {
  content: attr(title);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1002;
}

.chat-btn:hover::before, .chat-btn:focus::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
  z-index: 1002;
}

.chat-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-right: 10px;
  font-family: Arial, sans-serif;
  white-space: pre-wrap;
}

.chat-send-btn {
  padding: 8px 15px;
  background: #007cba;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.chatboyia-user, .chatboyia-ai {
  padding: 10px;
  margin: 3px 0;
  border-radius: 5px;
  max-width: 80%;
  border: 1px solid #ddd;
  font-family: Arial, sans-serif;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.chatboyia-user {
  background: #e0f7fa;
  align-self: flex-end;
}

.chatboyia-ai {
  background: #f1f8e9;
  align-self: flex-start;
}

.voice-btn.recording {
  background-color: red;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.5;
  }
}