/* Asistente de trexnology.com — estilos del widget (identidad v5) */
.tx-chat {
  --tx-bg: #0A0E14; --tx-panel: #121923; --tx-panel-2: #161E2A; --tx-line: #1F2938; --tx-line-2: #2A3646;
  --tx-text: #E8ECF1; --tx-muted: #9AA5B4; --tx-dim: #6B7684; --tx-amber: #F5A623; --tx-amber-2: #FFC55C; --tx-amber-ink: #1A1206;
  --tx-body: "Figtree", system-ui, sans-serif; --tx-mono: "JetBrains Mono", ui-monospace, monospace; --tx-display: "Unbounded", sans-serif;
  position: fixed; left: 18px; bottom: 18px; z-index: 60;
  font-family: var(--tx-body); color: var(--tx-text); font-size: 15px; line-height: 1.5;
}

/* botón */
.tx-chat-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 54px; padding: 0 18px 0 14px; border-radius: 27px;
  background: var(--tx-amber); color: var(--tx-amber-ink); border: 0; cursor: pointer;
  font: 600 15px var(--tx-body); box-shadow: 0 8px 24px rgba(0,0,0,.4);
  transition: transform .15s, background .15s;
}
.tx-chat-btn:hover { background: var(--tx-amber-2); transform: translateY(-2px); }
.tx-chat-btn svg { width: 24px; height: 24px; }
.tx-chat.is-open .tx-chat-btn { display: none; }

/* panel */
.tx-chat-panel {
  width: 370px; max-width: calc(100vw - 36px); height: 560px; max-height: calc(100vh - 36px);
  display: flex; flex-direction: column;
  background: var(--tx-panel); border: 1px solid var(--tx-line-2); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55); overflow: hidden;
}
.tx-chat-panel[hidden] { display: none; }
.tx-chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--tx-panel-2); border-bottom: 1px solid var(--tx-line);
}
.tx-chat-head strong { display: block; font-family: var(--tx-display); font-weight: 600; font-size: 15px; }
.tx-chat-head small { display: block; font-family: var(--tx-mono); font-size: 11px; color: var(--tx-dim); margin-top: 2px; }
.tx-chat-close { background: transparent; border: 0; color: var(--tx-muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 6px; }
.tx-chat-close:hover { color: var(--tx-text); }

.tx-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tx-msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; }
.tx-msg-assistant { align-self: flex-start; background: var(--tx-bg); border: 1px solid var(--tx-line); border-bottom-left-radius: 4px; }
.tx-msg-user { align-self: flex-end; background: var(--tx-amber); color: var(--tx-amber-ink); border-bottom-right-radius: 4px; }
.tx-msg-error { border-color: #B45309; color: var(--tx-muted); }
.tx-msg.is-typing:empty::after { content: "…"; color: var(--tx-dim); animation: tx-blink 1s infinite; }
@keyframes tx-blink { 50% { opacity: .3; } }

.tx-chat-sugs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.tx-chat-sugs:empty { display: none; }
.tx-sug {
  font: 500 13px var(--tx-body); color: var(--tx-text); background: transparent;
  border: 1px solid var(--tx-line-2); border-radius: 999px; padding: 6px 11px; cursor: pointer;
}
.tx-sug:hover { border-color: var(--tx-amber); color: var(--tx-amber-2); }

.tx-chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--tx-line); background: var(--tx-panel-2); }
.tx-chat-form textarea {
  flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 12px;
  background: var(--tx-bg); color: var(--tx-text); border: 1px solid var(--tx-line-2); border-radius: 10px;
  font: 15px/1.4 var(--tx-body); outline: none;
}
.tx-chat-form textarea:focus { border-color: var(--tx-amber); }
.tx-chat-form button {
  width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--tx-amber); color: var(--tx-amber-ink); cursor: pointer;
  display: grid; place-items: center;
}
.tx-chat-form button:disabled { opacity: .5; cursor: default; }
.tx-chat-form button svg { width: 20px; height: 20px; }

.tx-chat-foot { padding: 8px 14px 10px; font-size: 11.5px; color: var(--tx-dim); background: var(--tx-panel-2); }
.tx-chat-foot a { color: var(--tx-amber-2); text-decoration: none; margin-left: 4px; }
.tx-chat-foot a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .tx-chat { left: 12px; bottom: 12px; }
  .tx-chat-btn-label { display: none; }
  .tx-chat-btn { width: 50px; height: 50px; padding: 0; justify-content: center; border-radius: 50%; }
  .tx-chat.is-open { left: 0; right: 0; bottom: 0; top: 0; }
  .tx-chat-panel { width: 100vw; max-width: none; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tx-chat-btn { transition: none; }
  .tx-msg.is-typing:empty::after { animation: none; }
}
