/* ==============================================================================
   KENTRON LASER - CHAT COMERCIAL IA LOCAL
   Colores corporativos: Negro #000000, Rojo #F20917, Naranja #F67219
   ============================================================================== */

.knt-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  color: #ffffff;
  border: 1px solid rgba(242, 9, 23, 0.4);
  border-radius: 50px;
  padding: 12px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px rgba(242, 9, 23, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.knt-chat-launcher:hover {
  transform: translateY(-2px);
  border-color: #f20917;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 18px rgba(242, 9, 23, 0.4);
}

.knt-chat-launcher-icon {
  width: 20px;
  height: 20px;
  fill: #f20917;
}

.knt-chat-launcher-badge {
  background: #f20917;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
}

.knt-chat-window {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: #0d0f12;
  border: 1px solid #262930;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.knt-chat-window.knt-hidden {
  display: none;
}

.knt-chat-header {
  background: #14171d;
  padding: 14px 16px;
  border-bottom: 1px solid #262930;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.knt-chat-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.knt-chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #000;
  border: 1px solid #f20917;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f20917;
  font-weight: bold;
  font-size: 14px;
}

.knt-chat-header-text h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.knt-chat-status {
  font-size: 11px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
}

.knt-chat-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.knt-chat-close {
  background: transparent;
  border: none;
  color: #8b949e;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 6px;
}

.knt-chat-close:hover {
  color: #ffffff;
  background: #21262d;
}

.knt-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.knt-chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.45;
  word-break: break-word;
}

.knt-chat-msg-bot {
  align-self: flex-start;
  background: #161b22;
  color: #e6edf3;
  border: 1px solid #30363d;
  border-bottom-left-radius: 4px;
}

.knt-chat-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #d30815 0%, #a80610 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.knt-chat-whatsapp-card {
  margin-top: 8px;
  background: #0f2d1e;
  border: 1px solid #25d366;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.knt-chat-whatsapp-card span {
  font-size: 11px;
  color: #a7f3d0;
  font-weight: 500;
}

.knt-chat-whatsapp-btn {
  background: #25d366;
  color: #052e16;
  text-decoration: none;
  font-weight: 700;
  font-size: 11.5px;
  padding: 7px 12px;
  border-radius: 6px;
  text-align: center;
  display: inline-block;
  transition: background 0.2s;
}

.knt-chat-whatsapp-btn:hover {
  background: #22c55e;
}

.knt-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
}

.knt-chat-chip {
  background: #1c2128;
  border: 1px solid #30363d;
  color: #8b949e;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.knt-chat-chip:hover {
  color: #ffffff;
  border-color: #f20917;
  background: #262c36;
}

.knt-chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid #262930;
  background: #14171d;
  display: flex;
  gap: 8px;
}

.knt-chat-input {
  flex: 1;
  background: #0d0f12;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  font-size: 12px;
  outline: none;
  font-family: inherit;
}

.knt-chat-input:focus {
  border-color: #f20917;
}

.knt-chat-send {
  background: #f20917;
  border: none;
  color: white;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  transition: background 0.2s;
}

.knt-chat-send:hover {
  background: #d60714;
}

.knt-chat-loading-dots {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
}

.knt-chat-loading-dots span {
  width: 6px;
  height: 6px;
  background: #8b949e;
  border-radius: 50%;
  animation: kntBounce 1.4s infinite ease-in-out both;
}

.knt-chat-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.knt-chat-loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes kntBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}
