
#nec-chat-widget {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 999999 !important;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  pointer-events: none;
}

#nec-chat-widget * {
  pointer-events: auto;
}

.nec-chat-button {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e 0%, #dc2626 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: white;
  z-index: 10000;
}

.nec-chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.6);
}

.nec-chat-icon, .nec-close-icon {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nec-chat-closed .nec-close-icon {
  opacity: 0;
  transform: rotate(90deg);
  position: absolute;
}

.nec-chat-closed .nec-chat-icon {
  opacity: 1;
}

.nec-chat-open .nec-chat-icon {
  opacity: 0;
  transform: rotate(-90deg);
  position: absolute;
}

.nec-chat-open .nec-close-icon {
  opacity: 1;
}

.nec-chat-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 500px;
  max-height: calc(100vh - 140px);
  background: rgba(13, 13, 13, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  flex-direction: column;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: none;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nec-chat-open .nec-chat-panel {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.nec-chat-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nec-chat-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #f4f4f5;
}

.nec-chat-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #a1a1aa;
}

.nec-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nec-message {
  display: flex;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nec-message-content {
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.5;
}

.nec-assistant .nec-message-content {
  background: rgba(244, 63, 94, 0.15);
  color: #f4f4f5;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.nec-user {
  justify-content: flex-end;
}

.nec-user .nec-message-content {
  background: rgba(56, 189, 248, 0.15);
  color: #f4f4f5;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.nec-typing {
  opacity: 0.6;
}

.nec-chat-form {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 8px;
}

#nec-chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #f4f4f5;
  font-size: 14px;
  font-family: inherit;
}

#nec-chat-input:focus {
  outline: none;
  border-color: #f43f5e;
  background: rgba(255, 255, 255, 0.08);
}

.nec-chat-form button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #f43f5e 0%, #dc2626 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.nec-chat-form button:hover {
  transform: scale(1.05);
}

.nec-chat-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  #nec-chat-widget {
    bottom: 10px;
    right: 10px;
  }

  .nec-chat-panel {
    width: calc(100vw - 20px);
    height: calc(100vh - 100px);
  }
}
