/* TreeKnow INBOX Web 2.2.4 — retoque de interfaz, 11/11/2026.
   Requiere 2.2.3 instalado. SIN modificar JavaScript ni rutas de pago.
   1. Tarjetas del chat minimizado: blancas, sin border/shadow.
   2. Responder: icono SVG únicamente, nombre accesible para lector de pantalla.
   3. Al citar en mensaje enviado: cita CLARA, solo el texto nuevo NEGRO.
   4. No alterar la apariencia/posición de los corazones. */

/* Nudge: el relieve visible venía de .tkai-nudge-card del CSS histórico v145. */
body .tkai .tkai-nudge,
body .tkai .tkai-nudge .tkai-nudge-stack,
body .tkai .tkai-nudge .tkai-nudge-card,
body .tkai .tkai-nudge .tkai-nudge-card .tkai-nudge-open,
body .tkai .tkai-nudge .tkai-nudge-card .tkai-nudge-message {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}
body .tkai .tkai-nudge .tkai-nudge-stack {
  background: #fff !important;
}
body .tkai .tkai-nudge .tkai-nudge-card {
  background: #fff !important;
  border: 0 !important;
  outline: none !important;
}
body .tkai .tkai-nudge .tkai-nudge-card::before,
body .tkai .tkai-nudge .tkai-nudge-card::after {
  box-shadow: none !important;
}
/* Conservar el peso 400 de la vista PREVIA; chat ABIERTO continúa en 500. */
body .tkai .tkai-nudge .tkai-nudge-card .tkai-nudge-message {
  font-weight: 400 !important;
  background: #fff !important;
}

/* Acción de respuesta dentro del chat: icono auténtico SVG, no etiqueta repetida.
   El botón mantiene su aria-label en el DOM para accesibilidad. */
body .tkai .tkai-messages .tkai-bubble .tk221-bubble-reply {
  box-sizing: border-box !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  margin: 3px 0 0 !important;
  padding: 5px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: 0 !important; /* oculta ↩ Responder conservando aria-label */
  line-height: 0 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  opacity: .78;
}
body .tkai .tkai-messages .tkai-bubble .tk221-bubble-reply::before {
  content: '' !important;
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  /* Lucide reply: icono SVG monocromo sin texto. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m9%2017-5-5%205-5'/%3E%3Cpath%20d='M20%2018v-2a4%204%200%200%200-4-4H4'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m9%2017-5-5%205-5'/%3E%3Cpath%20d='M20%2018v-2a4%204%200%200%200-4-4H4'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
body .tkai .tkai-messages .tkai-bubble .tk221-bubble-reply:hover,
body .tkai .tkai-messages .tkai-bubble .tk221-bubble-reply:focus-visible {
  opacity: 1;
}

/* SOLO cuando un mensaje PROPIO está citando a otro: no envolver la cita en negro.
   La respuesta NUEVA conserva su negro original; la cita queda independiente y clara.
   :has() está disponible en navegadores móviles modernos. */
body .tkai .tkai-messages .tkai-bubble.tkai-user:has(> .tk221-quoted-message):not(.tkai-copy-card):not(.tkai-image-bubble) {
  background: transparent !important;
  color: #20252d !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  width: fit-content;
  max-width: 95%;
}
body .tkai .tkai-messages .tkai-bubble.tkai-user:has(> .tk221-quoted-message) > .tk221-quoted-message {
  display: block;
  align-self: stretch;
  background: #f6f7f9 !important;
  color: #20252d !important;
  border: 0 !important;
  border-left: 3px solid #cbd3df !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  margin: 0 0 5px !important;
  box-shadow: none !important;
}
body .tkai .tkai-messages .tkai-bubble.tkai-user:has(> .tk221-quoted-message) > .tk221-quoted-message strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}
body .tkai .tkai-messages .tkai-bubble.tkai-user:has(> .tk221-quoted-message) > .tk221-quoted-message strong,
body .tkai .tkai-messages .tkai-bubble.tkai-user:has(> .tk221-quoted-message) > .tk221-quoted-message span {
  color: #20252d !important;
}
body .tkai .tkai-messages .tkai-bubble.tkai-user:has(> .tk221-quoted-message) > .tkai-message-caption {
  display: block;
  align-self: flex-end;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px;
  color: #fff !important;
  background: #111 !important;
  border-radius: 12px;
  box-shadow: none !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
body .tkai .tkai-messages .tkai-bubble.tkai-user:has(> .tk221-quoted-message) > .tkai-message-time {
  display: block;
  align-self: flex-end;
  color: #7d8796 !important;
  margin-top: 3px;
}
body .tkai .tkai-messages .tkai-bubble.tkai-user:has(> .tk221-quoted-message) > .tk221-bubble-reply {
  align-self: flex-end;
  color: #596475 !important;
}
/* Sin tocar ningún selector .tkai-heart: conserva el icono y su posición. */
