/* Tradolux AI support widget — floating chat bubble.
   Loaded on every marketing page via site-chrome.js. Tokens match
   css/marketing.css (--gold is the brand accent green). */
.tlx-chat-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold, #10B981);
  color: #06110c;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  font-size: 24px;
  z-index: 9999;
}
.tlx-chat-bubble:hover { background: var(--gold-dim, #059669); }

.tlx-chat-panel {
  position: fixed;
  bottom: 88px;
  right: 20px;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 440px;
  max-height: calc(100vh - 120px);
  background: var(--panel, #122436);
  border: 1px solid var(--border, #1E3A50);
  border-radius: 8px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.tlx-chat-panel.open { display: flex; }

.tlx-chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #1E3A50);
  color: var(--text, #F1F5F9);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tlx-chat-header a { color: var(--gold, #10B981); font-size: 12px; font-weight: 500; text-decoration: none; }
.tlx-chat-header a:hover { color: var(--gold, #10B981); }
.tlx-chat-close { background: none; border: none; color: var(--text-dim, #94A3B8); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }

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

.tlx-msg { max-width: 85%; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4; }
.tlx-msg.user { align-self: flex-end; background: var(--gold, #10B981); color: #06110c; }
.tlx-msg.bot { align-self: flex-start; background: var(--panel-2, #1A2E44); color: var(--text, #F1F5F9); }
.tlx-msg.error { align-self: flex-start; background: rgba(246,70,93,0.12); color: var(--bear, #f6465d); }

.tlx-chat-input-row {
  display: flex;
  border-top: 1px solid var(--border, #1E3A50);
  padding: 10px;
  gap: 8px;
}
.tlx-chat-input-row input {
  flex: 1;
  background: var(--bg, #0D1B2A);
  border: 1px solid var(--border, #1E3A50);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text, #F1F5F9);
  font-size: 13px;
  font-family: inherit;
}
.tlx-chat-input-row input:focus { outline: none; border-color: var(--gold, #10B981); }
.tlx-chat-input-row button {
  background: var(--gold, #10B981);
  color: #06110c;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tlx-chat-input-row button:hover { background: var(--gold-dim, #059669); }
.tlx-chat-input-row button:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 480px) {
  .tlx-chat-panel { right: 12px; bottom: 80px; width: calc(100vw - 24px); }
  .tlx-chat-bubble { right: 12px; bottom: 12px; }
}
