.techhub-chat-launcher,
.techhub-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  font-family: var(--font-body, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif);
}

.techhub-chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border, #2b2b2b);
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px);
  color: var(--text, #f5f5f5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.techhub-chat-launcher:hover {
  transform: translateY(-2px);
  border-color: var(--accent, #f9a825);
  background: rgba(18, 18, 18, 0.78);
}

.techhub-chat-badge {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent, #f9a825);
  box-shadow: 0 0 0 4px rgba(249, 168, 37, 0.14);
}

.techhub-chat-launcher strong {
  font-family: var(--font-display, inherit);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.techhub-chat-launcher span {
  font-size: 0.78rem;
  color: var(--text-muted, #a8a8a8);
}

.techhub-chat-panel {
  --chat-panel-w: min(460px, calc(100vw - 28px));
  --chat-panel-h: min(580px, calc(100vh - 28px));
  width: var(--chat-panel-w);
  height: var(--chat-panel-h);
  min-width: 300px;
  min-height: 320px;
  max-width: min(720px, calc(100vw - 16px));
  max-height: min(92vh, 920px);
  border-radius: 16px;
  border: 1px solid var(--border, #2b2b2b);
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  resize: both;
}

.techhub-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.techhub-chat-header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.techhub-chat-header-title strong {
  font-family: var(--font-display, inherit);
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.techhub-chat-header-title span {
  font-size: 0.72rem;
  color: var(--text-muted, #a8a8a8);
}

.techhub-chat-header-actions {
  display: flex;
  gap: 8px;
}

.techhub-chat-icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #f5f5f5);
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.techhub-chat-icon-btn:hover {
  border-color: rgba(249, 168, 37, 0.55);
  background: rgba(249, 168, 37, 0.10);
}

.techhub-chat-messages {
  padding: 12px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(0, 0, 0, 0.45);
}

.techhub-chat-messages::-webkit-scrollbar {
  width: 8px;
}

.techhub-chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
}

.techhub-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.techhub-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 168, 37, 0.45);
}

.techhub-chat-msg {
  max-width: 92%;
  border-radius: 14px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.45;
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.techhub-chat-msg.user {
  margin-left: auto;
  border-color: rgba(249, 168, 37, 0.35);
  background: rgba(249, 168, 37, 0.10);
}

.techhub-chat-msg.assistant strong {
  color: var(--accent, #f9a825);
  font-weight: 700;
}

.techhub-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.techhub-chat-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #f5f5f5);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.techhub-chat-action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(249, 168, 37, 0.55);
  background: rgba(249, 168, 37, 0.10);
}

.techhub-chat-composer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.techhub-chat-input {
  width: 100%;
  resize: none;
  min-height: 56px;
  max-height: 180px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text, #f5f5f5);
  outline: none;
  font-size: 0.9rem;
  line-height: 1.35;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(0, 0, 0, 0.45);
}

.techhub-chat-input::-webkit-scrollbar {
  width: 8px;
}

.techhub-chat-input::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
}

.techhub-chat-input::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.techhub-chat-input:focus {
  border-color: rgba(249, 168, 37, 0.55);
  box-shadow: 0 0 0 4px rgba(249, 168, 37, 0.12);
}

.techhub-chat-send {
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(249, 168, 37, 0.65);
  background: rgba(249, 168, 37, 0.14);
  color: var(--text, #f5f5f5);
  font-family: var(--font-display, inherit);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.techhub-chat-send:hover {
  transform: translateY(-1px);
  background: rgba(249, 168, 37, 0.22);
}

.techhub-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .techhub-chat-launcher,
  .techhub-chat-send,
  .techhub-chat-action-btn {
    transition: none;
  }
}

