/* Orion — AI Lead Capture Widget Styles */

#orion-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ── FAB button ──────────────────────────────────────────────────────────── */
#orion-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #4a9eff 0%, #a855f7 100%);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(74, 158, 255, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#orion-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(74, 158, 255, 0.6);
}

#orion-fab.captured {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.45);
}

/* ── Chat panel ──────────────────────────────────────────────────────────── */
#orion-panel {
  display: none; /* JS sets display:flex on open */
  position: absolute;
  bottom: 64px;
  right: 0;
  width: 360px;
  height: 520px;
  background: #0d0d0d;
  border: 1px solid rgba(74, 158, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  flex-direction: column;
  overflow: hidden;
  animation: orion-slide-up 0.2s ease;
}

@keyframes orion-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ──────────────────────────────────────────────────────────────── */
#orion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(74,158,255,0.15) 0%, rgba(168,85,247,0.1) 100%);
  border-bottom: 1px solid rgba(74, 158, 255, 0.15);
  flex-shrink: 0;
}

#orion-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

#orion-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

#orion-close:hover {
  color: #e2e8f0;
  background: rgba(255,255,255,0.06);
}

/* ── Messages area ───────────────────────────────────────────────────────── */
#orion-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(74,158,255,0.2) transparent;
}

#orion-messages::-webkit-scrollbar { width: 4px; }
#orion-messages::-webkit-scrollbar-track { background: transparent; }
#orion-messages::-webkit-scrollbar-thumb { background: rgba(74,158,255,0.25); border-radius: 4px; }

.orion-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  word-wrap: break-word;
}

.orion-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #4a9eff 0%, #6366f1 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.orion-msg-assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.07);
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px;
}

/* ── Typing indicator ────────────────────────────────────────────────────── */
.orion-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}

.orion-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4a9eff;
  animation: orion-bounce 1.2s ease-in-out infinite;
  display: inline-block;
}

.orion-typing span:nth-child(2) { animation-delay: 0.2s; }
.orion-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes orion-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* ── Input row ───────────────────────────────────────────────────────────── */
#orion-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
}

#orion-input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 13.5px;
  padding: 9px 13px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

#orion-input::placeholder { color: #475569; }

#orion-input:focus {
  border-color: rgba(74,158,255,0.5);
}

#orion-send {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, #4a9eff 0%, #a855f7 100%);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

#orion-send:hover { opacity: 0.88; transform: scale(1.06); }
#orion-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  #orion-widget {
    bottom: 16px;
    right: 16px;
  }
  #orion-panel {
    width: calc(100vw - 32px);
    right: 0;
    height: 480px;
  }
}
