/* =====================================================================
   UNFAZED MOTORS — AI CHATBOT WIDGET
   Floating chat button + slide-up conversation panel
   Matches the site's dark premium aesthetic
   ===================================================================== */

#unfazedChatRoot { font-family: 'Inter', -apple-system, sans-serif; }

.uchat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2d2d, #aa1f1f);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(255, 45, 45, 0.35);
  z-index: 9998;
  display: grid;
  place-items: center;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}
.uchat-fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 18px 40px rgba(255, 45, 45, 0.5);
}
.uchat-fab:active { transform: scale(0.96); }
.uchat-fab svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 2; }
.uchat-fab.hidden { display: none; }

.uchat-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(255, 45, 45, 0.4);
  animation: uchat-pulse 2s infinite;
}
@keyframes uchat-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

.uchat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 40px);
  height: 620px;
  max-height: calc(100vh - 120px);
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.uchat-panel.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.uchat-header {
  padding: 16px 18px;
  background: #121212;
  border-bottom: 1px solid #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.uchat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.uchat-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #0a0a0a;
  display: grid; place-items: center;
  border: 1px solid #2a2a2a;
  overflow: hidden;
  flex-shrink: 0;
}
.uchat-avatar img { width: 80%; height: 80%; object-fit: contain; }
.uchat-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1;
}
.uchat-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #8a8a8a;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.uchat-subtitle::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: uchat-dot-pulse 2s infinite;
}
@keyframes uchat-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.uchat-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: none;
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s ease;
}
.uchat-close:hover { background: rgba(255,255,255,0.12); }

.uchat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.uchat-messages::-webkit-scrollbar { width: 6px; }
.uchat-messages::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }

.uchat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  animation: uchat-msg-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes uchat-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.uchat-msg.bot {
  align-self: flex-start;
  background: #151515;
  color: #e5e5e5;
  border: 1px solid #1f1f1f;
  border-bottom-left-radius: 4px;
}
.uchat-msg.user {
  align-self: flex-end;
  background: #ff2d2d;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.uchat-msg.system {
  align-self: center;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: center;
  max-width: 100%;
  padding: 10px 14px;
}

.uchat-typing {
  align-self: flex-start;
  padding: 14px 18px;
  background: #151515;
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  display: flex;
  gap: 4px;
}
.uchat-typing span {
  width: 6px; height: 6px;
  background: #8a8a8a;
  border-radius: 50%;
  animation: uchat-typing-bounce 1.4s infinite;
}
.uchat-typing span:nth-child(2) { animation-delay: 0.2s; }
.uchat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes uchat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.uchat-suggestions {
  padding: 10px 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid #1f1f1f;
  background: #0c0c0c;
}
.uchat-chip {
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid #2a2a2a;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c5c5c5;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.uchat-chip:hover {
  color: #fff;
  border-color: #ff2d2d;
  background: rgba(255,45,45,0.08);
}

.uchat-input {
  padding: 14px 18px;
  background: #0c0c0c;
  border-top: 1px solid #1f1f1f;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.uchat-input textarea {
  flex: 1;
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  min-height: 40px;
  max-height: 100px;
  transition: border-color 0.2s ease;
}
.uchat-input textarea:focus {
  outline: none;
  border-color: #ff2d2d;
}
.uchat-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #ff2d2d;
  border: none;
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}
.uchat-send:hover:not(:disabled) { transform: scale(1.05); }
.uchat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.uchat-send svg { width: 18px; height: 18px; }

.uchat-disclaimer {
  padding: 8px 18px 10px;
  background: #0c0c0c;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #555;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-top: 1px solid #1f1f1f;
}

@media (max-width: 520px) {
  .uchat-panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 100px);
    bottom: 8px;
    right: 8px;
    max-height: none;
  }
  .uchat-fab {
    width: 56px; height: 56px;
    bottom: 16px; right: 16px;
  }
}
