/* =============================================================================
   HIPPO AI Assistant Styles
   ============================================================================= */

.hippo-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Floating Action Button */
.hippo-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
  transition: all 0.3s ease;
}

.hippo-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.5);
}

.hippo-fab:active {
  transform: scale(0.95);
}

.hippo-fab-hidden {
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

/* Chat Panel */
.hippo-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 380px;
  height: 560px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s ease;
}

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

/* Header */
.hippo-header {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.hippo-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hippo-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.hippo-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.hippo-subtitle {
  font-size: 12px;
  opacity: 0.9;
  margin: 0;
}

.hippo-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.hippo-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Messages */
.hippo-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hippo-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.hippo-message-user {
  align-self: flex-end;
}

.hippo-message-assistant {
  align-self: flex-start;
}

.hippo-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.hippo-bubble-user {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.hippo-bubble-assistant {
  background: white;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

/* Quick Replies */
.hippo-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.hippo-quick-reply {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #4f46e5;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.hippo-quick-reply:hover:not(:disabled) {
  background: #4f46e5;
  color: white;
  border-color: #4f46e5;
}

.hippo-quick-reply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Typing Indicator */
.hippo-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
}

.hippo-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  animation: hippo-bounce 1.4s infinite ease-in-out both;
}

.hippo-typing span:nth-child(1) {
  animation-delay: -0.32s;
}

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

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

/* Scroll Button */
.hippo-scroll-btn {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.hippo-scroll-btn:hover {
  background: #f1f5f9;
  color: #4f46e5;
}

/* Input Form */
.hippo-input-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.hippo-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.hippo-input:focus {
  border-color: #4f46e5;
}

.hippo-input::placeholder {
  color: #94a3b8;
}

.hippo-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.hippo-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.hippo-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 480px) {
  .hippo-container {
    bottom: 16px;
    right: 16px;
  }

  .hippo-panel {
    width: calc(100vw - 32px);
    height: calc(100vh - 120px);
    max-height: 600px;
  }
}

/* Scrollbar */
.hippo-messages::-webkit-scrollbar {
  width: 6px;
}

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

.hippo-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.hippo-messages::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
