/* ============================================
   Nova — Chat Widget Styles
   ============================================ */

/* ---------- Floating Button ---------- */
.zora-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(0, 180, 216, 0.25);
  background: linear-gradient(145deg, #0D1B2A 0%, #112240 100%);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 180, 216, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.zora-fab:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(0, 180, 216, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 180, 216, 0.5);
}

.zora-fab svg {
  width: 22px;
  height: 22px;
  color: #00B4D8;
  transition: all 0.35s ease;
  filter: drop-shadow(0 0 6px rgba(0, 180, 216, 0.4));
}

.zora-fab:hover svg {
  color: #00E5FF;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.5));
}

.zora-fab svg.zora-icon-chat {
  animation: novaSpin 8s linear infinite;
}

.zora-fab.active svg.zora-icon-chat {
  display: none;
}

.zora-fab.active svg.zora-icon-close {
  display: block;
}

.zora-fab svg.zora-icon-close {
  display: none;
  color: #A8B2C1;
  filter: none;
  animation: none;
}

@keyframes novaSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Glow ring */
.zora-fab::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.3), transparent, rgba(0, 180, 216, 0.15));
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}

.zora-fab:hover::before {
  opacity: 1;
}

.zora-fab.active::before {
  opacity: 0;
}

/* Subtle beacon dot */
.zora-fab::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: #00E5FF;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  animation: novaBeacon 3s ease-in-out infinite;
}

.zora-fab.active::after {
  opacity: 0;
}

@keyframes novaBeacon {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

/* ---------- Chat Panel ---------- */
.zora-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 9998;
  width: 380px;
  max-height: 520px;
  background: #0D1B2A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.zora-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
.zora-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, #0A1628, #0D1B2A);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.zora-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #112240, #0D1B2A);
  border: 1px solid rgba(0, 180, 216, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00B4D8;
  flex-shrink: 0;
}

.zora-avatar svg {
  filter: drop-shadow(0 0 4px rgba(0, 180, 216, 0.4));
}

.zora-header-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.zora-header-info p {
  font-size: 0.6875rem;
  color: #6B7A90;
  margin: 0;
  line-height: 1.3;
}

.zora-status {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #22C55E;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* Messages area */
.zora-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  max-height: 340px;
}

.zora-messages::-webkit-scrollbar {
  width: 4px;
}

.zora-messages::-webkit-scrollbar-track {
  background: transparent;
}

.zora-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Message bubbles */
.zora-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.8375rem;
  line-height: 1.6;
  animation: zoraFadeIn 0.3s ease;
}

@keyframes zoraFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.zora-msg--bot {
  background: #112240;
  color: #A8B2C1;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.zora-msg--user {
  background: linear-gradient(135deg, #00B4D8, #0077B6);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Rich HTML formatting for bot messages */
.zora-msg--html {
  max-width: 92%;
}

.zora-msg--html p {
  margin: 0 0 8px 0;
  color: #A8B2C1;
  line-height: 1.65;
}

.zora-msg--html p:last-child {
  margin-bottom: 0;
}

.zora-msg--html h1,
.zora-msg--html h2,
.zora-msg--html h3 {
  color: #00B4D8;
  margin: 10px 0 4px 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.zora-msg--html h1:first-child,
.zora-msg--html h2:first-child,
.zora-msg--html h3:first-child {
  margin-top: 0;
}

.zora-msg--html ul,
.zora-msg--html ol {
  margin: 6px 0 8px 0;
  padding-left: 18px;
  color: #A8B2C1;
}

.zora-msg--html li {
  margin-bottom: 4px;
  line-height: 1.55;
}

.zora-msg--html strong {
  color: #E2E8F0;
  font-weight: 600;
}

.zora-msg--html em {
  color: #94A3B8;
  font-style: italic;
}

.zora-msg--html code {
  background: rgba(0, 180, 216, 0.1);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.78rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  color: #00E5FF;
}

.zora-msg--html a {
  color: #00B4D8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.zora-msg--html a:hover {
  color: #00E5FF;
}

.zora-msg--html hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 10px 0;
}

/* Starter Chips */
.zora-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  animation: zoraFadeIn 0.3s ease;
}

.zora-chip {
  background: rgba(0, 180, 216, 0.1);
  border: 1px solid rgba(0, 180, 216, 0.3);
  color: #00B4D8;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.zora-chip:hover {
  background: rgba(0, 180, 216, 0.2);
  border-color: #00E5FF;
  color: #00E5FF;
  transform: translateY(-2px);
}

/* Typing indicator */
.zora-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  align-self: flex-start;
}

.zora-typing span {
  width: 6px;
  height: 6px;
  background: #6B7A90;
  border-radius: 50%;
  animation: zoraDot 1.4s ease-in-out infinite;
}

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

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

@keyframes zoraDot {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Input area */
.zora-input {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 10px;
  background: #0A1628;
}

.zora-input input {
  flex: 1;
  background: #0D1B2A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.8375rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.zora-input input::placeholder {
  color: #6B7A90;
}

.zora-input input:focus {
  border-color: #00B4D8;
}

.zora-input button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #00B4D8, #0077B6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.zora-input button:hover {
  transform: scale(1.05);
}

.zora-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.zora-input button svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .zora-panel {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 88px;
    max-height: 70vh;
  }

  .zora-fab {
    right: 16px;
    bottom: 16px;
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }
}