/* VotePulse AI — floating widget + section chat */
.vp-ai-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.vp-ai-fab:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 48px rgba(16, 185, 129, 0.45);
}

.vp-ai-fab.vp-hidden { display: none; }

.vp-ai-fab-icon { font-size: 1.1rem; }

.vp-ai-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9991;
  width: min(420px, calc(100vw - 1.5rem));
  height: min(600px, calc(100vh - 2rem));
  display: none;
  flex-direction: column;
  border-radius: 1rem;
  background: rgba(8, 12, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  font-family: Inter, system-ui, sans-serif;
}

.vp-ai-panel.vp-open { display: flex; }

.vp-ai-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(99, 102, 241, 0.08));
}

.vp-ai-panel-head strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
}

.vp-ai-panel-head span {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.15rem;
}

.vp-ai-panel-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.vp-ai-panel-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.vp-ai-msg {
  max-width: 90%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.vp-ai-msg-user {
  align-self: flex-end;
  background: rgba(16, 185, 129, 0.15);
  color: #e2e8f0;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.vp-ai-msg-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.vp-ai-msg-assistant strong { color: #fff; }

.vp-ai-typing { opacity: 0.7; font-style: italic; }

.vp-ai-panel-foot {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.vp-ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.vp-ai-sug {
  font-size: 0.62rem;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-family: inherit;
}

.vp-ai-sug:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.vp-ai-form {
  display: flex;
  gap: 0.5rem;
}

.vp-ai-form input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.8125rem;
  font-family: inherit;
}

.vp-ai-form input:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.4);
}

.vp-ai-form button {
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  border: none;
  background: #10b981;
  color: #041016;
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  font-family: inherit;
}

.vp-ai-section-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vp-ai-section-form input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 0.8125rem;
  font-family: Inter, system-ui, sans-serif;
}

.vp-ai-section-form button {
  padding: 0.65rem 1.1rem;
  border-radius: 0.55rem;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.vp-ai-live-reply {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.vp-ai-live-reply strong { color: #6ee7b7; }

@media (max-width: 640px) {
  .vp-ai-fab-label { display: none; }
  .vp-ai-fab { padding: 0.85rem; border-radius: 50%; }
}
